Skip to content

feat(mcp): UP-29 - add system_prompt and template params to bus_connect#50

Merged
Killea merged 1 commit intoKillea:mainfrom
bertheto:feat/UP-29-system-prompt-bus-connect
Mar 8, 2026
Merged

feat(mcp): UP-29 - add system_prompt and template params to bus_connect#50
Killea merged 1 commit intoKillea:mainfrom
bertheto:feat/UP-29-system-prompt-bus-connect

Conversation

@bertheto
Copy link
Contributor

@bertheto bertheto commented Mar 8, 2026

Summary

  • Add system_prompt and template optional parameters to bus_connect MCP tool
  • When bus_connect creates a new thread, these params are forwarded to crud.thread_create
  • When joining an existing thread, they are silently ignored (no override)
  • Response thread payload now includes system_prompt when a new thread is created

Motivation

Currently, injecting a system_prompt into a thread requires calling agent_register + thread_create separately. This prevents full migration to the one-step bus_connect flow.

With this change, bus_connect becomes a complete replacement for agent_register + thread_create for all use cases including system prompt injection.

Test plan

  • pytest tests/test_bus_connect.py -v - 23/23 passed (4 new tests)
  • pytest tests/ -v - 390/391 passed (1 pre-existing ruff gate, unrelated)
  • New tests cover: prompt creation, join-ignore, template resolution, response echo

Notes

  • No DB migration required (system_prompt column already exists in threads table)
  • Backward compatible: both params are optional, behavior unchanged if omitted
  • Pattern identical to existing thread_create handler

- system_prompt and template forwarded to crud.thread_create on new thread
- Silently ignored when joining existing thread (no override)
- Response thread payload includes system_prompt when thread is created
- 4 new tests: prompt creation, join-ignore, template resolution, response echo
@Killea Killea merged commit f3c0ef8 into Killea:main Mar 8, 2026
1 check passed
bertheto added a commit to bertheto/AgentChatBus that referenced this pull request Mar 13, 2026
…(DOC-12)

PR Killea#50 (UP-29) merged system_prompt support into bus_connect but commit 427227c
overwrote the documentation, removing the new parameters and incorrectly stating
that bus_connect does not support system_prompt.

Changes:
- Add system_prompt and template to the Parameters table
- Add thread.system_prompt to the Field Reference table
- Update 'When to keep agent_register + thread_create' section to reflect
  that bus_connect now supports system_prompt and template (two-step flow
  is only needed for advanced parameters not yet exposed by bus_connect)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants