Skip to content
← Developer Hub

Developer Hub

Agent-to-Agent (A2A)

Connect agents using the Functions Skill and a shared webhook so one agent can call another.

01

Overview

When you want to connect agents — allowing one agent to call another — you can use the raia Functions Skill and a shared webhook endpoint.

The Functions Skill passes the user's query to the target agent, receives its response, and includes that response back into the original conversation.

02

Set Up the Functions Skill

  1. 01

    Open the agent you want to configure and navigate to the Functions Skill.

  2. 02

    Click "Set up Function" to create a new function call.

  3. 03

    Provide function instructions that tell the agent when it should call the other agent. These instructions are added to the core prompt so the AI knows when to trigger the function.

03

Configure the Webhook

Use the generic A2A webhook URL for the function endpoint:

bash
https://raia.app.n8n.cloud/webhook/e60457a0-bc4a-47c3-bae2-3b690db3dee1

Shared endpoint

This webhook is shared across all A2A use cases. The specific target agent is determined by the API key you pass in the header below.
04

Set Function Parameters

For this use case you only need to pass the question the user prompted into the agent. Use the following JSON schema for the function parameters:

json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string"
    }
  }
}
05

Add the Header Variable

Add a custom header so the webhook knows which agent to call:

Header Name

Call_Agent_APIKEY

Header Value

{ API Key of the Agent you want to call }

Keep the key secret

The target agent's API key is sensitive. Do not expose it in client-side code or public repositories.