Get Session Runs
Storage and ownership
Start the example API server and create a run or precreate a session. Keep the returned session_id. Use db_id when multiple registered databases exist; selecting table requires db_id and a configured adapter. It does not create a table on demand.
The session-type query parameter is type=agent, type=team or type=workflow. JWT user isolation is opt-in; non-admin service-account PAT callers always self-scope. A supplied user_id is a filter for unscoped callers, not permission to access another owner's records. Configured authorization also requires the relevant session read, write or delete scope.
Response shape
The response is a JSON array of run records, such as [] for a session with no runs. The generated single-object example is not the current envelope. Each record is an API projection with ISO timestamps. Select the correct type and keep the request's session ID when consuming the result.
/sessions/{session_id}/runsRetrieve all runs (executions) for a specific session with optional timestamp filtering. Runs represent individual interactions or executions within a session. Response schema varies based on session type.
Authorization
HTTPBearer In: header
Path Parameters
Session ID to get runs from
Query Parameters
Session type (agent, team, or workflow). If not provided, auto-detected from session data.
User ID to query runs from
Filter runs created after this Unix timestamp (epoch time in seconds)
Filter runs created before this Unix timestamp (epoch time in seconds)
Database ID to query runs from
Table to query runs from
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl --request GET 'https://example.com/sessions/string/runs'{ "run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340", "parent_run_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0", "agent_id": "basic-agent", "user_id": "", "run_input": "Which tools do you have access to?", "content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!", "run_response_format": "text", "reasoning_content": "", "metrics": { "input_tokens": 82, "output_tokens": 56, "total_tokens": 138, "time_to_first_token": 0.047505500027909875, "duration": 4.840060166025069 }, "messages": [ { "content": "<additional_information>\n- Use markdown to format your answers.\n- The current time is 2025-09-08 17:52:10.101003.\n</additional_information>\n\nYou have the capability to retain memories from previous interactions with the user, but have not had any interactions with the user yet.", "from_history": false, "stop_after_tool_call": false, "role": "system", "created_at": 1757346730 }, { "content": "Which tools do you have access to?", "from_history": false, "stop_after_tool_call": false, "role": "user", "created_at": 1757346730 }, { "content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!", "from_history": false, "stop_after_tool_call": false, "role": "assistant", "metrics": { "input_tokens": 82, "output_tokens": 56, "total_tokens": 138 }, "created_at": 1757346730 } ], "events": [ { "created_at": 1757346730, "event": "RunStarted", "agent_id": "basic-agent", "agent_name": "Basic Agent", "run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340", "session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0", "model": "gpt-4o", "model_provider": "OpenAI" }, { "created_at": 1757346733, "event": "MemoryUpdateStarted", "agent_id": "basic-agent", "agent_name": "Basic Agent", "run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340", "session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0" }, { "created_at": 1757346734, "event": "MemoryUpdateCompleted", "agent_id": "basic-agent", "agent_name": "Basic Agent", "run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340", "session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0" }, { "created_at": 1757346734, "event": "RunCompleted", "agent_id": "basic-agent", "agent_name": "Basic Agent", "run_id": "fcdf50f0-7c32-4593-b2ef-68a558774340", "session_id": "80056af0-c7a5-4d69-b6a2-c3eba9f040e0", "content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!", "content_type": "str", "metrics": { "input_tokens": 82, "output_tokens": 56, "total_tokens": 138, "time_to_first_token": 0.047505500027909875, "duration": 4.840060166025069 } } ], "created_at": "2025-09-08T15:52:10Z"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}