feat: add /research command with sub-agent delegation

This commit is contained in:
William Valentin
2026-02-17 15:21:11 -08:00
parent 9a2f1e2bb2
commit 2b89024a71
7 changed files with 126 additions and 3 deletions
+24
View File
@@ -441,6 +441,7 @@ pnpm tui:fs
| `/login [provider]` | Authenticate with GitHub (OAuth device flow) |
| `/reset` | Clear history |
| `/status` | Show session info |
| `/research <task>` | Delegate a task to `agent_configs.research` |
| `/compact` | Compact conversation context |
| `/usage` | Show token usage and cost |
| `/context` | Show estimated context-window usage |
@@ -475,6 +476,29 @@ For cloud Zhipu models, ensure `ZHIPUAI_API_KEY` is set or `api_key` is configur
**Note:** The `/model` command works in the TUI only. WebChat sessions inherit the active tier from the daemon.
### Research Agent Quickstart
Add a dedicated research sub-agent and delegate to it with `/research`:
```yaml
agent_configs:
research:
model_tier: complex
tool_profile: messaging
system_prompt: |
You are a research agent. Find, verify, and synthesize information.
Prefer primary sources. Include links and concrete dates.
Keep output structured and concise.
```
Then use:
```bash
/research compare k0s vs k3s for a 3-node homelab in 2026
```
If the `research` agent is not configured, Flynn returns a setup hint with available agent names.
## Running as Service
```bash