fix: wire named agents + 7 tests for managed agents#36
Conversation
Named agents (agents/*.md): - agent_name field in subagent tool spec - Lookup AgentDef → use its model, tools, instructions - Instructions prepended to task prompt - Tool filter and model from AgentDef used as defaults Tests (183→190): - SubagentSpawner: max_concurrent, background poll, list, shared context - ManagedAgentConfig: parse, validate bad values, defaults
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe changes introduce agent definition support to ConversationRuntime, enabling the Changes
Sequence DiagramsequenceDiagram
participant Agent as Conversation Agent
participant Runtime as ConversationRuntime
participant Agents as Agents Registry
participant SubTool as Subagent Tool Handler
participant Task as Task Executor
Agent->>Runtime: dispatch_tool("subagent", {agent_name: "foo"})
Runtime->>Runtime: lookup agent_name in self.agents
Runtime->>Agents: AgentDef found
Agents-->>Runtime: return AgentDef (model, tools, instructions)
Runtime->>SubTool: construct sub_prompt with agent instructions
SubTool->>Task: run_task(model_override: agent.model)
Task-->>SubTool: result
SubTool-->>Runtime: tool result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Named agents wired to subagent dispatch
{"task": "review auth", "agent_name": "reviewer"}Looks up
agents/reviewer.md→ uses its model, tools, instructions.7 new tests (183→190)
Addresses CodeRabbit gap: named agents were visible in prompt but not routed.
Summary by CodeRabbit
New Features
Tests