Skip to main content

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

ThreadStatus
No description available.
str
No description available.
str
No description available.
Optional[str]
No description available.

Methods

ok()

Whether a thread was opened (status == 'ok').

as_dict()

Convert to a serializable dictionary for the tool return value.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 2540