Agent-as-tool
Convert an agent into a tool that another agent can call:getAgentsAsTools() wraps each agent as a tool. The orchestrator decides when to call each agent based on its system prompt. Each sub-agent runs its own tool loop independently.
Single agent-as-tool
For wrapping a single agent:Workflow-based composition
For deterministic multi-agent pipelines, use workflows:When to use which
| Pattern | Use when |
|---|---|
| Agent-as-tool | The orchestrator decides dynamically which agents to call and in what order |
| Workflow | The execution order is known in advance (sequential, parallel, or branching) |
Agent registry
All agents inagents/ are registered automatically. Access them programmatically:
Next
- Providers: configure OpenAI, Anthropic, and Google
- Middleware: add auth and rate limiting to your agents
Related
veryfront/agent: agent API referenceveryfront/workflow: workflow API reference