session command group provides functionality to manage saved session state, including context IDs and task IDs from previous interactions with A2A agents. Sessions are automatically saved after each message and allow you to continue conversations seamlessly.
list
List all saved sessions across all agents.Examples
Output Format
Displays all saved sessions with:- Agent URL: The agent endpoint
- Context ID: Saved conversation context (if available)
- Task ID: Saved task identifier (if available)
show
Display session state for a specific agent.Arguments
URL of the A2A agent whose session to display
Examples
Output Format
Displays the session details:- Context ID: Current conversation context (or “none” if not set)
- Task ID: Current task identifier (or “none” if not set)
Even if no session exists, the command will display “none” for both fields rather than failing. Sessions are created automatically when you first interact with an agent.
clear
Clear saved session state for a specific agent or all agents.Arguments
URL of the A2A agent whose session to clear. Optional if using
--all.Options
Clear all sessions for all agents. Short form:
-aExamples
Output
--all is provided:
Session Storage
Sessions are stored in~/.handler/sessions.json and include:
- agent_url: The agent endpoint
- context_id: Conversation context identifier
- task_id: Task identifier
- Created: When you send your first message to an agent
- Updated: After each message exchange
- Used: When you pass
--continueto message commands
Example Workflow
Session Scope
Sessions are scoped by agent URL:- Each agent URL has its own independent session
- Sessions for
http://localhost:8000andhttp://localhost:8001are separate - Sessions persist across CLI invocations (stored on disk)
Integration with Other Commands
Sessions work seamlessly with message commands:- TUI: The textual interface uses the same session storage
- MCP Server: MCP tools can access and modify sessions
Credentials are managed separately using the
auth commands. Sessions only store context and task IDs, not authentication credentials.