Nablo · open source · Apache-2.0

An open-source context compiler for AI agents. Lerim compiles completed agent runs into cited, reusable context.

Lerim reads a finished agent run and keeps the durable parts — decisions, constraints, facts — as cited records, so the next run starts smarter. It is an open-source project by the Nablo team.

$ pip install lerim
context record compiled
decision Use DSPy for extraction, not a hand-written prompt chain.
constraint Every record must cite its source session.
source session 2f9c1a · claude-code · 2026-07-02
why does this record exist? open the source run →
A standalone project
Lerim is a standalone open-source project by the Nablo team. It is one example of the agent work we do — not a stage in the Nablo pipeline, and nothing in Nablo depends on it.
About Nablo →

A compiler, not a live memory store.

Most memory tools write while the agent is still working. Lerim waits until the run is done, then decides what was worth keeping.

Post-hoc

Compiles after the run

Lerim runs on completed sessions, not mid-conversation. There is no race to write memory while the agent is still deciding what happened.

Evidence boundary

Every record cites its source

Each compiled record links back to the session that produced it. You can always ask why a record exists and read the original run.

Selective

Less context, not more

Most routine traces produce no durable record. Lerim drops weak and source-derivable signal instead of growing an ever-larger memory.

A compiler pass between one run and the next.

Capture, compile, reuse. A finished session becomes compact, cited context only after the compiler decides the signal is reusable.

1

Capture

Read completed runs natively from coding agents, or import clean JSONL from any other workflow.

Claude Code Codex Cursor OpenCode
2

Compile

LLM-driven extraction with DSPy pulls out durable decisions, constraints, facts, and evidence. Weak or source-derivable signal is rejected.

3

Reuse

Serve cited context back into the next run through the MCP server and the CLI, for agents and for people.

LerimBench, the eval that ships in the core, measures whether the compiled context actually helps the next run — not just whether records were written.

Capture, compile, eval. Apache-2.0.

The whole core is open. Here is exactly what it does — and where it stops.

01 / Capture

Completed runs in

Native adapters for coding-agent histories, plus generic JSONL import for any workflow that can export a clean trace.

02 / Compile

Cited context out

DSPy-driven extraction turns a finished run into compact, cited context records, each linked back to its source session.

03 / Eval

Prove it helps

LerimBench scores whether the compiled context improves the next run and flags low-value or duplicate records before they pile up.

04 / Interfaces

MCP server and CLI

Recall context and submit completed sessions from any compatible client through the MCP server, or drive it directly from the CLI.

What Lerim does not do

Lerim does not train models.

Lerim compiles and serves cited context. Training or specializing a model is a different business — Nablo's post-training pipeline. About Nablo →

Install the core and point it at a finished run.

$ pip install lerim

Learn what Nablo does at nablo.io.