You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delegation allows the lead to spawn work on member agents. Handoff transfers conversation control between agents without interrupting the user's session.
3
+
Delegation allows the lead to assign work to member agents via the task board. Handoff transfers conversation control between agents without interrupting the user's session.
4
4
5
5
## Agent Delegation Flow
6
6
7
+
Delegation works through the `team_tasks` tool — the lead creates a task with an assignee, and the system auto-dispatches it to the assigned member:
8
+
7
9
```mermaid
8
10
flowchart TD
9
-
LEAD["Lead receives user request"] --> DELEGATE["1. Delegate to member<br/>spawn agent=member,<br/>task='do the work'"]
MEMBER --> COMPLETE["3. Task auto-completed<br/>with result"]
15
+
COMPLETE --> ANNOUNCE["4. Result announced<br/>back to lead"]
13
16
14
17
subgraph "Parallel Delegation"
15
-
DELEGATE2["spawn member_A"] --> RUNA["Member A works"]
16
-
DELEGATE3["spawn member_B"] --> RUNB["Member B works"]
18
+
CREATE2["create task → member_A"] --> RUNA["Member A works"]
19
+
CREATE3["create task → member_B"] --> RUNB["Member B works"]
17
20
RUNA --> COLLECT["Results accumulate"]
18
21
RUNB --> COLLECT
19
22
COLLECT --> ANNOUNCE2["Single combined<br/>announcement to lead"]
20
23
end
21
24
```
22
25
23
-
## Task Linking
26
+
> **Note**: The `spawn` tool is for **self-clone subagents only** — it does not accept an `agent` parameter. To delegate to a team member, always use `team_tasks(action="create", assignee=...)`.
24
27
25
-
Delegations can optionally link to a team task via `team_task_id`. For v2 teams, **if you omit `team_task_id`, the system auto-creates a task** — you don't need a separate create step:
28
+
## Creating a Delegation Task
26
29
27
-
```json
28
-
{
29
-
"action": "spawn",
30
-
"agent": "analyst_agent",
31
-
"task": "Analyze the market trends in the Q1 report"
32
-
}
33
-
```
34
-
35
-
The system auto-creates a task and links the delegation. You can also provide an explicit task ID:
30
+
Use the `team_tasks` tool with `action: "create"` and a required `assignee`:
36
31
37
32
```json
38
33
{
39
-
"action": "spawn",
40
-
"agent": "analyst_agent",
41
-
"task": "Analyze the market trends in the Q1 report",
-`system_prompt` — Extra system prompt for this group
@@ -105,9 +107,37 @@ Group config keys:
105
107
106
108
In groups, bot responds only to messages that mention it (default `require_mention: true`). When not mentioned, messages are stored in a pending history buffer (default 50 messages) and included as context when the bot is mentioned. Replying to a bot message counts as mentioning it.
107
109
110
+
#### Mention Modes
111
+
112
+
| Mode | Behavior | Use case |
113
+
|------|----------|----------|
114
+
|`strict` (default) | Only respond when @mentioned or replied to | Single-bot groups |
115
+
|`yield`| Respond to all messages UNLESS another bot/user is @mentioned| Multi-bot shared groups |
116
+
117
+
**Yield mode** enables multiple bots to coexist in one group without conflicts:
118
+
- Bot responds to all messages where no specific @mention targets another bot
119
+
- If a user @mentions a different bot, this bot stays silent (yields)
120
+
- Messages from other bots are automatically skipped to prevent infinite cross-bot loops
121
+
- Cross-bot @commands still work (e.g., `@my_bot help` sent by another bot)
122
+
123
+
```json
124
+
{
125
+
"channels": {
126
+
"telegram": {
127
+
"mention_mode": "yield",
128
+
"require_mention": false
129
+
}
130
+
}
131
+
}
132
+
```
133
+
108
134
```mermaid
109
135
flowchart TD
110
-
MSG["User posts in group"] --> MENTION{"Bot @mentioned<br/>or reply?"}
136
+
MSG["User posts in group"] --> MODE{"mention_mode?"}
@@ -232,7 +262,7 @@ Each Telegram instance maintains an isolated HTTP transport — no shared connec
232
262
233
263
| Issue | Solution |
234
264
|-------|----------|
235
-
| Bot not responding in groups | Ensure privacy mode is disabled via @BotFather (`/setprivacy` → Disable). Then check `require_mention=true` (default) — mention bot or reply to its message. |
265
+
| Bot not responding in groups | Ensure privacy mode is disabled via @BotFather (`/setprivacy` → Disable). Then check `require_mention=true` (default) — mention bot or reply to its message. For multi-bot groups, try `mention_mode: "yield"`. |
236
266
| Media downloads fail | Verify bot has `Can read all group messages` in @BotFather (`/setprivacy` → Disable). Check `media_max_bytes` limit. |
237
267
| STT transcription missing | Verify STT proxy URL and API key. Check logs for timeout. |
238
268
| Streaming not working | Enable `dm_stream` or `group_stream`. Ensure provider supports streaming. |
@@ -245,4 +275,4 @@ Each Telegram instance maintains an isolated HTTP transport — no shared connec
Copy file name to clipboardExpand all lines: core-concepts/how-goclaw-works.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ graph TD
15
15
GW --> SC[Scheduler<br/>4 lanes]
16
16
SC --> AL[Agent Loop<br/>Think → Act → Observe]
17
17
AL --> PR[Provider Registry<br/>18+ LLM providers]
18
-
AL --> TR[Tool Registry<br/>33+ built-in tools]
18
+
AL --> TR[Tool Registry<br/>50+ built-in tools]
19
19
AL --> SS[Session Store<br/>PostgreSQL]
20
20
AL --> MM[Memory Store<br/>Vector + FTS]
21
21
PR --> LLM[LLM APIs<br/>OpenAI / Anthropic / ...]
@@ -37,7 +37,7 @@ If the LLM wants to use a tool (search the web, read a file, run code), GoClaw e
37
37
38
38
The tool results go back to the LLM. It can call more tools or generate a final response. This loop repeats up to 20 iterations per turn.
39
39
40
-
GoClaw detects tool loop patterns: a **warning** is raised after 3 identical consecutive calls, and the loop is **force-stopped** after 5 identical no-progress calls.
40
+
GoClaw detects tool loop patterns: a **warning** is raised after 3 identical consecutive calls, and the loop is **force-stopped** after 5 identical no-progress calls. Note: `exec`/`bash` tools and MCP bridge tools (`mcp_*` prefix) are treated as **neutral** — they neither reset nor increment the read-only streak, since their side effects are ambiguous.
41
41
42
42
```mermaid
43
43
graph LR
@@ -82,7 +82,7 @@ Each lane has its own semaphore. This prevents cron jobs from starving user mess
82
82
|-----------|-------------|
83
83
|**Gateway**| HTTP + WebSocket server on port 18790 |
84
84
|**Provider Registry**| Manages 18+ LLM provider connections and credentials |
85
-
|**Tool Registry**|33+ built-in tools with policy-based access control (extensible via MCP and custom tools) |
85
+
|**Tool Registry**|50+ built-in tools with policy-based access control (extensible via MCP and custom tools) |
Copy file name to clipboardExpand all lines: providers/ollama.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,10 +21,27 @@ Ollama lets you run large language models on your own machine. GoClaw connects t
21
21
}
22
22
```
23
23
24
+
## Docker Deployment
25
+
26
+
When running GoClaw inside Docker, `localhost` and `127.0.0.1` in provider URLs are automatically rewritten to `host.docker.internal` so the container can reach Ollama running on the host machine. No manual configuration needed.
27
+
28
+
If Ollama is running on a different host, set the full URL explicitly:
0 commit comments