Overview
A2A sessions represent active ACP agents exposed through the A2A protocol. Each session maps to an underlying ACP session and provides federation capabilities for external AI systems.Session Info Structure
Listing Sessions
HTTP API
TypeScript API
Getting a Single Session
HTTP API
TypeScript API
Session Capabilities
Each session exposes capabilities based on its provider:Base Capabilities
All sessions support:ACP Session Methods
ACP-based sessions support:Routa Coordination Tools
Routa sessions expose multi-agent coordination:Session Naming
Session names follow this format:routa-opencode-abc12345routa-claude-def67890routa-gemini-ghi11121
Session Status
Currently, all active sessions report status"connected".
Future enhancements may include:
initializing- Session starting upidle- No active taskbusy- Task in progresserror- Session encountered an errordisconnected- Session terminated
Integration with HTTP Session Store
A2A sessions are backed by Routa’s HTTP session store:Session Lifecycle
1. Session Creation
Sessions are created when an ACP agent is spawned:2. Session Discovery
External systems discover the session via:- Agent Card - GET
/api/a2a/card - Session List - GET
/api/a2a/sessions
3. Session Usage
External systems interact via JSON-RPC:4. Session Termination
Sessions terminate when:- ACP agent process exits
- Session timeout (if configured)
- Manual cancellation via
session/cancel
Session Persistence
Sessions can be persisted and restored:Example: Creating and Exposing a Session
Session Filtering
While not currently implemented, sessions could be filtered by:Security Considerations
Authentication
Currently, A2A endpoints are not authenticated. In production:- Add API keys - Require authentication headers
- Rate limiting - Prevent abuse
- Session ownership - Verify caller owns the session
Session IDs
Session IDs are UUIDs and should be treated as secrets:Best Practices
- Use base URLs correctly - Always pass the correct base URL to
listSessions() - Check session existence - Use
getSession()before calling RPC methods - Handle session termination - Sessions may disappear at any time
- Monitor session count - Limit concurrent sessions to avoid resource exhaustion
- Clean up old sessions - Remove completed sessions periodically