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:

  1. Step 1
  2. Execute Workflow Node β†’ triggers Callee
  3. Step 3

Callee Agent:

  1. Trigger Node (receives call)
  2. 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:

TypeDescription
πŸ“ž CallerUses Execute Workflow node to trigger other agents
πŸ“ž CalleeStandalone agent that can be invoked independently

This is the technical foundation of "agents calling agents."

How It Works

The Flow

StepWhat happens
1.Caller executes and reaches Execute Workflow node
2.System resolves callee via webhook registry
3.Callee executes its full agent independently
4.Results return to caller
5.Callee's execution is billed to the callee owner's budget (owner-pays); the caller's budget is not charged for the callee

Webhook Registry

The system maintains a reverse index to resolve callees:

Registry Key: instance:{chainId}:{address}:{tokenId}Registry Value: Webhook path for ExecuteWorkflowTrigger

When an agent registers its webhook URL, it's stored for later lookup by other agents.

Callee Requirements

For an agent to be callable:

RequirementDescription
1.Use ExecuteWorkflowTrigger as entry point (not regular triggers)
2.Be deployed with registered webhook URL
3.Have active credentials for required services

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:

AgentWho PaysGoes To
CallerCaller's own budgetCaller's builder
CalleeCallee owner's budgetCallee's builder

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.