Leviath
Structured context regions for LLM agents, in one Rust binary
Last checked:
What is Leviath?
Leviath is a lightweight agent runtime that efficiently runs thousands of AI agents in a single 28 MB Rust binary. It addresses long-run stability through context regions, cost optimization via staged execution (different models per stage), and fault tolerance with run journals that prevent re-executing completed tasks.
Leviath pricing
Pricing model: Freemium
Leviath pros
- Runs 10,000+ agents in one process with minimal resource overhead (single 28 MB binary)
- Smart context management: pinned sections (task/plan/codebase) never move, only conversation compacts, preventing re-reading of already-processed information
- Staged execution optimizes LLM costs—discovery/hints use cheap models, implementation/review use expensive ones, so you only pay premium pricing for steps that need it
- Run journals provide fault tolerance: crashed runs resume without re-executing completed tool calls (writes, migrations, branches)
- Live steering allows real-time interaction with sub-agents at any depth, not just top-level agents
Leviath cons
- Configuration requires writing agent definition files specifying steps, models, context budgets, and steering conditions
- Early stage release (v0.4.0, shipped August 18, 2026) with potential stability/feature gaps
- Documentation appears to be the primary guide; limited visibility into community/support ecosystem
Frequently asked questions about Leviath
What happens to long-running agents when the context window fills?
Leviath's context regions keep task, plan, and codebase pinned while only the conversation compacts into history. This prevents the agent from forgetting original constraints and re-reading already-processed files.
How does Leviath reduce LLM costs?
Stages allow each phase (discover, implement, review, reassess, hint) to use its own model and context budget. Cheap models handle discovery; expensive models only run on code-writing and review steps.
What happens if a Leviath process crashes mid-run?
The run journal records each tool call when sent and when it lands. On restart, completed calls are replayed (not re-run), and only in-flight calls are presented for confirmation.
Can I interrupt or steer a sub-agent?
Yes—live steering allows messages to land between inference calls at any agent depth. The run continues pointed in the new direction without restarting from zero.