Thread Result • AI Agent SDK
ThreadResult: Outcome of an agent/gateway-initiated thread creation (Issue #3987).
ThreadResult
Defined in the protocols module.
AI Agent
Outcome of an agent/gateway-initiated thread creation (Issue #3987).
Every call resolves to exactly one :data:ThreadStatus, so the caller always gets a typed answer rather than a hard error — in particular a channel that cannot thread returns `unsupported rather than raising, and the caller falls back to the parent channel. This mirrors the :class:ReactionResult` contract.
Attributes: status: The outcome (`ok / unsupported / failed / no_route). target: The resolved parent target the thread was opened under. thread_id: The new thread/topic id, populated only when status == "ok". Callers compose "<target>:<thread_id>"` to route subsequent sends into it. detail: Optional model-readable explanation.
Properties
ThreadStatusNo description available.
strNo description available.
strNo description available.
Optional[str]No description available.
Methods
Whether a thread was opened (`status == 'ok'`).
Convert to a serializable dictionary for the tool return value.
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 3527