feat(subagents): add multi-turn subagent session runtime

This commit is contained in:
William Valentin
2026-02-26 13:07:34 -08:00
parent e887c3c964
commit 2171346116
21 changed files with 1111 additions and 12 deletions
+29
View File
@@ -793,6 +793,35 @@ Or via tools:
{"name":"council.run","args":{"task":"design a 30-day plan to cut CI flakiness by 50%"}}
```
### Subagent Sessions (`subagent.*` tools)
Flynn now supports multi-turn child agent sessions scoped to the current parent session.
Available tools:
- `subagent.spawn` — create a child session from an `agent_configs.<name>` profile
- `subagent.send` — send follow-up work to an existing child session
- `subagent.list` — list active child sessions
- `subagent.cancel` — request cancellation for a running child turn
- `subagent.delete` — remove a child session and clear its history
Example flow:
```json
{"name":"subagent.spawn","args":{"agent":"research","subagent_id":"plan-research","task":"Survey backup strategies for a 3-node homelab."}}
{"name":"subagent.send","args":{"subagent_id":"plan-research","message":"Now compare operational risk and recovery-time tradeoffs."}}
{"name":"subagent.list","args":{}}
```
Config controls:
```yaml
agents:
subagents:
enabled: true
max_active_sessions: 6
```
## Running as Service
### Ollama (Recommended)