Your coding agent learns something every session — and forgets it every session. agentlore keeps the decisions, dead ends, conventions and hazards it learns as a diff in the PR that motivated them, and fails CI when that memory stops being true.
uv tool install agentlore
$ agentlore check --since "$BASE_SHA" MEMORY-HEALTH: 17/18 BROKEN (1 memories, 1 stale, billing) ... FAIL anchors-not-stale -- 1 out of date ... stale memories (code moved, memory did not): DEAD-2026-10-06-5276 The refund window rejects credit notes too changed since d105edc: src/billing/gateway.py -> re-verify, or run: agentlore supersede DEAD-2026-10-06-5276 $ agentlore verify DEAD-2026-10-06-5276 --resolved-by "vendor supports credit notes as of v3.2" verified DEAD-2026-10-06-5276 @ e6d8165 $ agentlore check --brief MEMORY-HEALTH: 17/18 BROKEN -- compile-current # the file your agent reads is now stale $ agentlore compile $ agentlore check --brief MEMORY-HEALTH: 18/18 GREEN
The failure it exists for
An agent fixes a bug, and records the dead end it just disproved. The note is accurate — and it now reads as a live warning to every future agent that touches that code. Nobody re-reads it. Nothing catches it. The next agent routes around a wall that was already torn down.
The agent's prose hedged ("before the fix"). The heading did not — and the heading is the first thing the next agent reads. So agentlore rewrites it rather than trusting anyone to remember.
Every entry is anchored to a path and carries evidence. When the anchored code moves, the gate notices — not the reviewer.
compile-current checks the file your agent actually loads, not just the file you wrote. Recorded-but-undelivered memory is invisible in every direction.
It lands as a diff in the PR that motivated it — reviewed like any other change, in the same review, by the same people.
.memory/ compiles into AGENTS.md, so an entry is a persistent instruction. The gate refuses entries that tell an agent to conceal, to skip the gate, or to weaken a control.
How it works
agentlore add writes a typed entry — decision, dead end, convention or hazard — with the evidence that produced it.
agentlore compile folds the memory into the AGENTS.md your agent already reads. Nothing new to configure.
agentlore check runs 18 checks in CI and fails the build when memory rots. It can annotate the exact file that drifted.
The memory rides the pull request. It is reviewed, versioned and revertible like every other line in the repo.
The gate
A guard that cannot read its own state has not guarded anything. If the
index is unreadable, if a --since ref cannot be resolved, if an id would be
ambiguous — agentlore stops rather than passing quietly.
| A plain AGENTS.md | agentlore | |
|---|---|---|
| Reviewed in the PR that motivated it | no | yes |
| Fails CI when an entry stops being true | no | yes |
| Checks the compiled file your agent loads | no | yes |
| Typed entries (dead end ≠ decision ≠ hazard) | no | yes |
| Lives in git, no service or account | yes | yes |
| Zero dependencies | yes | yes |
Where a plain AGENTS.md is a
file, agentlore is that file plus the record of why each line is there, the change that
put it there, and a gate that notices when it stops being true.
Install
It is one Python file with no dependencies, so there is nothing to resolve, pin or audit beyond the repository itself.
Usually the right answer — the gate is the part that has to run on every PR.
uses: Rudra5417/agentlore@v1
with:
since: ${{ github.event.pull_request.base.sha }}A managed copy of the same file.
uv tool install agentlore
pipx install agentlore
pip install agentloreYou own the file: CI needs no network fetch and no action dependency.
curl -fsSL -o tools/agentlore \
https://raw.githubusercontent.com/\
Rudra5417/agentlore/v0.9.1/agentlore
chmod +x tools/agentloreFor local use, and for an agent to call.
curl -fsSL -o ~/.local/bin/agentlore \
https://raw.githubusercontent.com/\
Rudra5417/agentlore/v0.9.1/agentlore
chmod +x ~/.local/bin/agentloreagentlore init && agentlore check --brief