Overview
Rasa can act as an intelligent orchestrator that coordinates a network of multiple agents through the Agent-to-Agent (A2A) protocol. This is particularly useful when at least one of the agents is externally built, i.e. by a different department, by a third party, or itβs a legacy project on a different tech stack. Integrating each of these agents into a single system enables contextually rich conversations through single unified conversational interface.Inverse role β Rasa as an A2A sub-agentThis guide covers Rasa as the orchestrator that calls external A2A agents.
If you need the opposite β an external orchestrator calling your Rasa assistant β see Exposing Rasa as an A2A Sub-Agent and the A2A Server reference.
The Orchestrator Model
In this architecture, your Rasa agent serves as the orchestrator that:- Owns the conversation flow - Determines when and which external agents to involve
- Manages business logic - Enforces business rules, compliance, and conversation patterns
- Controls agent handoffs - Decides when to delegate tasks and when to resume control
- Maintains conversation context - Preserves user context across different agent interactions
- Allows context engineering - Allows fine-grained control over context passed between agents
- Handles final responses - Ensures consistent user experience regardless of which agent provided the information
Configuring External Sub-Agents
Registering the sub agent
Configure external sub agents in thesub_agents/ folder of your Rasa agent:
config.yml defined for each external agent -
sub_agents/analytics_agent/config.yml
Supporting long-running tasks
If the external A2A agent performs long-running work, configure background push mode so Rasa can keep the conversation responsive while the remote task continues. The external agent card must advertisecapabilities.pushNotifications: true, and the sub-agent configuration must include the public Rasa base URL:
The agent_card value can be a local file path or a URL.
sub_agents/analytics_agent/config.yml
/agent/task_update to push_notification_url.
When a background A2A task is still running and the user sends another message, Rasa triggers pattern_external_agent_processing; the default response is utter_agent_busy.
For channel-specific delivery behavior and fallback behavior, see Long-running tasks with push notifications.
Invoking the External Agent
The orchestrating layer in Rasa provides you the control to invoke an external agent when your business logic needs you to do so by using thecall step in a flow -
flows.yml
Context Management
The orchestrating agent in Rasa can control what context is shared with external agents by customizing the client interfacing with the external agent. To do so, define a custom python module -sub_agents/analytics_agent/custom_agent.py
sub_agents/analytics_agent/config.yml