Expand description
Agent-to-agent delegation tools
Allows agents to delegate tasks to other specialized agents, enabling hierarchical agent architectures and supervisor/worker patterns.
§Example
ⓘ
use cortexai_tools::delegation::*;
// Create agent registry
let registry = AgentRegistry::new(engine.clone());
// Register agents with descriptions
registry.register_agent(
researcher_id,
"Research Agent",
"Specialized in web research and gathering information",
);
registry.register_agent(
writer_id,
"Writer Agent",
"Specialized in writing clear, concise content",
);
// Create delegation tool for supervisor
let delegate_tool = DelegateAgentTool::new(registry);
supervisor_tools.register(Arc::new(delegate_tool));Structs§
- Agent
Info - Information about a registered agent available for delegation
- Agent
Registry - Registry of agents available for delegation
- Delegate
Agent Tool - Tool for delegating tasks to other agents
- List
Agents Tool - Tool for listing available agents
Type Aliases§
- Message
Sender - Callback type for sending messages to agents
- Response
Waiter - Callback type for waiting for agent response