Continual learning layer for coding agents and software projects.
Project description
Persistent memory for coding agents.
Summary
Lerim is a memory layer for coding agents.
It watches agent sessions, extracts durable memories with PydanticAI, and saves them as plain markdown in .lerim/memory/.
Why teams use it:
- Keep project decisions and reasoning across sessions.
- Share context between different coding agents.
- Ask questions against past work with
lerim ask. - Keep data local and file-based.
Supported session adapters today: Claude Code, Codex CLI, Cursor, and OpenCode.
How to use
Prerequisites: Python 3.10+ and Docker (recommended).
Install and bootstrap:
pip install lerim
lerim init
lerim project add .
lerim up
If you want a local Docker build instead of pulling from GHCR:
lerim up --build
Use --build from a source checkout (local Dockerfile available). For normal PyPI installs, use lerim up.
Daily flow:
lerim sync
lerim maintain
lerim ask "Why did we choose this approach?"
These commands call the running Lerim service (lerim up or lerim serve).
Quick validation flow before release:
lerim down
lerim up --build
lerim sync
lerim maintain
lerim ask "What are the latest important memories?"
Runtime model
Lerim runs three PydanticAI-based agent flows:
sync: indexes sessions and extracts memories.maintain: merges duplicates, archives low-value items, refreshes memory quality.ask: answers questions with memory context and citations.
Memories are markdown files under project scope (<repo>/.lerim/memory/) with fallback in ~/.lerim/memory/.
Configuration
lerim init can set this up for you.
API keys are read from environment variables (stored in ~/.lerim/.env by default).
# ~/.lerim/.env
MINIMAX_API_KEY=your-key
# add provider keys you use:
# OPENROUTER_API_KEY, OPENAI_API_KEY, MINIMAX_API_KEY, ZAI_API_KEY
Default provider example (MiniMax):
[roles.agent]
provider = "minimax"
model = "MiniMax-M2.7"
fallback_models = ["zai:glm-4.7"]
Commands
Most-used commands:
lerim status
lerim status --live
lerim logs --follow
lerim queue
lerim queue --failed
lerim unscoped --limit 20
lerim memory list --limit 20
Setup and management:
lerim connect auto
lerim project list
lerim project remove <name>
lerim skill install
Alternative to Docker:
lerim serve
Web UI
Web UI is not bundled in this repo yet.
Use lerim dashboard for current status and CLI alternatives.
Docs
- Full docs: docs.lerim.dev
- CLI reference:
src/lerim/skills/cli-reference.md - Package source map:
src/lerim/README.md
Development
uv venv && source .venv/bin/activate
uv pip install -e '.[test]'
tests/run_tests.sh unit
tests/run_tests.sh quality
Contributing
Contributions are welcome.
- Read the Contributing Guide
- Browse open issues
- Agent adapter PRs are especially appreciated -- see
src/lerim/adapters/for examples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lerim-0.1.71.tar.gz.
File metadata
- Download URL: lerim-0.1.71.tar.gz
- Upload date:
- Size: 144.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a978b7adc0db18669a5cce6630c628dfb529a5416f51e6d3e353628c52aac9f1
|
|
| MD5 |
086e6ce43f3f5bc2353a81c93becd1ca
|
|
| BLAKE2b-256 |
540fb6e1eed4964657ceeee12f50bca9acbd5833a94374764d7c9b8694d79736
|
Provenance
The following attestation bundles were made for lerim-0.1.71.tar.gz:
Publisher:
publish.yml on lerim-dev/lerim-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lerim-0.1.71.tar.gz -
Subject digest:
a978b7adc0db18669a5cce6630c628dfb529a5416f51e6d3e353628c52aac9f1 - Sigstore transparency entry: 1284564595
- Sigstore integration time:
-
Permalink:
lerim-dev/lerim-cli@5f34f05d10b264dc12384d191c3f817f2edf8e98 -
Branch / Tag:
refs/tags/v0.1.71 - Owner: https://github.com/lerim-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5f34f05d10b264dc12384d191c3f817f2edf8e98 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lerim-0.1.71-py3-none-any.whl.
File metadata
- Download URL: lerim-0.1.71-py3-none-any.whl
- Upload date:
- Size: 162.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87eb503246cf3886a65d16beaa43d5e233138cb7a819d69c7a4f082144021337
|
|
| MD5 |
b7023f28466f94248446558a368c612e
|
|
| BLAKE2b-256 |
8c2410d25a6562a70bb9fbbe12226e689fb2ad695f113c8ceaa4b4156254301f
|
Provenance
The following attestation bundles were made for lerim-0.1.71-py3-none-any.whl:
Publisher:
publish.yml on lerim-dev/lerim-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lerim-0.1.71-py3-none-any.whl -
Subject digest:
87eb503246cf3886a65d16beaa43d5e233138cb7a819d69c7a4f082144021337 - Sigstore transparency entry: 1284565015
- Sigstore integration time:
-
Permalink:
lerim-dev/lerim-cli@5f34f05d10b264dc12384d191c3f817f2edf8e98 -
Branch / Tag:
refs/tags/v0.1.71 - Owner: https://github.com/lerim-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5f34f05d10b264dc12384d191c3f817f2edf8e98 -
Trigger Event:
push
-
Statement type: