lake
A terminal LLM agent for Windows and Linux.
What it is
lake is a CLI coding agent that runs against your own LLM server —
local llama.cpp / ollama / LM Studio /
DeepSeek, or any OpenAI-compatible endpoint you control. It ships as
a single AOT-published binary per RID and has a focused built-in
tool family: filesystem, shell, terminal sessions, HTTP, web search,
PDF, image, plus a multi-modal code knowledge graph
(workspace.*) for cross-file understanding.
Every session persists locally, so /resume,
/revert, /compact, and filesystem
time-machine rollback all work out of the box. Subagents spawn nested
task loops with their own context budget. Memory recalls and stores
across sessions. Each tool can be approved, denied, denied-with-reason,
reviewed inline, or compared as a diff before it runs.
Features
-
Bring your own LLM
Runs against any OpenAI-compatible endpoint — local
llama.cpp,ollama, LM Studio, or remote DeepSeek / Gemini. No vendor lock-in. - Single AOT binary One native executable per RID (win-x64, linux-x64). No .NET runtime install, no dependency hunt, cold-start in milliseconds.
-
Built-in tool family
fs,shell,terminal,http, web search,email,pdf,image— all native, all AOT-clean, all approval-gated. -
Rendering trio
diagram_create(Mermaid),chart_create(Vega-Lite),dot_render(Graphviz). Descriptions cross-reference so the model picks the right one for the shape of the task. -
Skills library
skills_search/skills_usefetch distilled how-to recipes from a central repo;/skills createand/skills refinecapture and iterate on new ones from live sessions. -
Context handoff
/handoff <task>distills the current session into a briefing and spawns a fresh successor (inherited config / role / overrides);/resumejumps back if the successor derails. -
Code knowledge graph
workspace.*tools (find,tree,summary,search,outline) give the model cross-file understanding with background indexing. -
Time-machine
/revertrolls back not just the conversation buffer but everyfs.*file mutation since the chosen turn. ESC-ESC picker, single keystroke. -
Session persistence
Every turn appended to
events.jsonlon disk./resume,/compact, full replay — sessions outlive the process, the terminal, and the machine. -
Tool approval gating
Per-tool prompt with
[a]pprove,[d]eny, deny-with-reason,[f]ormat,[c]ompare diff, and inlinecode.reviewcross-ref. -
Subagents
agent.spawnlaunches a nested task loop with its own catalog, model, and event stream. One primary/revertundoes the whole spawn. - Memory across sessions Auto-recall surfaces relevant prior context at turn start; auto-store captures new facts on the way out. Persists outside the conversation buffer.
-
Headless / scripting
lake -p "…" --jsonemits an NDJSON event stream on stdout — same code path as interactive, machine-readable for pipelines and CI. - Overflow-safe context When the backend rejects a turn for exceeding its context window, oversized tool results are shed and the call is retried automatically — the loop keeps running instead of aborting.
-
Buffer inspection
/historyrenders the raw message buffer with per-message sizes — the debug affordance for questions/revertcan't answer.
Recent releases
- 0.5.208
shell.execguard:shell:true+ non-emptyargsis rejected up front instead of silently droppingargs(which used to run barepythonand loop on a broken REPL until the 120 s timeout). - 0.5.207
dot_render— Graphviz DOT graphs with every layout engine (dot / neato / fdp / sfdp / twopi / circo). Third of a rendering trio alongsidediagram_createandchart_create; auto-registers whendotresolves onPATH. - 0.5.206 Tool descriptions reference sibling tools by wire form (
fs_read,workspace_stats,diagram_create, …) — matches what the sanitized backend catalog presents to the model so the sibling references actually resolve. - 0.5.205 Unified tool-name wire form across Ollama + OpenAI-compat backends via a shared sanitizer; dotted config names (
sys.info) present as underscored names (sys_info) to satisfy OpenAI's function-name regex on every backend. - 0.5.204
chart_create— Vega-Lite statistical charts (bar, line, area, scatter, histogram, boxplot, heatmap, faceted small-multiples) viavl-convert. No Chromium, no Node — self-contained native binary. - 0.5.203
diagram_create— Mermaid.js rendering viammdc. Every Mermaid diagram type: flowchart, sequenceDiagram, classDiagram, stateDiagram-v2, erDiagram, gantt, pie, mindmap, timeline, gitgraph, quadrantChart, journey, sankey-beta. - 0.5.200
/handoffv2 +agent.handoff: successor session inherits mode / role / per-model overrides; companion toolagent.handoffchains inside subagent trees with a per-branch depth cap (hidden from the child catalog). - 0.5.196
/handoff <one-line task>— brief-and-branch context handoff. Drafts a briefing from the current session, spawns a fresh successor session (empty history, inherited config, workspace); the predecessor stays inspectable via/resume. - 0.5.189
/optimize: iterative revise + undo across chat-shaped refiner history — the drafter sees the prior draft and your revision instruction, so successive rounds build on the same context. - 0.5.184
image.createwires the locallake-imageservice (FastAPI wrapper for SDXL-Turbo, FLUX.1-schnell, and hidream-fast for text-in-image) into the tool belt. - 0.5.175 Skills PR A:
skills_search+skills_use— search and import distilled how-to recipes from a central skill repo, gated byLAKE_TOKEN. - 0.5.176
/skills create— 3-pass sequential distillation of a live session into a new skill;/skills refine(0.5.178) for surgical iteration on existing ones. Distillation readsevents.jsonlso a compacted session still yields the full skill. - 0.5.171
email.auto_approve_recipients— whitelisted addresses skip the Auto-mode High-risk escalation onemail.send, so long-running digest loops don't need YOLO. - 0.5.170
code.review+ approval reviewer response cap (64 KiB); runaway generations get snipped with a truncation notice instead of blowing up the next turn's context. - 0.5.169
image.readhardening: reasoning forced off + 32 KiB response cap. Vision models that fail to emit EOS no longer fill the entire context window. - 0.5.168 Context-overflow recovery +
/history. When the backend returns "context exceeded", oversized tool results are shed and the call retried;/historyshows the raw buffer with per-message sizes. - 0.5.167
/optimize <text>— refine a rough prompt viapurposes.optimize, review in a panel, accept / edit / discard. - 0.5.166 Approval
[r]eview: the reviewer's findings thread into the tool result the model sees on the next turn, not just the human-facing panel. - 0.5.165
/context [<n>|reset]— per-session override for the effective context window; drives auto-compact and the status-row token gauge. - 0.5.163
workspace.indextool — model-triggered rescan of the code knowledge graph. Complements background indexing. - 0.5.162 Workspace parsers for C/C++, Java, Kotlin, Shell, and SQL; the graph now understands more repos out of the box.
- 0.5.155 Session settings pin — backend / model / role / per-model config survive resume across intervening config edits.
- 0.5.150 Approval
[f]ormat action — per-tool formattable fields (e.g.email.send/replytext+html) rendered inline before you approve. - 0.5.145 Roles: Markets category with 11 markets specialists.
- 0.5.144 Headless / scripting mode —
lake -p "…" --jsonstreams NDJSON events on stdout, same code path as interactive. - 0.5.142
email.*family: eight verbs (send/reply/list/get/update/list_threads/get_thread/search). - 0.5.141
agent.sleep+agent.wake_after— time-aware tools for scheduling future self-prompts with a live countdown. - 0.5.140 Auto-compaction: tri-state mode + threshold-gated trigger, so long sessions no longer require manual
/compact. - 0.5.139 Subagent feature:
agent.spawn+agent.completed— delegate bounded tasks to a nested agent loop with its own catalog, model, and event stream; one/revertat the primary level undoes the whole spawn. - 0.5.136
lake config models retrieve [backend]andgemini config models retrieve— auto-discover the backend's model list and append to config. - 0.5.130
code.review— model-callable single-file code review tool, with[c]ompareaction and risk-eval cross-refs in approval panels. - 0.5.127
/system+prompts.user— inspect the five-layer system prompt (base / role / user / mode / memory) and customise the user layer in config or per session. - 0.5.124 DeepSeek backend (OpenAI-compatible) + LM Studio bootstrap config example.
- 0.5.122
/tools— interactive tool browser with per-session enable / disable. - 0.5.120
/resumepicker upgrade: turns / checkpoints / fs-ops counts, role, and ★ for compacted sessions. - 0.5.118
workspace.*— multi-modal code knowledge graph (find,tree,summary,stats,search,outline) with background indexing. - 0.5.117 Per-tool master switch in
config.json— opt any tool family in or out at startup. - 0.5.114
/compact— structured-summary context compaction. Preserves first user message + last assistant message; drops checkpoints and pre-compact filesystem snapshots. - 0.5.113 Time-machine v2a —
/revertalso rolls backfs.*file mutations, not just the conversation buffer. - 0.5.110 Time-machine v1:
/revert+ ESC-ESC picker for jumping back to a prior turn. - 0.5.108 Diff colourisation (git-style red / green) + Rust syntax highlighting.
- 0.5.101 Memory adoption: prompt layer, surfaced auto-recall, auto-store from turns.