Service Composition (Agent-to-Agent Calls)
How one agent can invoke another via Execute Workflow node; the callee is billed to its own owner's budget (owner-pays)
Written By Philippe
Last updated 2 days 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
The callee runs as its own webhook execution, billed to the callee owner's budget (owner-pays). The caller's budget is not charged for the callee β there is no second charge against the caller.
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
The callee runs as its own webhook execution, billed to the callee owner's budget (owner-pays). The caller's budget is not charged for the callee, and there is no second settlement against the caller:
Billing Example:
- Caller execution: $0.01 β paid from the caller's budget to the caller's builder
- Callee execution: $0.15 β paid from the callee owner's budget to the callee's builder
- The caller is charged only $0.01; the callee's $0.15 is not deducted from the caller's budget
A sub-workflow that runs in-process under the parent run (same execution) is a single charge β it is never billed separately.