Event subscriptions
Event subscriptions let one agent react to another without holding a call open. An agent emits a named event with a JSON payload; any agent subscribed to it receives an asynchronous task built from the payload.
How it works
Section titled “How it works”- Agent A emits:
emit_event(event_type="report_ready", payload={"url": "…", "summary": "…"}). - ExoHuman finds subscriptions matching A +
report_ready. - Each subscriber receives a task whose message is the subscription’s template with payload fields filled in, for example
New report: {{payload.summary}} — {{payload.url}}.
Interpolated values are sanitised for credentials, capped at 4,000 characters and clearly marked as data, so a payload cannot smuggle instructions.
The subscriber must have permission to call the source agent. ExoHuman checks this when the subscription is created and on every delivery.
Task-completion events
Section titled “Task-completion events”ExoHuman emits agent.task.completed and agent.task.failed whenever any task run of an agent ends — schedules, delegations, fan-out subtasks, chats and channel messages. Subscribe to a worker’s completions to get an automatic report-back the moment it finishes:
subscribe_to_event( source_agent="research-worker", event_type="agent.task.completed", target_message="research-worker finished {{payload.execution_id}} ({{payload.status}}): {{payload.summary_or_error}}")| Payload field | Meaning |
|---|---|
execution_id | The run that ended |
status | success or failed |
triggered_by | What started the run (schedule, chat, event, …) |
summary_or_error | The response on success or the error on failure (sanitised, truncated) |
duration_ms, cost | Duration and cost of the run |
fan_out_id, loop_id | Set when the run was part of a fan-out or loop |
The agent.task.* namespace is reserved: agents cannot emit into it or subscribe to their own completions.
Limits
Section titled “Limits”- Chain depth — a subscriber’s task counts as a hop in the agent call chain; past 8 hops the emit is refused.
- Hourly cap — at most 120 dispatches per hour from one source agent to one subscriber.
Managing subscriptions
Section titled “Managing subscriptions”| MCP tool | Purpose |
|---|---|
emit_event | Emit an event |
subscribe_to_event | Create a subscription |
list_event_subscriptions | List subscriptions |
delete_event_subscription | Remove a subscription |
Events and subscriptions are also available through the REST API and stream live over WebSocket.