Use Case
A planner agent triages an issue and creates an implementation plan. It calls a dev agent to implement it, then calls a reviewer agent to review the PR.al-subagent: Fire a call
Pass context to another agent via stdin:
al-subagent-check: Non-blocking status
Check if a call has finished without waiting:
al-subagent-wait: Block until done
Wait for one or more calls to complete:
al-return: Send back a result
The called agent uses al-return to send a value back to the caller:
Multi-call Pattern
Fire several calls, continue working, then collect all results:Complete Example: SKILL.md
Here’s a planner agent that delegates to dev and reviewer:Rules
- No self-calls — an agent cannot call itself (the call is rejected)
- Call depth limit — chains like A → B → C are allowed up to
maxCallDepth(default: 3) - Queuing — if all runners for the target agent are busy, the call is queued (up to
workQueueSize, default: 100) - No reruns — called agents do not re-run. They respond to the single call.
- Gateway required — call commands require the gateway. They return errors if
GATEWAY_URLis not set.
What the Called Agent Sees
The called agent receives a<skill-subagent> block in its prompt with:
- The name of the calling agent
- The context string passed via stdin
SKILL.md should handle this trigger type:
Next steps
- Agent Commands — full call command syntax and responses
- Agents (concepts) — runtime lifecycle and trigger types