Definition
A micro-agent is a highly focused AI agent with 1-3 steps designed to accomplish a single, well-defined task. Unlike traditional monolithic agents that try to handle entire workflows, micro-agents embrace the Unix philosophy: “do one thing and do it well.”Core Architecture
How chaining actually works
1. Agent creation phase
2. Runtime execution
- Step 1 & 2 execute normally using available tools
- Step 3 triggers
findAndRunAgent
tool internally - The AI recognizes “Run the X agent” pattern and converts to tool call
- New chat is created for the downstream agent
- Context is passed via the
instructions
parameter
3. Context flow
Benefits over monolithic agents
Aspect | Monolithic | Micro-Agent Chain |
---|---|---|
Token Usage | High (full context) | Low (scoped context) |
Failure Recovery | Restart entire flow | Restart single agent |
Debugging | Complex traces | Isolated logs |
Human Review | Overwhelming | Focused chunks |
Reusability | Limited | High (mix & match) |
Cost | Higher | 40-60% lower |
Implementation patterns
Sequential chain
Branching chain
Convergent chain
Technical implementation details
When an agent step contains text like “run the X agent”, the system:- Pattern Recognition: The AI model identifies agent execution intent
- Tool Invocation: Calls
findAndRunAgent
with:agentName
: Extracted from the step descriptioninstructions
: Output from current agent’s executionaddContext
: Set to true to include recent messages
- Chat Creation: New chat is spawned with:
- Title: “Execution of [Agent Name] - triggered by [Parent Agent]”
- Initial context: Instructions + any passed data
- Execution: Child agent runs in isolation with its own:
- Token budget
- Tool access
- Execution logs
- Error handling
Best practices for micro-agent design
- Single Responsibility: Each agent should have ONE clear purpose
- Clear Naming: Use descriptive names like “invoice-validator” not “agent-1”
- Explicit Outputs: Define what data the agent produces
- Error Handling: Include fallback steps for common failures
- Idempotency: Agents should be safe to re-run
Example: complete sales pipeline
Related documentation
- Context Management & Verification - How context flows between agents
- KPI Monitoring - Using search-chat-history for performance tracking
- Multi-User Verification - Distributed approval workflows
- Advanced Use Cases - Creative applications and optimization tips
Need help implementing micro-agent chains? Check our agent creation guide or contact support.