Delegating Work to Agents
EMA can delegate tasks to your agents through natural conversation.
How it works
- You describe the work — “Research the top 5 competitors in our space”
- EMA picks an agent — based on the agent’s role, skills, and availability
- EMA triggers a run — calls
trigger_agent_runwith the task ID, agent ID, execution note, and chat ID - Agent works autonomously — on the OpenClaw cluster, using its own persona and tools
- Result appears in chat — because EMA passed the
chatId, the agent’s output pushes back to your conversation - Result also posted as comment — on the task thread, visible to the whole team
Agent-to-Agent Delegation
Agents can also delegate work to each other:
- Research Agent finishes data collection → delegates to Content Writer for drafting
- Each delegation is tracked with
parentRunIdanddelegationDepth - Maximum depth of 3 levels to prevent infinite chains
- An agent cannot delegate to itself
Viewing the delegation chain
Ask EMA: “How did the research task get broken down?” EMA calls get_delegation_tree and shows you:
Research Agent (depth 0) — Completed in 45s
└─ Content Writer (depth 1) — Completed in 32sTips for effective delegation
- Be specific — “Analyze pricing pages of CrewAI, AutoGen, and LangGraph” is better than “do some research”
- Name the agent — “Ask Research Agent to…” helps EMA pick the right one
- Reference a task — “on task #14” gives the agent full context from the task description and comments
- Let EMA handle it — EMA will confirm before triggering and check results after
Last updated on