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:

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

Callee Agent:

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

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.Sub-workflows share the parent's cost context β€” single settlement

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

Sub-workflows run in-process; cost inherited, single settlement:

WorkflowWhat You PayCovers
CallerFull execution including sub-agent costAll nodes (caller + callee), API calls, resources
CalleeRuns in-processNo separate billing β€” cost flows to parent

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)