Jido.AgentServer.Status (Jido v2.0.0-rc.0)
View SourceRuntime status for an agent process.
Combines Strategy.Snapshot with process-level metadata to provide a clean,
stable API for querying agent status without depending on internal __strategy__
implementation details.
Fields
agent_module- The agent's module (e.g.,MyAgent)agent_id- The agent's unique IDpid- The GenServer process PIDsnapshot- TheStrategy.Snapshotcontaining core status inforaw_state- Escape hatch containing full agent state (use sparingly)
Usage
{:ok, agent_status} = AgentServer.status(pid)
# Check if completed
if agent_status.snapshot.done? do
IO.puts("Result: " <> inspect(agent_status.snapshot.result))
end
# Access snapshot fields via helpers
case Status.status(agent_status) do
:success -> handle_success(agent_status)
:failure -> handle_failure(agent_status)
:running -> poll_again()
endDelegate Helpers
The module provides convenience delegates to common snapshot fields:
Summary
Functions
Returns strategy-specific details from the snapshot.
Returns whether the agent has reached a terminal state.
Creates a new Status from a map of attributes.
Returns the result from the snapshot (if any).
Returns the status from the snapshot (:idle, :running, :waiting, :success, :failure).
Types
Functions
Returns strategy-specific details from the snapshot.
Returns whether the agent has reached a terminal state.
Creates a new Status from a map of attributes.
Returns {:ok, status} or {:error, reason}.
Returns the result from the snapshot (if any).
@spec status(t()) :: Jido.Agent.Strategy.status()
Returns the status from the snapshot (:idle, :running, :waiting, :success, :failure).