Jido.Agent.Strategy implementation for LLM-driven orchestration.
Implements a ReAct-style (Reason + Act) loop: call LLM, execute tool calls, feed results back, repeat until final answer or iteration limit.
All side effects are dispatched via directives — the strategy itself is pure.
Error Handling
Error reasons are stored as structured data in strat.result (not stringified
via inspect/1), preserving error types for callers that pattern-match on them.
LLM-facing error context (tool results, conversation messages) continues to use
string representations since the LLM consumes text.
All error paths close open observability spans (agent, iteration) to ensure telemetry is emitted even on failure.
Summary
Functions
Returns replay directives for restoring in-flight operations from checkpoint state.
Strategy-specific closure stripping for checkpoint serialization.
Functions
Returns replay directives for restoring in-flight operations from checkpoint state.
Called by Checkpoint.replay_directives/1 via function_exported?/3 delegation.
Strategy-specific closure stripping for checkpoint serialization.
Called by Checkpoint.prepare_for_checkpoint/1 via delegation.
Strips closures from nested structures (e.g., approval_gate.approval_policy)
in addition to top-level function values.