Expand description
Core agent loop driver
AgentRunner is the “missing middle” — the robust loop that sits between
the apps (CLI, API) and the enact-core kernel. It implements:
- Multi-iteration tool call loop (ported from zeroclaw’s
run_tool_call_loop) - Multi-format tool call parsing (JSON, XML, Markdown)
- Auto context compaction when history grows too large
- Retry with exponential backoff for transient errors
- Checkpoint saving at configured intervals
- Stream event emission throughout
- LLM call tracing and token/cost accounting (observability)
This fulfills the mandate from 28-TS-RUST-INTEGRATION.md:
“Rust handles retries/fallbacks” and 27-LONG-RUNNING-EXECUTIONS.md:
“Unified long-running agentic loop”.
Structs§
- Agent
Runner - The robust agent runner — drives the tool call loop with retries, compaction, and multi-format parsing.
Enums§
- Loop
Outcome - Outcome of a runner loop execution.
Type Aliases§
- Default
Agent Runner - Convenience: create an
AgentRunnerwith default in-memory checkpoint store.