#Can I create Multi thread support like krill and how?
1 messages · Page 1 of 1 (latest)
Yep, but on Telegram the equivalent is topics, not Discord-style threads.
How to do it:
- Make the Telegram chat a forum-enabled supergroup.
- Add your bot there.
- Configure per-topic routing, for example:
{
channels: {
telegram: {
groups: {
"-1001234567890": {
topics: {
"1": { agentId: "main" },
"3": { agentId: "coder" },
"5": { agentId: "support" }
}
}
},
threadBindings: {
spawnSubagentSessions: true,
spawnAcpSessions: true
}
}
}
}
What that gives you:
- each Telegram topic gets its own isolated session
- each topic can use a different agent
- ACP sessions can bind to a topic with
/acp spawn <agent> --thread auto - you can also bind an existing topic with
/focus <target>
A couple important details:
- for Telegram, this is mainly for forum topics in groups/supergroups
- OpenClaw stores them as
chatId:topic:topicId - OpenClaw can also create Telegram topics via the
topic-createaction
Docs:
- https://docs.openclaw.ai/channels/telegram
- https://docs.openclaw.ai/tools/acp-agents
- https://docs.openclaw.ai/tools/slash-commands
If you want, I can give you a complete working Telegram config for your exact use case, like “one topic per agent” vs “spawn a fresh topic per Codex session.”
Can I create Multi thread support like krill and how to do that in telegram?
Yes, but in Telegram it’s topics, not Discord threads.
If you want Krill-style “multiple thread/workspace” behavior in Telegram:
- Use a forum-enabled Telegram supergroup
- Add your bot
- Configure per-topic routing, for example:
{
channels: {
telegram: {
groups: {
"-1001234567890": {
topics: {
"1": { agentId: "main" },
"2": { agentId: "support" },
"3": { agentId: "coder" }
}
}
},
threadBindings: {
spawnSubagentSessions: true,
spawnAcpSessions: true
}
}
}
}
That gives you:
- one separate session per topic
- optional different agent per topic
- ACP/Codex/Claude sessions can bind with
/acp spawn <agent> --thread auto
Useful docs:
If you want, I can write the exact config for either:
- one fixed topic per agent, or
- auto-create a fresh topic/session each time.
but there will be so may topics for different people?
Yeah, that’s the downside. If you do 1 topic per person, it can get messy fast.
I’d usually recommend one of these instead:
-
One shared topic
- simplest
- good for small groups
-
A few fixed topics
- like
support,coding,random,ops - best balance for Telegram
- like
-
DM for personal conversations, group topics for shared ones
- probably the cleanest setup
So technically, yes, you can do per-person topics, but I wouldn’t recommend it unless the group is small or you auto-clean/archive them.
If you want Krill-like support in Telegram, I’d do:
- group topics by purpose
- DM for user-specific threads
If you want, I can sketch the best Telegram architecture for:
- small community
- support server
- per-user private assistant
so i need to turn off allowlist? how is that safe
No, you do not need to turn off allowlist.
Safer setup is:
- keep the group itself allowlisted under
channels.telegram.groups - keep
groupPolicy: "allowlist" - allow only specific people with
groupAllowFromor per-group/per-topicallowFrom
So safety is split into two checks:
- Which Telegram groups are allowed
- Which users inside those groups are allowed
Example:
{
channels: {
telegram: {
groupPolicy: "allowlist",
groups: {
"-1001234567890": {
requireMention: true,
allowFrom: ["123456789", "987654321"], // only these users
topics: {
"42": {
allowFrom: ["123456789"] // optional tighter rule for one topic
}
}
}
}
}
}
}
So:
groupPolicy: "open"= anyone in that allowed group can talk to the botgroupPolicy: "allowlist"= only approved users can
If you’re worried about safety, I’d keep:
groupPolicy: "allowlist"requireMention: true- explicit
allowFrom/groupAllowFrom
That’s the safe version.