How sessions are created
Sessions are created automatically. When you submit aRunRequest 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:
Listing sessions
GET /api/sessions returns a paginated list of sessions. Filter by user or agent using query parameters.
string
Filter sessions to those belonging to a specific user.
string
Filter sessions to those involving a specific agent.
Getting session details
GET /api/sessions/{sessionId} returns the full AgentSession record, including the stored message history.
404 Not Found if the session does not exist.
Getting run history for a session
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
DELETE /api/sessions/{sessionId} permanently removes the session and its full message history.
204 No Content on success.
Multi-turn conversation example
The following example shows how to maintain a coherent conversation by passing thesessionId across three sequential requests.
1
Start the conversation
Submit your first message without a
sessionId. Save the sessionId from the response.2
Continue the conversation
Pass the
sessionId in your follow-up message. The agent recalls the previous exchange.3
Close the conversation
When the conversation is complete, delete the session to free storage or to comply with data retention policies.
Sessions vs. long-term memory
Sessions and long-term memory serve different roles in Agent Manager:
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.