/rasa-agent-skills:rasa-setting-up-a2a-agentsfrom rasa-agent-skills
Connects external sub agents to a Rasa CALM assistant via the A2A (Agent-to-Agent) protocol. Covers agent card configuration, authentication, input/output customization, and flow invocation.
Ships in rasa-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
External sub agents connected via the A2A protocol operate as autonomous entities that
handle complex, multi-turn conversations independently. When invoked through a call
step in a flow, the external agent takes control of the conversation until its task is
complete.
This feature is in beta and available starting from Rasa 3.14.0.
sub_agents/<agent_name>/ with a config.yml
(see "Directory structure").agent.protocol: A2A and point configuration.agent_card to the agent card
file or URL (see "Configuration").call step
(see "Invoking from a flow").Each A2A sub agent lives in its own subdirectory under sub_agents/. Both rasa train
and rasa run scan this directory by default; pass --sub-agents <path> to either
command to use a different directory.
The agent name must be unique across all sub agents and all flow IDs.
your_project/
├── config.yml
├── domain/
├── data/flows/
└── sub_agents/
└── car_shopping_agent/
├── config.yml # required
├── agent_card.json # local agent card (or use a URL instead)
└── custom_agent.py # optional customization module
The config.yml requires agent.protocol: A2A and a configuration.agent_card
pointing to either a local JSON file (relative to project root) or a remote URL.
# sub_agents/car_shopping_agent/config.yml
agent:
name: car_shopping_agent
protocol: A2A
description: "Helps users shop for cars by connecting them with dealers"
configuration:
agent_card: ./sub_agents/car_shopping_agent/agent_card.json
| Key | Required | Description |
|---|---|---|
agent.name | yes | Unique name — must not clash with any flow ID |
agent.protocol | yes | Must be A2A for external sub agents |
agent.description | yes | Brief description of the agent's capabilities |
configuration.agent_card | yes | Path or URL to the A2A agent card |
configuration.module | no | Python class path for customization |
Do not create the agent card yourself — it is supplied by the external agent's
provider. Your job is to obtain it (as a JSON file or URL) and reference it in
configuration.agent_card. Rasa reads the card at startup to resolve the agent's
endpoint, transport, and auth requirements, then health-checks the connection. If the
agent is unreachable, startup fails.
Add an auth section under configuration in the sub agent's config.yml
(sub_agents/<agent_name>/config.yml) when the external agent requires credentials.
Sensitive values (api_key, token, client_secret) must use ${ENV_VAR}
syntax — plain text is rejected by validation.
Sent as Authorization: Bearer <key> by default. Add header_name and
header_format to override the header.
configuration:
agent_card: ./sub_agents/shopping_agent/agent_card.json
auth:
api_key: "${API_KEY}"
header_name: "X-API-Key" # optional, default: Authorization
header_format: "{key}" # optional, default: Bearer {key}
auth:
oauth:
client_id: "${CLIENT_ID}"
client_secret: "${CLIENT_SECRET}"
token_url: "https://auth.company.com/oauth/token"
scope: "read:users"
auth:
token: "${ACCESS_TOKEN}"
Use an autonomous call step to delegate part of a conversation to the external
agent. The agent name must match agent.name in the sub agent's config.yml.
flows:
shop_for_car:
description: Helps users browse and purchase a car through an external agent.
steps:
- collect: user_budget
- call: car_shopping_agent # runs until the external agent signals completion
- action: utter_purchase_summary
Do not use exit_if — it is only supported for ReAct sub agents. The external
agent controls its own completion via the A2A protocol.
When designing the external agent's response behavior:
COMPLETED.Message to
INPUT_REQUIRED, so the conversation stays open and never completes.By default Rasa sends all conversation slots to the external agent and passes the agent's response straight back. Customization is optional — only create a custom class when you need to:
user_budget and car_type, not every slot in the conversation).sub_agents/car_shopping_agent/custom_agent.py).A2AAgent and override process_input and/or process_output.configuration.module to the class.from rasa.agents.protocol.a2a.a2a_agent import A2AAgent
from rasa.agents.schemas import AgentInput, AgentOutput
from rasa.sdk.events import SlotSet
class CarShoppingAgent(A2AAgent):
async def process_input(self, input: AgentInput) -> AgentInput:
input.slots = [s for s in input.slots if s.name in {"user_budget", "car_type"}]
return input
async def process_output(self, output: AgentOutput) -> AgentOutput:
if output.structured_results:
results = output.structured_results[-1]
output.events = output.events or []
output.events.append(SlotSet("selected_car", results))
return output
# sub_agents/car_shopping_agent/config.yml
agent:
name: car_shopping_agent
protocol: A2A
description: "Helps users shop for cars"
configuration:
agent_card: ./sub_agents/car_shopping_agent/agent_card.json
module: "sub_agents.car_shopping_agent.custom_agent.CarShoppingAgent"
process_input(input: AgentInput) -> AgentInput — modify what the external agent
receives. Key fields on AgentInput:
| Field | Type | What to do with it |
|---|---|---|
slots | List[AgentInputSlot] | Filter to only relevant slots |
user_message | str | Rewrite or augment the user message |
conversation_history | str | Trim or redact sensitive history |
metadata | Dict[str, Any] | Inject custom metadata |
process_output(output: AgentOutput) -> AgentOutput — modify what comes back into
Rasa. Key fields on AgentOutput:
| Field | Type | What to do with it |
|---|---|---|
events | Optional[List[SlotSet]] | Add SlotSet events to store data in Rasa slots |
structured_results | Optional[List] | Read raw results from agent tool calls |
response_message | Optional[str] | Rewrite the message sent to the user |
protocol: A2A — without this, Rasa defaults to the RASA protocol and
treats the agent as a ReAct sub agent, which will fail.exit_if with A2A agents — exit_if is only supported for ReAct sub
agents. A2A agents control their own completion via the A2A protocol.Message objects keeps the
conversation in INPUT_REQUIRED indefinitely. Use Task objects for the main
workflow so the agent can signal COMPLETED.INPUT_REQUIRED or COMPLETED.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
18 skills in this plugin
/rasa-building-flowsBuilds conversation flows for Rasa CALM assistants using YAML. Use when creating or editing flows, designing flow architecture, adding branching logic, writing flow and collect step descriptions, or connecting flows with call and link steps.
/rasa-building-skillsBuilds skills (capabilities) for a Rasa CALM assistant. Use when the user asks to create, add, or build a skill, capability, or feature for their Rasa assistant.
/rasa-calling-mcp-tools-from-flowsCalls MCP tools directly from Rasa flow steps. Use when invoking an MCP tool via a call step, mapping slot values to tool parameters, or extracting tool results into slots. This replaces custom action code for simple API integrations.
npx claudepluginhub rasahq/rasa-agent-skills --plugin rasa-agent-skills