Claude Platform Docs

スレッド

セッションスレッドの一覧
GET/v1/sessions/{session_id}/threads
セッションスレッドを取得
GET/v1/sessions/{session_id}/threads/{thread_id}
セッションスレッドをアーカイブ
POST/v1/sessions/{session_id}/threads/{thread_id}/archive
Models
BetaManagedAgentsInlineAgent object{ type: "inline", description, execution_identity, 6 more }

An agent that has no Agent resource, and so no id or version. It is defined inline, in a workflow run's plan or when a session thread is spawned, and is not saved.

BetaManagedAgentsSessionThread object{ type: "session_thread", id, agent, 9 more }

An execution thread within a session. Each session has one primary thread plus zero or more child threads.

BetaManagedAgentsSessionThreadStats object{ active_seconds, duration_seconds, startup_seconds }

Timing statistics for a session thread.

active_seconds: optional number

Cumulative time in seconds the thread spent actively running. Excludes idle time.

formatdouble
duration_seconds: optional number

Elapsed time since thread creation in seconds. For archived threads, frozen at the final update.

formatdouble
startup_seconds: optional number

Time in seconds for the thread to begin running. Zero for child threads, which start immediately.

formatdouble
BetaManagedAgentsSessionThreadStatus = "running" or "idle" or "rescheduling" or "terminated"
One of the following:
"running"
"idle"
"rescheduling"
"terminated"
BetaManagedAgentsSessionThreadUsage object{ active_seconds, cache_creation, cache_read_input_tokens, 4 more }

Cumulative token usage for a session thread across all turns.

Server-sent event in a single thread's stream.

One of the following:

スレッドイベント

セッションスレッドイベントの一覧
GET/v1/sessions/{session_id}/threads/{thread_id}/events
セッションスレッドイベントをストリーミング
GET/v1/sessions/{session_id}/threads/{thread_id}/stream