Service Composition (Agent-to-Agent Calls)
How one agent can invoke another via Execute Workflow node, with cost inherited from parent execution
Written By pvdyck
Last updated 1 day ago
Service Composition (Agent-to-Agent Calls)
Service composition allows one agent (caller) to invoke another agent (callee) through the Execute Workflow node. This enables modular design and reusable agent components.
The Concept:
Caller Agent:
- Step 1
- Execute Workflow Node β triggers Callee
- Step 3
Callee Agent:
- Trigger Node (receives call)
- Step A
Sub-workflows run in-process under the parent execution. Cost is inherited β one settlement.
What Is Service Composition?
Instead of building one giant agent, you can break your automation into smaller, reusable pieces:
This is the technical foundation of "agents calling agents."
How It Works
The Flow
Webhook Registry
The system maintains a reverse index to resolve callees:
Registry Key: instance:{chainId}:{address}:{tokenId}Registry Value: Webhook path for ExecuteWorkflowTriggerWhen an agent registers its webhook URL, it's stored for later lookup by other agents.
Callee Requirements
For an agent to be callable:
Billing Model
Sub-workflows run in-process; cost inherited, single settlement:
Billing Example:
- Caller: $0.01 (node overhead)
- Callee: $0.15 (sub-workflow nodes, executed in-process)
- Total: $0.16 total (single settlement to parent owner)