
ljos
io.github.leidarljos/ljos
Local memory, a work tracker and a shell-command guard shared by coding runners on one machine.
Documentation
ljos
ljos gives coding agents a memory that outlives the session and a ticket queue they share, both kept as plain files on your machine.
[//]: # ([[[cog import ljos_version as v; v.lines("These notes describe ljos {version}.")]]]) These notes describe ljos 0.46.0. [//]: # ([[[end]]])
What you get in five minutes
- A lesson you write once with
ljos remember. When a later prompt bears on it, the lesson is shown to the agent before the model reads the prompt. - A tracker of tickets in a git repository. While one agent has a ticket claimed, a second claim is refused and names the holder.
ljos onboard, one command that registers all of this with Claude Code, Cursor and Codex, whichever are installed.- A warning, not a block, when an agent is about to run a risky shell command such as a force push.
No model writes or rewrites a lesson. Every store is a file you can open.
Prerequisites
- Linux or macOS on x86_64 or aarch64. Windows works through Windows Subsystem for Linux (WSL) and is untested.
- git, with
user.nameanduser.emailset. The tracker commits each change. curlorwget,tar, andsha256sum(shasumon macOS), forinstall.sh.- rustc 1.89 or newer and cargo-binstall, only to install with cargo, or when no release archive fits your machine.
install.shthen builds from source with cargo and says so on one line.
Install
curl -fsSLO https://github.com/leidarljos/ljos/releases/latest/download/install.sh && sh install.sh
export PATH="$HOME/.local/bin:$PATH"
The installer includes the encoder, a model that lets search match meaning, and downloads that model. It then onboards the coding runners it finds. Pass --no-embed to skip the encoder and its model download, or --no-onboard to register runners later. If you install Claude Code, Cursor or Codex afterwards, run ljos onboard. Install in detail covers each runner and what to do when install stops.
First run
ljos doctor
ljos remember "Seat the kiln door only when KILN_DOOR=cold."
ljos search "kiln door"
ljos doctor prints a row for each problem and ljos is ready when there is none.
ljos remember prints the lesson and the first eight characters of its id.
ljos search prints that lesson back.
Achievements
A lesson is one sentence a person or an agent wrote down. ljos stores it as written, and no model picks facts out of a transcript.
The prompt hook, which runs before each prompt, adds the lessons that prompt bears on.
Agents file and claim tickets in one git repository. Each agent works under a seat, the name it claims and votes under.
When agents disagree, each casts a vote, and ljos consensus settles it.
Search uses a local encoder when one is installed. A judge, an optional model that decides which lessons bear on a prompt, sees your text only when a person configures one.
ljos onboard --example lists the runners, the coding agents ljos can register with, among them Claude Code, Codex and Cursor.
- 10,520 tokens for the 22 core Model Context Protocol (MCP) tools, against 24,636 for all 57 (measurements/mcp-size.txt). MCP is how an agent calls ljos as a tool.
- 139.1 ms warm prompt hook median on 10,000 live lessons, down from 196.3 ms, with the same output (measurements/hook-latency.txt,
prompt-hook.rows-10000.after). - The duplicate check merged 0 of 186 near-topic lesson pairs and found 12 of 78 duplicate pairs (measurements/lesson-duplicates.txt).
- packset, the program that stores and searches lessons, publishes a LongMemEval_S session retrieval run (packset explanation). That page records the figures. This tree does not. The run scores retrieval, not answer accuracy.
- The ljos BM25+ CPU run on that file is repeated with
sh bench/hf/run.sh. BM25+ is the word ranking search uses without the encoder. The summary and the per-question rows are the dataset ljos LongMemEval_S retrieval. - 2,293 tests passed, 0 failed, 2 ignored on the 0.40.0 release commit (CI run 42801686714).
What ljos does lists every measured number with its method.
No row compares ljos with another memory tool on a shared benchmark. hook-latency.txt says so on its third-party line.
Comparison
Mem0 and Zep run a model over what they ingest. ljos stores the sentence as written. beads lets an agent claim a ticket and keeps the queue in Dolt. ljos keeps tickets as Org headings in git, and one seat owns a ticket. git-bug keeps issues in the project's own git objects. ljos keeps a separate tracker repository. Basic Memory is a shared notebook of Markdown. ljos's memory is short claims with a review clock. Letta gives the agent tools to edit its own memory. ljos has no model in that loop. Of these, the ljos docs are the ones that describe a ballot per agent, a settle, and a handover the receiver checks before import.
Against Linear, a CLAUDE.md file or plain GitHub issues, ljos adds a claim that refuses a second holder and a lesson that comes back when a prompt bears on it. Each of the three is better at something ljos does not do. Why ljos, and when not says where.
How ljos compares has the full table, the licences, and a link to each tool's own docs, read on 2026-11-10.
Terms
- Lesson: one sentence stored by
ljos remember, with a review date. - Seat: the name an agent works under.
LJOS_SEATsets it. With none set, a write uses your login name. - Sitting: one agent's claimed stretch of work on a ticket, from
ljos sittingtoljos finish. - Pack: the store of lessons that packset keeps and searches. packset is a background process, and
packset ensurestarts it. - Deed: a record of what a piece of work produced. The deed store keeps them, signed.
- Encoder: the optional model that lets search match meaning. Without it search matches words.
Thirty seconds
kiln.sh in an empty directory:
#!/bin/sh
if [ "${KILN_DOOR:-}" != cold ]; then
echo "kiln.sh: KILN_DOOR is unset. The door seats only when it is cold." >&2
exit 1
fi
echo "kiln door seated"
packset ensure had already started the memory writer.
The shell prompt is dev@laptop, and LJOS_SEAT is demo.
No sitting and no ticket.
The prompt-origin label names the process that ran the hook.
The lesson is the indented text under Remembered.
dev@laptop:~$ ./kiln.sh
kiln.sh: KILN_DOOR is unset. The door seats only when it is cold.
dev@laptop:~$ ljos remember 'Seat the kiln door only when KILN_DOOR=cold. A missing setting is a config gap.'
remembered (lesson): Seat the kiln door only when KILN_DOOR=cold. A missing setting is a config gap.
id fcd167c8, next review 2026-11-14 15:08 +00:00
saved as a standing lesson; run `ljos search "QUERY"` to read it
dev@laptop:~$ printf '%s\n' 'seat the kiln door' | ljos hook --prompt --text
label prompt-origin: not stored as the person's words (parent process is `ljos`,
not a known runner)
Remembered, shown 1 of 1, fused order, so run `ljos search`.
lesson, from an agent, today
Seat the kiln door only when KILN_DOOR=cold. A missing setting is a config
gap.
dev@laptop:~$ KILN_DOOR=cold ./kiln.sh
kiln door seated
Install in detail
The first install command fetches install.sh, which installs the programs. The second, ljos onboard, finds Claude Code, Cursor and Codex on this machine, and any other runner it knows, and registers the MCP server and the skill for each.
One runner is one command.
Each command prints the files it wrote and the next command.
Run it again and those files stay as they are.
Claude Code: ljos onboard --harness claude. It writes ~/.claude.json, the hooks and the skill. Check with ljos doctor --all.
Cursor: ljos onboard --harness cursor. It writes ~/.cursor/mcp.json, the hooks and the skill. Check with ljos doctor --all.
Codex: ljos onboard --harness codex. It writes ~/.codex/config.toml, the hooks and the skill in ~/.agents/skills. Check with ljos doctor --all.
ljos onboard --dry-run prints the steps and writes nothing.
ljos offboard removes the registration.
ljos uninstall removes the programs.
A pipe with no --harness prints the MCP entry as JSON on stdout, and the setup lines on stderr. It sets up the ticket tracker and deed store. Outside a temporary home, it also sets up the memory writer. Under a temporary home, memory is off unless PACKSET_URL names a pack or a writer port is set.
A script that should register runners passes --harness all.
If install stops, the script names the cause and the command that fixes it.
- No network, or the release download fails: check the connection and run
sh install.shagain. A version you name issh install.sh --version VER. Archives already on disk aresh install.sh --asset-dir DIR. - The OS or CPU is not Linux or macOS on x86_64 or aarch64: the script prints one line naming those systems and
cargo install --lockedfor the seat programs. On Windows, run the script inside WSL. curlorwget,tar, orsha256sumis missing. On macOS the checksum tool isshasum. The script names the missing tool. Install it and runsh install.shagain. Programs already unpacked aresh install.sh --from-dir DIR.- A checksum does not match, or the download stops early: the script stops, deletes the partial file, and says to run
sh install.shagain. - The install directory is not writable: the script names it and
sh install.sh --bin-dir DIR. - The install directory is not on PATH: the script prints the line for bash (
~/.bashrc), zsh (~/.zshrc) and fish (~/.config/fish/config.fish). It does not edit those files.--modify-pathwrites~/.profileand~/.bashrc, and writes~/.zshrconly when that file already exists. The Next line puts that directory on PATH and names the following command. With--no-onboardthat command isljos onboard. An install that already ranljos onboardnamesljos doctor. - An older
ljosis earlier on PATH: the script names both binaries and prints theexport PATHline that puts the new one first. - Running the script again over the same version says it reinstalled that version. An older install says it updated, and names both versions.
--version VERor--pin REPO=VERfor a release that does not exist says so, names the releases page, and the commandsh install.sh --version VERorsh install.sh --pin REPO=VER. A version the script itself names, when that release is not published and Rust is not installed, installs the latest release of that program and says so. With Rust installed, it builds that version from source.- A running
ljos-mcpkeeps the previous binary. Restart the assistant, orkillthe pid the script prints, then runljos doctor.
ljos onboard with no coding tool installed says so. It still sets up the ticket tracker and deed store. Outside a temporary home, it also sets up the memory writer. Under a temporary home, memory is off unless PACKSET_URL names a pack or a writer port is set. The line names that setup and ljos doctor as the next command. The deed store keeps signed records of the work. Install an agent, then run ljos onboard. ljos onboard --example lists the tools.
ljos offboard after a hand edit that it cannot undo names the file and leaves the ljos entry. Edit that file, delete the ljos entry, and run ljos offboard again.
ljos uninstall while an assistant still points at ljos names that file. Edit it and delete the ljos entry. The programs are still removed. A stub named ljos answers a hook that a running session cached.
After that registration, a first recall does not need a seat, a sitting or a ticket.
One person and one repository are enough.
With no seat named, a write uses the login name, or a short stable name when that login is missing. The first such write says to set LJOS_SEAT. A session id in this process names the seat instead: the runner plus a short id, such as claude-k3j9x0a1b2. An id that exists only on a parent does not.
Tutorial
Linux and macOS are supported. Windows works through Windows Subsystem for Linux (WSL) and is untested.
curl -fsSLO https://github.com/leidarljos/ljos/releases/latest/download/install.sh && sh install.sh
export PATH="$HOME/.local/bin:$PATH"
cd "$HOME"
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
ljos doctor
ljos remember "The lexical default is BM25+. It beat BM25 by two points on turns."
ljos search "lexical default"
ljos file "Pick a codec" -p demo
The release is a complete install of ljos, the sibling tools and the encoder.
To install this checkout onto PATH instead, run sh scripts/install.sh --from-checkout.
The install.sh attached to the 0.41.1 release asked for vissue-cli-<target>.tar.xz. The 0.41.2 script fetches vissue-v<version>-<target>.tar.gz, the archive the vissue release publishes.
--no-embed leaves out the encoder. Search then matches words, and ljos search prints matched by words (encoder not installed) and names the install command ljos doctor names when that command is a cargo one. When it would be a download run through a shell, the line points at the install page, https://leidarljos.github.io/ljos/getting-started.html#install, and at ljos doctor instead. An MCP server names that install step on its first such search and leaves it off later searches. That ranking splits identifiers (list_scans matches list scans), weighs a title or a tag above the body, and leaves out a row that only shares a word present in every row, once at least four rows carry that word. When nothing is close, the line is No close matches for "...".
A cold encoder, one the writer has not loaded yet, gets LJOS_SEARCH_WAIT seconds (3 when unset) when the writer sends no remaining time, or one longer than LJOS_SEARCH_WARMUP_WAIT. A remaining time that fits in LJOS_SEARCH_WARMUP_WAIT seconds (5 when unset, 0 does not wait) is waited out, inside LJOS_CALL_TIMEOUT. That same budget is also waited out when the pack is still starting. The pack is starting when /health is not-ready or not ready, or the JSON says ready is false or code is starting. Words in the query are not that signal. That wait is spent once for the whole command, however many times the search asks again. When the budget runs out, search ranks by words and prints one line on stderr, Memory is starting, so these results are ranked by words. If this persists, run `ljos doctor`. A dated search has no word fallback, so the line is Memory is starting, so try again in a few seconds. If this persists, run `ljos doctor`. and the command exits non-zero. The search is asked again once the model has answered. The default line says whether the printed rows matched by meaning, words, or both; --explain names CombMNZ, MMR and FSRS. If the encoder has not answered and the page shows rows, the line says they are word matches and reports the remaining load seconds when known. When the page shows nothing, one line names the command to rerun and, when the writer sends a remaining time, about how many seconds are left. A failed encoder names packset stop && packset ensure. --json puts semantic or lexical in ranking. Starting the memory writer starts that load, so the first search is not what starts it. A row whose score is only the word-rank floor, 0.20, is left out.
A lesson ljos remember queued because the pack was not answering is sent again on ljos search and ljos sitting. When it is still waiting, that command says so. A busy pack is asked again, and when it stays busy the command stores nothing and says to run ljos remember again.
The installer checks each download against its published SHA-256 sum. It sets up the ticket tracker and deed store, then runs ljos onboard for each runner it finds. Outside a temporary home, it also sets up the memory writer. Under a temporary home, memory is off unless PACKSET_URL names a pack or a writer port is set. The deed store keeps signed records of the work.
Git needs user.name and user.email, because the tracker commits each change. Without them the heading is still written, and the line is The tracker commit was refused: Author identity unknown. Set it with `git config --global user.name "Your Name"` and `git config --global user.email "you@example.com"`, then run the command again.
Run ljos doctor from your home directory. In a checkout that has .ljos/gates.toml, the config row names that file. On a clean install, ljos doctor prints each row that needs action as that check finishes, then counts those rows in the summary. It prints ljos is ready: memory, tracker and command guard work only when no row needs action, followed by Optional extras: ljos doctor --all. A seat source row says where the seat came from. With no seat named and no earlier write, it says no seat is set, that reads use every seat, and how to set LJOS_SEAT. ljos seat reports none rather than presenting the read sentinel as a seat. A write that had to pick a seat uses the login name, or a short stable name when that login is missing, and the row names that seat. When the encoder is not installed, an encoder row follows and names the install command this machine can run. That is cargo binstall --locked packset-embed when cargo-binstall is installed, cargo install --locked packset-embed when cargo is, and the release install line otherwise. A writer with no encoder binary is not described as loading, even if an earlier availability value is still present. A sitting gate row follows that. With no agent runner above the shell it says not active here. A missing ljos.toml is not a warning. The defaults apply, and the config row says so. ljos doctor --fix writes that file when asked, and the file sets no keys. The next command is still ljos remember.
ljos doctor --all also prints the optional git hooks row. When core.hooksPath is unset, that row ends with , so run `ljos git-hooks install`. It stays outside the short report and its action-row count.
ljos remember prints the lesson and the first eight characters of its id. With no seat set and no session id in this process, the write uses the login name, or a short stable name when that login is missing, and the first write says to set LJOS_SEAT. A conversation that already has a seat record writes as that seat. A session id only on a parent does not name the seat.
ljos search "lexical default" prints that lesson. A query that shares no word with the stored text, such as which fusion, prints Nothing matched "which fusion". Try a shorter query, such as: ljos search fusion. No match-mode line is printed. When nothing is stored, a shorter search would miss too, and the line names ljos remember "LESSON".
This seat's hits come first. Another seat's lesson is kept when it names the subject, or when the encoder's cosine with the query is at least 0.66. A weaker cross-seat hit does not fill a short list. When those were the only rows, the line is Nothing relevant was found. No match-mode line is printed on that empty page. A tracker ticket whose title matches is included, and then one whose notes match. A title that shares only one common word with a longer query is left out. A distinctive word, or two shared words, still matches. An exact or near-exact title is the first row, while the encoder is loading and after. The row names the ticket id and the title, so ljos recall ID opens it. A busy pack is asked again for LJOS_SEARCH_BUSY_WAIT seconds (2 when unset, 0 does not wait), following Retry-After or a JSON retry_ms, and a writer that becomes free still ranks by meaning. When that wait runs out, search ranks by words, keeps a hit that names the subject, and prints one line on stderr, Memory is busy, so these results are ranked by words. If this persists, run `ljos doctor`. A writer that has not opened, or is not running, gets the same line with starting or not running. The words come from the listing a hook last kept on this machine and this seat's memory slot. ljos recall and ljos sitting print the line once as well. When no words match on a busy writer, the command exits 1.ljos file prints the new id on stdout. Standard error has project:, the heading and the path. A commit that landed is not printed, and neither is a push that landed. ljos file --verbose prints the tracker and sync lines. A refusal is one sentence. ljos file --json keeps those lines in tracker_git and sync.
ljos claim with no id claims the first ready ticket in ljos ready order that no other seat holds, and the first claim creates the claim graph. After ljos file "Pick a codec" -p demo, that claim takes the ticket just filed. A seat that already holds a ready ticket is refused, and the refusal names how to finish or release it. When no ticket is left, the line is claim: no ticket is ready on this seat, so file one with `ljos file "TITLE" -p PROJECT`.
Mem0's default add runs a model over the text. The sentence above is stored as written. The ticket is an Org heading in a git repository, which you can open. beads stores the same kind of queue in Dolt.
Getting started has the output from one run of these commands, then a second seat on the ticket.
To install by hand, with cargo-binstall already on PATH:
cargo binstall --locked ljos packset deedar-cli claimdag-cli vissue-cli vissue-mcp ljos-policyd ljos-consensus
ljos onboard
ljos doctor
ljos offboard takes ljos out of each runner. With no runner onboarded it prints ok, offboard, nothing installed by ljos onboard. ljos uninstall takes the ljos programs off the machine and leaves a stub named ljos that allows hook calls. packset, vissue, deedar and claimdag stay. The memory writer keeps running until packset stop. ljos uninstall --all removes the seat programs.
A second seat
LJOS_SEAT=alice ljos claim ID --assignee alice
LJOS_SEAT=bob ljos claim ID --assignee bob
Bob's claim exits 1, names alice on stderr, and tells him to run ljos send. The ticket stays with alice. Over ljos mcp the same refusal starts with label claim-conflict:.
ljos note writes on the ticket. ljos timeline ID prints that note as unverified tracker text. vissue show ID prints the logbook.
Votes cast from one shell are one voice. ljos consensus says they were folded on that shell. A vote from each seat's own runner is its own voice. The getting-started page shows the fold.
How-to
How-to guides is one task a page: runners, memory, sittings, votes, handover. Two agents on one repository is the page for more than one session on that repository.
The command check
Before an agent's shell command runs, the runner's hook asks ljos-policyd, which answers allow, warn or rewrite.
A warning names the rule and the command runs. ljos is not a sandbox.
ljos policy -- git push --force origin topic prints:
git push --force origin topic
allow warn git-force-push a force push rewrites a published branch
A push onto main or develop warns under sitting-gate until the ticket of the sitting has a settled consensus. When vissue.toml lists one active seat, that seat's own vote is enough for the push. With no seat list, the push waits for two seats.
The MCP server
ljos-mcp serves the same verbs over stdio. By default it lists twenty-two core
tools, guard and memory first: rule, prefer, remember,
search, start, guard_check, file, options, note, recall, show, ready, sitting,
finish, claim, release, send, inbox, reply, vote, consensus and
doctor, each with the prefix ljos_. measurements/mcp-size.txt records
10,520 tokens for the core set against 24,636 for all fifty-seven.
LJOS_MCP_TOOLS=all lists every tool.
{"mcpServers": {"ljos": {"type": "stdio", "command": "ljos-mcp", "args": [], "env": {}}}}
The official MCP Registry lists the server from the crates.io page of ljos, and checks this line there:
- mcp-name: io.github.leidarljos/ljos
Documentation
| Page | Answer |
|---|---|
| What ljos does | Features and every measured number |
| How ljos compares | beads, Mem0, Letta, Zep, Basic Memory, git-bug, Linear, CLAUDE.md, GitHub issues |
| Getting started | Tutorial: install, remember, search, a ticket, a second seat |
| How-to guides | One task a page: runners, memory, sittings, votes, handover |
| Two agents on one repository | The seat each session gets, mail between them, and how they split the tickets |
| Reference | Commands, MCP tools, hooks, rules and variables |
| Explanation | The reason for the design |
Questions and bugs go to GitHub issues. CONTRIBUTING.md covers changes, and CITATION.cff says how to cite ljos. The licence is in LICENSE.
ljoscargo install ljos