প্রকল্প সম্পর্কে
Longe is a single-binary, self-improving harness for any LLM, written in Rust. Built on ideas from the YC Harness Club talks (2026), it treats the model weights as the engine and the runtime as the car, turning a fixed-weight model into a persistent agent.
Architecture: Longe runs a background daemon (`longed`) that manages a tree of sessions. Each session has a history, a Lua 5.4 REPL state, a sandbox, and a configurable budget. The memory hierarchy has three levels: L1 is the model's context window (with automatic compaction at 70%); L2 is the persistent Lua REPL where variables survive across turns; L3 is a git-versioned file store holding skills, memory, prompts, sub-agent specs, and trajectories.
The model sees only one tool: `exec(code)`, which runs Lua. Native bindings inside the Lua VM expose file I/O (workspace-confined), shell commands (sandboxed via Seatbelt on macOS, Landlock on Linux, restricted tokens on Windows), memory manipulation, skill and sub-agent CRUD, prompt editing, stateless recursive LLM queries, model switching between providers, context compaction, external verification, and a `done()` call that is refused until a minimum budget and a verifier both pass.
Providers: Anthropic, OpenAI-compatible APIs (including DeepSeek, OpenRouter), and Ollama for local models. The model can switch providers mid-session without losing state, enabling a cheap local model to handle routine work while a frontier API handles hard steps.
Sub-agents: Persistent sessions that finish, go idle in RAM, get offloaded to disk, and wake on messages. Parents, children, and siblings communicate via a message bus sharing context directly.
Sandbox: Three modes (read-only, workspace-write, full-access). Fixed rules always hide the store, ~/.ssh, credentials, .env, and the binary itself. Secrets are scrubbed from the environment; network is denied unless configured.
Budget: A floor before it is a ceiling. `done()` is refused before `min_seconds` and `min_turns`; forced clean exit at `max_turns`/`max_tokens`.
Reflection: After each accepted completion (and on cron), the runtime condenses the full trajectory and asks a model to propose diffs to skills, memory, sub-agent specs, prompt, and config. Changes are applied to a git branch, a fitness command is replayed, and the branch is merged only if the score does not drop, or held for human review in the cockpit.
Cockpit: A TUI (`longe cockpit`) shows the session tree, budget, verifier state, trajectory tail, and pending reflection diffs. An HTTP JSON surface on port 7878 allows remote access, e.g. via Tailscale.
Build: `cargo build --release` (Rust 1.85+, no unsafe code). Tests include 91 unit and end-to-end cases driven by a scripted fake model server.
License: MIT. Repository: edouard-claude/longe.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.