Delegate to a Sub-Agent

This guide shows you how to configure an Agent to delegate work to one or more sub-agents, and how to choose between tool_call and transfer interaction types.

Prerequisites

  • Agent Runtime Operator installed — see Install the Agent Runtime Operator.

  • At least one target sub-agent deployed and reachable (in-cluster Agent resource or remote URL).

Add sub-agents to an Agent

Sub-agents are declared under spec.subAgents. Each entry requires a name and either an agentRef (in-cluster Agent) or a url (remote agent card URL).

Reference an in-cluster Agent

apiVersion: runtime.agentic-layer.ai/v1alpha1
kind: Agent
metadata:
  name: orchestrator-agent
spec:
  framework: google-adk
  subAgents:
    - name: summarizer_agent
      agentRef:
        name: summarizer
        namespace: ai-agents   # omit to default to same namespace
      interactionType: "tool_call"
  protocols:
    - type: A2A
  replicas: 1

Reference a remote Agent

subAgents:
  - name: specialist_agent
    url: "https://agents.example.com/specialist-agent.json"
    interactionType: "transfer"

Choose an interaction type

Value Behaviour

tool_call (default)

The parent agent calls the sub-agent as a tool and receives its response. The parent remains in control of the conversation.

transfer

The parent hands off the conversation to the sub-agent via transfer_to_agent. The sub-agent takes over and interacts directly with the user.

Apply and verify

kubectl apply -f orchestrator-agent.yaml

# Check the Agent resource status
kubectl get agent orchestrator-agent