« All posts

Elpis: A Rust TUI Agent Shell With Per-Turn Context Pruning

Elpis is an open-source Rust TUI agent shell with per-turn context pruning, a visible context ledger, and durable memory for LLM coding agents.

Elpis is a Ratatui-based terminal agent shell forked from OpenAI's Apache-2.0 Codex CLI, built to solve a common problem in coding agents: context bloat over long sessions. After each turn, raw command dumps and file reads are replaced in subsequent requests with compact receipts pointing to exact evidence on disk, rather than resending an ever-growing transcript.

A visible Context Ledger lets developers see and toggle exactly what enters the next model request — rule files, goals, checkpoints, and added files. Portable GOAL.md and ES.md files preserve the active goal and a lean checkpoint across compaction, session death, or runtime switches, enabling exact resume or fresh continuation without replaying history.

Memory becomes durable only after repeated useful recall across distinct contexts, with deleted entries archived rather than silently dropped. Elpis is runtime-agnostic, supporting ChatGPT/Codex, OpenRouter, native Anthropic and Gemini adapters, Bedrock, Ollama, and LM Studio. The project is pre-release, with the full pruning engine still in active development.