a2a_server is configured in endpoints.yml, Rasa registers A2A JSON-RPC routes on the same Sanic port as REST and channel webhooks.
An external orchestrator discovers capabilities via AgentCard, sends user turns, and receives task lifecycle updates mapped from Rasaβs dialogue state.
This page describes the sub-agent (server) architecture. For Rasa as an orchestrator that calls external A2A agents, see Integrating External Agents via A2A.
For configuration and operations, see A2A Server and Exposing Rasa as an A2A Sub-Agent.
Deployment topology
The governed agent contract
Rasa exposes a bounded contract to orchestrators. Internal dialogue machinery stays private.What Rasa exposes
What Rasa keeps internal
End-user identity and backend context belong in A2A
message.metadata, DataPart slot pre-seeding, or orchestrator-side session management β not in the sub-agent JWT.
Context and task mapping
ConversationInactive and tracker inactivity do not release an input_required context.
With start_session_after_expiry: false (required for A2A), the next message on the same contextId resumes the flow without running action_session_start.
Task state lifecycle
After each message is processed,TaskStateMapper derives the A2A task state from the dialogue stack and latest action.
Evaluation follows this priority order:
auth_requiredβ orchestrator bearer token missing or invalidrejectedβCannotHandlePatternFlowStackFrameactive (outside jurisdiction)failedβInternalErrorPatternFlowStackFrameactivecanceledβCancelPatternFlowStackFrameactive or orchestratortasks/cancelcompletedβ user-facing flow emittedFlowCompletedthis turn; no user flows remain on the stack; bot waits for user input (even whenpattern_completedis active ataction_listen)input_requiredβCompletedPatternFlowStackFrameactive; no user flows on stack;include_conversation_repairistrue; bot waits for user input; no user flow completed this turncompletedβCompletedPatternFlowStackFrameactive and no user flows on stack (including when conversation repair is disabled)input_requiredβ last action waits for user input (collect step, greet, etc.)workingβ otherwise (processing or mid-turn streaming)
State reference
When
include_conversation_repair: false, conversation-repair stack frames map to completed instead of input_required.
Message processing path
- Optional bearer JWT is validated (orchestrator auth).
- Orchestrator slot pre-seeding is applied as
SetSlotCommands before dialogue processing. - Rasa executes flows via the standard CALM pipeline.
A2AOutputChannelmaps tracker state to A2A task updates, including structuredDataPartandTextPart.- Optional push notification POSTs fire on state transitions when enabled.
Scaling constraints (in v3.17)
Until persistent A2A task and message stores ship:SANIC_WORKERS=1per replica β idempotency, cancel, andmax_contextsare per-worker.- Horizontal scaling β add replicas with load balancer sticky routing keyed on
contextIdso the same orchestrator context hits the same pod. A2A task caches, deduplication, in-flight queues, and push config are in-memory per replica until persistent stores ship. Derive the routing key from the JSON bodycontextId, theX-A2A-Context-Idheader, or ana2a-context-idcookie set by the ingress. See Multi-replica load balancing. - Hot model reload β
PUT /modeldoes not refresh the AgentCard or re-wire the A2A executor; restart after model deploys that change advertised skills.