Skip to content
中文

List Events

Call Create session first and replace the example session ID with its returned ID.

GET/anthropic/v1/sessions/{session_id}/events● Supported

Official Claude documentation ↗

Request parameters

  • session_idstringrequired

    path: Session ID (path or query parameter).

  • created_at[gt]stringoptional

    query: Return records created strictly after this time.

  • created_at[gte]stringoptional

    query: Return records created at or after this time.

  • created_at[lt]stringoptional

    query: Return records created strictly before this time.

  • created_at[lte]stringoptional

    query: Return records created at or before this time.

  • orderstringoptional

    query: Order by processed time: asc chronological (default), desc the reverse.

  • typesarrayoptional

    query: Filter by event type; values match the returned events' type field (e.g. user.message, agent.tool_use). Omit for all types.

  • limitnumberoptional

    query: Maximum number of items per page.

  • pagestringoptional

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Send a message before reading history. Until processing finishes, only admitted input may be visible. Pagination, event type and time filters are supported, including system.message in types[]. system.message returns id, type, content and processed_at without provenance or run_id. A session waiting for tool approval pauses on session.status_idle with stop_reason requires_action, whose event_ids list agent.tool_use events to confirm or agent.custom_tool_use events awaiting client results. A failed run emits session.error before session.status_terminated. As in the official API, agent.thinking is a progress signal without content.

Errors follow the Claude Managed Agents format — see error codes

Request

curl
# Call Create session first and replace the example session ID with its returned ID.
curl https://api.deepraxis.com/anthropic/v1/sessions/sesn_123/events \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: managed-agents-2026-04-01"
Python
# Call Create session first and replace the example session ID with its returned ID.
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.deepraxis.com/anthropic",
    api_key="$PRAXIS_API_KEY",
)

result = client.beta.sessions.events.list("sesn_123")
print(result)
TypeScript
// Call Create session first and replace the example session ID with its returned ID.
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.deepraxis.com/anthropic",
  apiKey: "$PRAXIS_API_KEY",
});

const result = await client.beta.sessions.events.list("sesn_123");
console.log(result);

Response 200

{
  "data": [
    {
      "id": "fa9087de-7935-45fb-b675-4cc50fac7af0",
      "type": "user.message",
      "processed_at": "2026-09-26T07:16:31.027Z",
      "content": [
        {
          "type": "text",
          "text": "你好"
        }
      ]
    },
    {
      "id": "3c47cdc8-5a6b-4ae8-adf4-1179d4843f97",
      "type": "session.status_running",
      "processed_at": "2026-09-26T07:16:31.027Z"
    },
    {
      "id": "mreq_bXNnXzlmMmZiYzU3LTVlOWYtNDM1ZC04NWE3LThkMTNhZDdmNDAzZQ",
      "type": "span.model_request_start",
      "processed_at": "2026-09-26T07:16:31.027Z"
    },
    {
      "id": "7e8cf0a5-f911-49a6-b3fa-d3cf8a2f5a5a",
      "type": "span.model_request_end",
      "processed_at": "2026-09-26T07:16:35.522Z",
      "model_request_start_id": "mreq_bXNnXzlmMmZiYzU3LTVlOWYtNDM1ZC04NWE3LThkMTNhZDdmNDAzZQ",
      "is_error": null,
      "model_usage": {
        "input_tokens": 36,
        "output_tokens": 74,
        "cache_read_input_tokens": 0,
        "cache_creation_input_tokens": 0
      }
    },
    {
      "id": "8e4598fd-b451-4947-8bfe-14b8657b38ba",
      "type": "agent.message",
      "processed_at": "2026-09-26T07:16:35.522Z",
      "content": [
        {
          "type": "text",
          "text": "你好,有什么可以帮你的吗?"
        }
      ]
    },
    {
      "id": "41033930-7025-4d9b-8e5b-5aab70020910",
      "type": "session.usage",
      "processed_at": "2026-09-26T07:16:35.522Z",
      "usage": {
        "input_tokens": 36,
        "output_tokens": 74,
        "cache_read_input_tokens": 0
      }
    },
    {
      "id": "aa79bbc8-c332-407a-a59b-b061c05e8c72",
      "type": "session.status_idle",
      "processed_at": "2026-09-26T07:16:35.522Z",
      "stop_reason": {
        "type": "end_turn"
      }
    }
  ],
  "next_page": null
}

Response

HTTP 200

Successful response

application/json

Name Type Description
data array<object>
data[].id string Unique identifier for this event.
data[].content array<object> Array of content blocks comprising the user message. / The result content returned by the tool. / Array of text blocks comprising the agent response. / The result content returned by the tool. / The result content returned by the tool. / Message content blocks. / Message content blocks. / The result content returned by the tool. / System content blocks. Text-only.
data[].type string
data[].processed_at null | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | null | string | string | string | null | string | string A timestamp in RFC 3339 format
data[].session_thread_id null | string | string | string | string | string | null | string | string If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread. / Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread. / When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching user.custom_tool_result by custom_tool_use_id, so clients do not send it back. / When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching user.tool_confirmation by tool_use_id, so clients do not send it back. / When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching user.tool_confirmation or user.tool_result by tool_use_id, so clients do not send it back. / Public sthr_ ID of the newly created thread. / Public sthr_ ID of the thread that started running. / Public sthr_ ID of the thread that went idle. / Public sthr_ ID of the thread that terminated. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread. / Public sthr_ ID of the thread that is retrying.
data[].result string UserToolConfirmationResult enum / Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.
data[].tool_use_id string The id of the agent.tool_use or agent.mcp_tool_use event this result corresponds to, which can be found in the last session.status_idle event's stop_reason.event_ids field. / The id of the agent.tool_use event this result corresponds to. / The id of the agent.tool_use event this result corresponds to, which can be found in the last session.status_idle event's stop_reason.event_ids field.
data[].deny_message null | string Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.
data[].custom_tool_use_id string The id of the agent.custom_tool_use event this result corresponds to, which can be found in the last session.status_idle event's stop_reason.event_ids field.
data[].is_error null | boolean Whether the tool execution resulted in an error. / Whether the model request resulted in an error. / Whether the tool execution resulted in an error.
data[].input object Input parameters for the tool call.
data[].name string Name of the custom tool being called. / Name of the MCP tool being used. / Name of the agent tool being used.
data[].mcp_server_name string Name of the MCP server providing the tool.
data[].evaluated_permission string AgentEvaluatedPermission enum
data[].evaluation object Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.
data[].mcp_tool_use_id string The id of the agent.mcp_tool_use event this result corresponds to.
data[].from_session_thread_id string Public sthr_ ID of the thread that sent the message.
data[].from_agent_name null | string Name of the callable agent this message came from. Absent when received from the primary agent.
data[].to_session_thread_id string Public sthr_ ID of the thread the message was sent to.
data[].to_agent_name null | string Name of the callable agent this message was sent to. Absent when sent to the primary agent.
data[].error object
data[].stop_reason object
data[].agent_name string Name of the callable agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs.
data[].iteration number 0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc. / 0-indexed revision cycle, matching the corresponding span.outcome_evaluation_start. / 0-indexed revision cycle, matching the corresponding span.outcome_evaluation_start.
data[].outcome_id string The outc_ ID of the outcome being evaluated. / Server-generated outc_ ID for this outcome. Referenced by span.outcome_evaluation_* events and the session's outcome_evaluations list.
data[].explanation string Human-readable explanation of the verdict. For needs_revision, describes which criteria failed and why.
data[].outcome_evaluation_start_id string The id of the corresponding span.outcome_evaluation_start event.
data[].usage object Token usage for a single model request. / Point-in-time snapshot of a session's cumulative usage.
data[].model_request_start_id string The id of the corresponding span.model_request_start event.
data[].model_usage object Token usage for a single model request.
data[].description string What the agent should produce. Copied from the input event.
data[].max_iterations null | number Evaluate-then-revise cycles before giving up. Default 3, max 20.
data[].rubric object Rubric for grading the quality of an outcome.
data[].agent null | object Resolved agent definition for a session. Snapshot of the agent at session creation time.
data[].budget null | object A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches max_list_cost.
data[].metadata object The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.
data[].title null | string The session's new title. Present only when the update changed it.
next_page string | null