Claude Platform Docs

스레드

세션 스레드 나열
$client->beta->sessions->threads->list(string sessionID, ?int limit, ?string page, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<ManagedAgentsSessionThread>
GET/v1/sessions/{session_id}/threads
세션 스레드 가져오기
$client->beta->sessions->threads->retrieve(string threadID, string sessionID, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsSessionThread
GET/v1/sessions/{session_id}/threads/{thread_id}
세션 스레드 보관
$client->beta->sessions->threads->archive(string threadID, string sessionID, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsSessionThread
POST/v1/sessions/{session_id}/threads/{thread_id}/archive
Models
class ManagedAgentsSessionThread { $type; $id; $agent; /* 8 more */ }
Type type
string id

Unique identifier for this thread.

Agent agent

The resolved agent a session thread runs: a saved-agent snapshot, the platform advisor entry, or an inline-defined (ephemeral) agent snapshot.

?\Datetime archivedAt

A timestamp in RFC 3339 format

\Datetime createdAt

A timestamp in RFC 3339 format

?string parentThreadID

Parent thread that spawned this thread. Null for the primary thread.

string sessionID

The session this thread belongs to.

Timing statistics for a session thread.

SessionThreadStatus enum

\Datetime updatedAt

A timestamp in RFC 3339 format

Cumulative token usage for a session thread across all turns.

class ManagedAgentsSessionThreadStats { $activeSeconds; $durationSeconds; $startupSeconds; }
?float activeSeconds

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

?float durationSeconds

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

?float startupSeconds

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

One of the following:
"running"
"idle"
"rescheduling"
"terminated"
class ManagedAgentsSessionThreadUsage { $activeSeconds; $cacheCreation; $cacheReadInputTokens; /* 4 more */ }
?float activeSeconds

Cumulative time in seconds this thread spent in running status. Equal to stats.active_seconds; surfaced here so a thread's usage carries every quantity its cost is priced on.

Prompt-cache creation token usage broken down by cache lifetime.

?int cacheReadInputTokens

Total tokens read from prompt cache.

?int inputTokens

Total input tokens consumed across all turns.

?BetaMonetaryAmount listCost

A monetary amount in a specific currency.

?int outputTokens

Total output tokens generated across all turns.

Cumulative count of server-executed tool invocations, broken down by tool.

One of the following:

스레드이벤트

세션 스레드 이벤트 나열
$client->beta->sessions->threads->events->list(string threadID, string sessionID, ?int limit, ?string page, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<ManagedAgentsSessionEvent>
GET/v1/sessions/{session_id}/threads/{thread_id}/events
세션 스레드 이벤트 스트리밍
$client->beta->sessions->threads->events->stream(string threadID, string sessionID, ?list<BetaManagedAgentsDeltaType> eventDeltas, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsStreamSessionThreadEvents
GET/v1/sessions/{session_id}/threads/{thread_id}/stream