Lossless · Local-first · Apache-2.0

Long-term memory
for your agents.

Your agents forget everything between sessions, and their history is scattered across tools you can't search. Moraine keeps the complete trace of every session — exactly what happened, not a summary — and makes it searchable, so agents can recall everything they've ever done. It all stays on your machine.

$ uv tool install moraine-cli
Apache-2.0 100% local No account, no cloud
moraine.eventsrecent sessions
mo·raine /məˈreɪn/ noun, geology

the ridge of rock and sediment a glacier deposits as it moves and melts away.

Your agents are the glacier. Moraine is the record they leave behind.

Lossless by construction

Markdown memory forgets.
The traces are the truth.

Every other "agent memory" asks the model to write down what it thinks mattered. That push model is lossy by definition — it editorializes, compresses, and the instant the note is written the real detail is gone. Moraine never summarizes. It records the complete session trace and lets agents pull from it — you read what actually happened, not a story about it.

Push memory · lossy

The agent writes notes.

memory.md~ the agent's guess
# what I remember
- fixed the socket thing (i think)
- routing changed — ask the user later
- use the old config path
- TODO: write this up properly
- …
- …

↳ only what the agent chose to keep — the rest is gone.

A summary chosen in the moment: editorialized, partial, and stale the instant it's written. What it left out, you can never get back.

Moraine · lossless

Moraine keeps the trace.

session 7f3a · codexverbatim
14:02user"the socket routing looks wrong…"
14:02toolgrep -r mcp.sock crates/
14:03asstpatch central proxy → log to stderr
14:05toolcargo test → 142 passed ✓
14:06asst"central socket at ~/.moraine/run/…"

↳ every turn, tool call & token — recorded, queryable.

The raw record of what actually happened. Agents pull from ground truth — and you can always re-read the exact session, byte for byte.

What you get

One unified record of everything your agents did.

Conversation turns, tool calls, token counts and timestamps from every harness, in one consistent schema you can browse, query, and search.

For anyone who runs agents all day — across more than one tool.

Query the raw record

Turns, tool calls, tokens and timing land in one open schema. Point your own SQL, dashboards or notebooks at moraine.events — no lock-in, no black box.

Realtime ingest + backfill

Watches Codex, Claude Code, Cursor, Kimi, Hermes and Pi session files live, and indexes your entire existing history on first run.

Monitor UI

Browse sessions, inspect live analytics, and check ingest health at 127.0.0.1:8080 — token, turn and concurrency charts included.

Recall for your agents

Agents search their own past decisions, fixes and errors on demand — the whole record, exposed as tools they already know how to call.

Cross-provider search

One keyword search spans every harness at once. Find that decision, fix or error wherever it happened — whichever agent did the work.

Fully local by default

Runtime state lives under ~/.moraine. Nothing leaves your machine unless you point Moraine at remote infrastructure.

How it works

From scattered session files to one searchable history.

~/.codex/sessions/…jsonl +5
SourcesYour sessions
Every harness you run — watched live and backfilled on first start.
then
turn · tool · result
CaptureThe complete trace
Every turn, tool call and result, recorded verbatim — not summarized.
then
moraine.events
StoreOne local record
A fast local store, keyword-indexed so anything is instantly searchable.
then
search · open · list
RecallBrowse & retrieve
See the whole fleet in the monitor; agents pull what they need on demand.
Supported harnesses

Six harnesses. One trace stack.

Moraine ships ingestion adapters for the agent tools you already use — every source runs live and backfills on first start, enabled by default.

CX
Codex
codexlive + backfill
CC
Claude Code
claude-codelive + backfill
KI
Kimi CLI
kimi-clilive + backfill
CU
Cursor
cursor · cursor_sqlite
HE
Hermes
hermeslive + backfill
PI
Pi Coding Agent
pi-coding-agentlive + backfill
Agent MCP search

Give every agent recall of every session.

Add a few lines to your harness instructions and your agents stop asking you what already happened. They search the record themselves — across providers, in realtime.

  • list_sessionsEnumerate recent and active sessions, any harness.
  • search_sessionsKeyword search over the full trace history.
  • openPull a specific session's turns, tools and context.
Monitor

Watch your whole agent fleet, live.

Generation tokens per model, turns per model, concurrent sessions, and a searchable session list — updating in realtime at 127.0.0.1:8080.

127.0.0.1:8080
Moraine monitor dashboard showing live analytics across six models — generation tokens per model, turns per model, concurrent sessions — plus a searchable list of agent sessions from Codex, Claude Code, Cursor, Hermes, Kimi and Pi.
Get started

Install and run in three commands.

Stand up your local trace stack, then point your agents at their own memory.

1uv tool install moraine-cli
2moraine up
3moraine status

Then add the search guidance to your harness — your agents do the rest.