Apache-2.0 context compiler for AI agent teams

Agents should not rediscover yesterday's decisions.

Lerim turns completed agent sessions into cited context records: decisions, constraints, facts, handoffs, and evidence future agents can retrieve before they work.

Self-host the Apache-2.0 core. Hire Lerim for agent harness engineering, prompt and context optimization, private deployment, and SFT/RL model specialization.

Lerim compiles completed agent runs into a context graph for future agents and humans.
Capture Completed source sessions from CLI, MCP, or JSONL
Compile Decisions, constraints, facts, handoffs, and evidence
Reuse Scoped answers and startup briefs for future agents
Open core CLI, adapters, MCP server, context DB, and local runtime
Enterprise help Harness engineering, prompt evals, private deployment, SFT/RL training, and support
First step A focused Context Audit on one repeated workflow

Why it matters

Make agent work survive the run.

Raw traces are too long, too noisy, and too platform-specific to replay directly. Lerim compiles the small operating context future agents actually need.

Continuity

Stop restarting from zero.

Carry forward decisions, constraints, failed paths, and handoffs without replaying every transcript.

Trust

Keep source evidence attached.

Context records stay linked to the session that produced them, so later agents can inspect why the memory exists.

Production

Make memory selective.

Routine chatter, temporary steps, and source-derivable facts should not become permanent operating context.

Enterprise services

Apache-2.0 gives teams the core. We make the agent harness production-grade.

Teams can self-host Lerim. We sell the production work around it: harness design, prompt/context optimization, eval loops, private deployment, and SFT/RL model specialization.

Trace

Lerim Trace Integration

Connect customer agent runs, tools, repos, tickets, chats, and business workflows into Lerim’s trace ingestion layer. Build clean adapters, redaction, scopes, and source-session capture so Lerim can compile reliable context.

Compiler

Context Compiler Optimization

Tune Lerim’s compiler for the customer’s domain: what becomes memory, what gets rejected, how records are merged, cited, retrieved, and injected into future agent runs.

Private

Private Lerim Deployment

Deploy Lerim as the customer’s private context layer: MCP server, context database, eval workflows, audit logs, retention, monitoring, SSO/RBAC, and production support.

Model

Lerim-Native Model Training

Train private models inside the Lerim harness using approved traces, context records, corrections, and evals so repeated workflows run cheaper, faster, and with customer-specific context.

First paid step

Start with a Context Audit.

Pick one repeated AI-agent workflow. We inspect the current harness, trace quality, prompts, context flow, and evals, then deliver a concrete optimization and training roadmap.

Where it fits

Reusable context for repeated business workflows.

The best first deployment is a repeated, evidence-heavy workflow where agents rediscover decisions, constraints, or handoffs between runs.

Research and market intelligence

Source trails, evidence strength, assumptions, rejected leads, brief constraints, and analyst handoffs.

Support and success

Customer constraints, failed fixes, product behavior, escalation reasons, policy references, and next steps.

Security and incidents

Investigation timelines, owner decisions, policy exceptions, remediation evidence, runbook lessons, and unresolved risks.

Engineering automation

Repo conventions, architecture decisions, failed tests, release lessons, and implementation handoffs.

How it works

A compiler pass between completed runs and future agents.

Lerim is not a broad manual memory bucket. Completed sessions become compact, cited context only after the compiler decides the signal is reusable.

01

Connect source sessions

Read native coding-agent histories or import clean custom traces from business workflows.

02

Compile durable context

Extract reusable decisions, constraints, facts, preferences, handoffs, and evidence while rejecting weak signal.

03

Deliver

Serve context into the agent harness through CLI answers, startup briefs, MCP tools, and hosted or private deployment surfaces.

Integration shape

Native capture where possible. MCP everywhere else.

Native adapters are best when an agent has a stable local session store. MCP gives compatible clients recall and completed-session submission without pretending every client has native capture.

Current foundation

Local CLI/runtime, SQLite context store, BAML/LangGraph extraction, native coding-agent adapters, generic trace import, MCP server, context briefs, and cited answers.

Commercial path

Agent harness engineering, prompt/context optimization, private MCP, SSO/RBAC, audit logs, retention, and specialized SFT/RL training sit above the Apache-2.0 core.

What a pilot proves

Evidence first. No inflated memory claims.

A serious rollout should prove the actual workflow: does Lerim find useful evidence, reduce repeated context work, and avoid filling memory with noise?

Retrieval

Find the right source run.

Measure whether future agents retrieve the session that contains the decision, constraint, or evidence they need.

Context budget

Use less context, not less truth.

Track how much transcript text is avoided while preserving the source evidence needed for the next run.

Quality

Reject low-value memory.

Review false positives, duplicates, vague notes, and source-derivable facts before scaling the workflow.

Start here

Bring one repeated workflow.

We will connect the traces, tune the compiler, and prove whether Lerim gives future agents better startup context than raw transcripts or manual notes.

Good audit candidates

  • Agents keep rediscovering decisions, constraints, policies, or failed paths
  • Teams paste old transcripts into new runs because context is not reusable
  • Security or platform teams need private deployment, audit, and retention controls