Jido.AI.Reasoning.ReAct.State
(Jido AI v2.1.0)
View Source
Runtime state for a single ReAct run.
Summary
Functions
Increments the event sequence counter and returns {state, next_seq}.
Clears all pending tool calls.
Returns elapsed runtime in milliseconds.
Restores state from a minimal checkpoint map.
Increments the reasoning iteration counter.
Merges usage counters into existing state usage map.
Returns the minimal serializable map required to resume execution.
Creates initial runtime state for a new query.
Stores terminal error value.
Stores the current LLM call id.
Stores the latest provider response id for multi-turn continuation.
Replaces pending tool calls.
Stores terminal result value.
Sets runtime status.
Returns the Zoi schema used to validate ReAct runtime state.
Types
@type t() :: %Jido.AI.Reasoning.ReAct.State{ active_tools: map(), context: any(), error: nil | nil | any(), iteration: integer(), llm_call_id: nil | nil | binary(), llm_response_id: nil | nil | binary(), pending_tool_calls: [ %Jido.AI.Reasoning.ReAct.PendingToolCall{ arguments: map(), attempts: integer(), duration_ms: nil | integer(), id: binary(), name: binary(), result: nil | any(), status: atom() } ], request_id: binary(), result: nil | nil | any(), run_id: binary(), seq: integer(), started_at_ms: integer(), status: atom(), updated_at_ms: integer(), usage: map(), version: integer() }
Functions
@spec bump_seq(t()) :: {t(), pos_integer()}
Increments the event sequence counter and returns {state, next_seq}.
Clears all pending tool calls.
@spec duration_ms(t()) :: non_neg_integer()
Returns elapsed runtime in milliseconds.
Restores state from a minimal checkpoint map.
Increments the reasoning iteration counter.
Merges usage counters into existing state usage map.
Returns the minimal serializable map required to resume execution.
Creates initial runtime state for a new query.
Stores terminal error value.
Stores the current LLM call id.
Stores the latest provider response id for multi-turn continuation.
@spec put_pending_tools(t(), [Jido.AI.Reasoning.ReAct.PendingToolCall.t()]) :: t()
Replaces pending tool calls.
Stores terminal result value.
Sets runtime status.
@spec schema() :: term()
Returns the Zoi schema used to validate ReAct runtime state.