Feature Description
Support multiple Telegram bots connecting to the same agent (same gateway, different sessions) using the same Telegram account.
Motivation
When working on complex tasks, users often need the same agent to work on multiple things in parallel. Currently the only option is /background, which has these limitations:
- Complex task delivery is cumbersome — passing detailed, multi-step instructions to
/background is awkward and error-prone
- No mid-task interaction — once a background job starts, you cannot intervene, ask questions, or provide feedback until it completes
- Single-threaded queue — multiple background jobs still run sequentially, not in parallel
Multiple parallel sessions (via multiple bots) would allow the agent to simultaneously work on unrelated tasks, each with full interactive feedback capability.
Proposed Solution
Allow multiple Telegram bots under the same account to connect to the same gateway and agent, each with its own independent session. From the user's perspective, they would talk to "Bot A" for Task 1 and "Bot B" for Task 2, while both are powered by the same underlying agent with shared context (optional — could also be isolated per bot).
Potential implementation approaches:
- Session key =
(user_id, bot_token) instead of just user_id, allowing the same user to have multiple concurrent sessions per bot
- Gateway routing based on bot token to dispatch to the correct session
- Optional shared memory/context between sessions for collaborative tasks
Alternatives Considered
/background with job queue — only sequential, no mid-task interactivity
- Multiple separate agents — each is isolated, no shared context, harder to manage
- Threaded conversations in a single bot — adds significant UI and state complexity
Scope / Effort Estimate
Medium — primarily affects the gateway's session routing layer and the Telegram platform adapter. Session isolation is already partially implemented.
Additional Context
This is somewhat analogous to how IRC bouncers or modern Slack apps handle multi-channel concurrency, but simpler since sessions are stateless per-message.
Feature Description
Support multiple Telegram bots connecting to the same agent (same gateway, different sessions) using the same Telegram account.
Motivation
When working on complex tasks, users often need the same agent to work on multiple things in parallel. Currently the only option is
/background, which has these limitations:/backgroundis awkward and error-proneMultiple parallel sessions (via multiple bots) would allow the agent to simultaneously work on unrelated tasks, each with full interactive feedback capability.
Proposed Solution
Allow multiple Telegram bots under the same account to connect to the same gateway and agent, each with its own independent session. From the user's perspective, they would talk to "Bot A" for Task 1 and "Bot B" for Task 2, while both are powered by the same underlying agent with shared context (optional — could also be isolated per bot).
Potential implementation approaches:
(user_id, bot_token)instead of justuser_id, allowing the same user to have multiple concurrent sessions per botAlternatives Considered
/backgroundwith job queue — only sequential, no mid-task interactivityScope / Effort Estimate
Medium — primarily affects the gateway's session routing layer and the Telegram platform adapter. Session isolation is already partially implemented.
Additional Context
This is somewhat analogous to how IRC bouncers or modern Slack apps handle multi-channel concurrency, but simpler since sessions are stateless per-message.