Delegation
The delegation tool allows PocketPaw to spawn sub-agents for parallel task execution. This is useful for complex tasks that can be broken into independent subtasks.
How It Works
When the agent uses the delegate tool:
- A new Claude subprocess is spawned
- The subtask is sent to the subprocess with its own context
- The subprocess executes independently
- Results are returned to the parent agent
- The parent agent synthesizes the results
Usage
User: Research three different programming languages and compare them
Agent: I'll delegate this to parallel sub-agents. → delegate("Research Python's strengths and ecosystem") → delegate("Research Rust's strengths and ecosystem") → delegate("Research Go's strengths and ecosystem") → [waits for all three] → Synthesizes comparison from resultsConfiguration
Delegation uses the same Anthropic API key as the main agent:
export POCKETCLAW_ANTHROPIC_API_KEY="sk-ant-..."Tool Schema
{ "name": "delegate", "description": "Spawn a sub-agent to handle a specific subtask", "input_schema": { "type": "object", "properties": { "task": { "type": "string", "description": "The task to delegate to the sub-agent" }, "context": { "type": "string", "description": "Additional context for the sub-agent" } }, "required": ["task"] }}Policy Group
Belongs to group:delegation.
Warning
Each delegated task spawns a new Claude API call. Be mindful of API costs when delegating multiple tasks.
Was this page helpful?