Use this file to discover all available pages before exploring further.
A session is a named context that groups one or more agent runs together. Sessions provide short-term episodic memory: when an agent receives a new message in an existing session, the full message history from that session is reloaded and included in the prompt, allowing the agent to refer back to earlier turns in the conversation. Sessions are the mechanism behind multi-turn chat; without them, each run is stateless and isolated.
Sessions are created automatically. When you submit a RunRequest without a sessionId, Agent Manager generates a new UUID and starts a fresh session. The sessionId is returned in the response so you can use it for follow-up requests.To continue an existing conversation, pass the same sessionId in subsequent RunRequest bodies:
{ "message": "What is our refund policy for enterprise customers?"}
Save the sessionId returned from your first run and pass it in all subsequent runs to maintain a coherent multi-turn conversation.
GET /api/sessions returns a paginated list of sessions. Filter by user or agent using query parameters.
# All sessionscurl http://localhost:8080/api/sessions# Sessions for a specific usercurl "http://localhost:8080/api/sessions?userId=user-123"# Sessions for a specific agentcurl "http://localhost:8080/api/sessions?agentId=finance_agent"# Combine filterscurl "http://localhost:8080/api/sessions?userId=user-123&agentId=finance_agent"
GET /api/sessions/{sessionId}/runs returns all AgentRun records that occurred within a session. Use this to audit the individual executions—including tool calls, reasoning steps, and status—for a given conversation.
Deleting a session removes all message history for that conversation. The agent will have no memory of prior exchanges if you start a new run with the same session ID.
Pass the sessionId in your follow-up message. The agent recalls the previous exchange.
curl -X POST http://localhost:8080/api/agents/finance_agent/runs \ -H "Content-Type: application/json" \ -d '{ "message": "How does that compare to Q4 last year?", "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }'
3
Close the conversation
When the conversation is complete, delete the session to free storage or to comply with data retention policies.
Sessions and long-term memory serve different roles in Agent Manager:
Sessions
Long-term memory
Purpose
Short-term episodic context for a conversation
Persistent semantic facts about a user
Scope
A single conversation thread
All conversations, all time
Storage
Relational database
Vector database
Lifetime
Until deleted or expired
Until explicitly deleted
Retrieval
Chronological message replay
Semantic similarity search
Use sessions to give an agent memory within a conversation. Use long-term memory to give an agent knowledge about a user that should survive across conversations. For more details on long-term memory, see Long-Term Memory: Persistent User Facts.