A durable, self-improving agent organization that makes verified progress on software missions spanning days to weeks — surviving crashes, reboots, and context-window limits without losing the plot.
Durable execution (Temporal) · git as source of truth · deterministic verification · pluggable models · runs at $0
Status: early / work-in-progress (Phase 0). The durable core is being built first. See the roadmap and what's proven vs. frontier. This README describes the system as designed; features are landed incrementally and nothing here is marketing — see the honesty section.
Most "autonomous agents" are a single LLM loop that dies the moment the process restarts, the context window fills, or an API call fails. LRA treats long-horizon autonomy as an engineering problem, not a model capability. The model thinks in short bursts; the system runs for weeks by:
An asymmetric agent organization: one single-threaded Lead Engineer owns all coupled code-writes (so design decisions stay coherent), and specialized agents fan out only for the two things that genuinely parallelize — reading the codebase and independently reviewing the work. This is a deliberate, evidence-based choice (see docs/architecture.md).
HUMAN ── approve · steer · gate irreversible acts (durable signals)
│
┌────────────────────────────▼─────────────────────────────┐
│ MissionWorkflow (Temporal orchestrator — thin scheduler) │
└──┬──────────┬───────────┬───────────┬───────────┬─────────┘
▼ ▼ ▼ ▼ ▼
[Planner] [LEAD ENG] [Researchers] [Reviewer] [Integrator]
DAG + sole writer (read-only (fresh ctx, single
ownership (SDK loop) fan-out) adversarial) write to main
─────────── GROUND TRUTH: git + checklist ───────────
─────────── VERIFIER: pytest + ruff + mypy + build (the only merge gate) ───────────
The only real cost is LLM tokens, and the model layer is pluggable behind one interface:
| Backend | Cost | Notes |
|---|---|---|
| Ollama (local) | $0 | Real outputs, offline, fully yours. Needs a capable machine. |
| Free-tier cloud (OpenAI-compatible: Groq / Gemini / OpenRouter) | $0* | Stronger than small local models; rate-limited. |
| Claude (API key, or Agent SDK via a Pro/Max subscription) | varies | Strongest output; subscription = $0 marginal within plan limits. |
stub |
$0 | Deterministic test double — for tests/CI only, never shown as a real run. |
Honesty is the whole point of this project. Every number you see (tokens, cost, latency) is read from the real provider response. Anything presented as a real agent run uses genuine model output or a clearly-labeled recorded replay — never fabricated text dressed up as live AI.
uv sync # install (provisions Python 3.12)
uv run lra version
uv run lra config # show resolved config (secrets redacted)
More commands land with each phase. See docs/predicted-runs/ for clearly-labeled predicted outputs you can compare against your own real runs.
Built lean-baseline-first; the multi-agent org is layered on only where it provably helps.
MIT — see LICENSE.
$ claude mcp add long-running-agent \
-- python -m otcore.mcp_server <graph>