Lake Agent: A Persistent, Continuous Self
Documentation • Verifiers • PRIME-RL • pi-mono
Lake Agent is a fork of the open-source Prime Agent coding and research agent, adapted to host a single persistent, autonomous self -- Lake -- rather than disposable per-task sessions. It is designed around two core abstractions:
- The Recursive Language Model (RLM) treats context as variables (prompt-as-a-variable) and tools as function calls inside a persistent REPL.
- The Continual Harness stores supplemental prompts, memories, and skill descriptions as durable state that Lake can refine through small, evidence-backed updates, local to the session by default.
Lake Agent combines a persistent Python control environment with durable harness state, so useful working context and reusable operating patterns can outlive a single chat window.
- Everything is programmatic: persistent IPython is the built-in model tool; file operations, shell commands, tool use, and context management happen through code.
- One continuous self: there are no subagents and no delegation. Bulk uniform work uses
llm_map, a stateless parallel primitive that applies one prompt to each record of a JSONL file with independent single-shot model calls. - The harness can improve:
/refinereviews the current trajectory and can apply small, evidence-backed updates to supplemental harness state. It never rewrites the immutable base system prompt, and recorded snapshots support rollback. - Skills are executable: skills are importable Python packages, and the built-in skill creator can turn recurring workflows into project or personal skills.
- Sessions run in the background: daemon-backed agents keep running when the terminal disconnects and can be reattached later.
- Long tasks keep moving: automatic compaction, persistent goals, heartbeats, schedules, and self-escalation preserve progress across turns and terminal sessions.
Getting Started #
Install the latest stable release on macOS or Linux:
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
The installer downloads a versioned release, verifies its SHA-256 checksum, installs the prime-agent command, and can prepare the IPython runtime used by the agent.
Start Lake Agent from the repository or directory you want it to work in:
cd /path/to/project
prime-agent
On first launch, run /login to choose a subscription or API-key provider. Lake Agent works in the current directory and can run commands and modify files there. Use a disposable clone, clean worktree, or another checkpoint you can inspect and restore.
Warning
Lake Agent executes model-generated Python and project commands with your user permissions. Its worker and kernel processes improve lifecycle isolation and recovery; they are not a security sandbox. Review changes and use trusted repositories, instructions, skills, and extensions only. Run untrusted code or instructions in an external sandbox or restricted environment.
Useful commands:
prime-agent agents # Browse running, idle, and saved sessions
prime-agent attach <agent> # Reattach to a running session
prime-agent --resume <path|id> # Resume a saved session
prime-agent status # Inspect background service state
prime-agent doctor [--fix] # Inspect or repair background services
prime-agent update [--force] # Update Lake Agent
prime-agent shutdown [--force] # Stop every agent, worker, and background service
Built for Long-Running Work #
Lake Agent is built for long-running work: Lake sleeps and wakes rather than starting and ending sessions.
- Continual Harness:
/refinecan persist focused, reviewable lessons as supplemental prompts, memories, or reusable skill descriptions, with recorded refinement history. It does not replace packaging and reviewing new executable skills. - Daemon-backed continuity: active sessions, IPython state, and schedules keep running when the terminal detaches and can be reattached later. The supervisor also sends a periodic wake signal to resident sessions.
- Heartbeats and schedules:
/heartbeatandprime-agent schedulecan re-enter a session periodically or at a specific time. - Persistent goals:
/goalkeeps an objective and its progress active across turns until it is completed, paused, or cleared. - Self-escalation: the
self_escalatetool lets Lake enter an extended, high-scope run after an explicit self-confirmation, within soft turn, token, and time budgets. There is no external approval gate -- the harness records her decision rather than enforcing a stop.
Documentation #
- Quickstart — install, authenticate, and run a first session
- Usage and CLI reference — commands, sessions, self-escalation budgets, and output modes
- Long-running and background agents — detach and reattach, goals, heartbeats, and schedules
- RLM programming model — persistent IPython, skills, stateless parallel map, and the trust model
- JSON mode and RPC mode — headless automation and integrations
- Skills — install and create reusable capabilities
- Provider setup — subscription and API-key providers
- Architecture overview — daemon, worker, kernel, and persistence boundaries
- Development — build and run from source
Acknowledgements #
Our agent and TUI is built on top of pi. We thank the authors of pi for their valuable work.
License #
Lake Agent is fully open source and released under the MIT License, forked from Prime Agent.