Skip to Content
EMA AssistantDelegating Work

Delegating Work to Agents

EMA can delegate tasks to your agents through natural conversation.


How it works

  1. You describe the work — “Research the top 5 competitors in our space”
  2. EMA picks an agent — based on the agent’s role, skills, and availability
  3. EMA triggers a run — calls trigger_agent_run with the task ID, agent ID, execution note, and chat ID
  4. Agent works autonomously — on the OpenClaw cluster, using its own persona and tools
  5. Result appears in chat — because EMA passed the chatId, the agent’s output pushes back to your conversation
  6. 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 parentRunId and delegationDepth
  • 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 32s

Tips 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