Motif

engineering memory · open source · self-hosted

The connective layer for the AI agents in your technical team.

Your repo remembers the code. Motif remembers why, and keeps it honest.

getmotif@1.3.3 apache-2.0 · open source
self-hosted · sessions never leave your infrastructure
iremember
01 · collect

One memory for the whole technical team.

Claude Code, Codex and Cursor each keep their sessions in their own format, on whichever laptop happened to run them, which means the work one developer's agent does is invisible to everyone else's. Motif collects all of it onto a server your team hosts, as it happens, attributed to the person and the tool that produced it. One memory, owned by the team that made it. Nothing below is a mockup: this is the running application.

The Motif overview: the team's week of activity, the latest decisions, and what still needs a human Every member's sessions across Claude Code and Codex on one timeline Searching every session, every teammate, every tool Team members, their machines and their roles

every tool

Sessions carry the mark of the agent that ran them, so a Codex session and a Claude Code session sit side by side without translation.

every teammate

Filter by person, project or agent. What your colleague's agent worked out this morning is one search away.

what needs a human

The overview says what is waiting on you: a contradiction to rule on, and the changes that shipped without a test. Personal stays personal until a project is promoted.

fig. i · the whole team's memory at a glance

02 · ask

Ask the agent that lived it.

Collected history is an archive. Asking is what turns it into a participant. Open a colleague's session and put your question to their agent: it resumes read-only on the machine that owns it and answers with the context it actually had. You find out why their agent decided what it decided, from the agent that decided it, without interrupting the person who was there.

A session in Motif: the transcript as chat, an ask box that questions the agent that lived it, pinned notes, and a Continue in panel
$ motif mcp install registering with claude code, codex and cursor… ✓ 5 tools exposed · recall · search · list · get · ask   ✻ Claude Code > why is the webhook retry capped at 30s?   ⚒ motif · recall "webhook retry cap" → 6 notes · 5 excerpts · 1 hop of graph · 1,290 tokens   ● A teammate capped it in a Cursor session in July:   the provider drops the connection past 30s, so a longer   backoff only queued deliveries that could never land.
— on Ada's machine, mid-session — ✻ Claude Code · payments-api · still running ✓ capped the backoff at 30s, tests green   — meanwhile, Ben opens that session in the dashboard — ● live now · @Ada · Claude Code · payments-api 📌 Ben pins: "@Ada the provider drops past 30s, that cap is right"   — back on Ada's terminal, without leaving the session — 💬 @Ben mentioned you on 4f2a9c — open it in the dashboard   the transcript is untouched · the note lives beside it

their agent, not yours

The answer comes from the session that holds the reasoning, running on the machine that owns it. Yours never has to guess what theirs already worked out.

your agent asks too

ask_session is one of the five tools Motif exposes over MCP. Your Claude Code agent can put a question to a Codex session from three weeks ago, and the machine that owns it answers, with the context it had.

while it is still running

Messages ship as they land, so a session shows up mid-run with a live mark. Open a colleague's while they are still in it, read where it has got to, and pin a note in: their daemon tells them in their own terminal.

fig. ii · sessions are not an archive, they are a participant

03 · recall

And your agents query it themselves.

Your agents ask the same questions, over MCP, and get a small cited bundle rather than a pile of transcript. That retrieval is benchmarked rather than asserted: against 1.77 million tokens of real session history it returns the answer for 8 of 9 questions inside a 1,500 token budget, 1,186× smaller than the history it searched. The one miss is written down in the repository rather than rounded away.

8 / 9questions answered from the bundle
1,496median tokens per answer
1,186×smaller than the corpus it searched

No embeddings. No vector store. No API key. Ranking comes from full-text search over the graph the sessions already form, handoff lineage, shared files and shared entities, plus the notes people pinned. It runs entirely on your machine, and you can reproduce it on your own corpus with one command.

zsh · ~/motif
$ npm run bench corpus 1,774,659 tokens · budget 1,500 tokens/answer ✓ hit rate 8/9 · median 1,496 tokens · 1,186× smaller

And you can see the graph it walks.

Everything the sessions form is a graph, not a list. The Weave draws it: entities are diamonds, sessions are dots, and the edges are real relationships, a session that informs an entity, a note that contests another, a handoff lineage. Each entity is sized by its confidence, and the same idea seen in two projects is one knot rather than two. It is the same graph recall walks to answer in fifteen hundred tokens instead of the whole history, now visible.

The Weave: a team's decisions, files and sessions drawn as one graph, a hovered node showing its confidence and ties

fig. iii · the same graph recall walks, drawn

iiverify
04 · decide

Every decision, with the reason still attached.

As sessions go idle the server distils them into a record: the decisions, the files they touched, the topics they belong to, each carrying the reasoning it came from. A lead can read what the team decided and why without reading a single transcript, see when a later session overturned an earlier one, and catch the two that still contradict each other.

Motif memory: decisions, files and topics distilled from sessions, one flagged with a conflict A decision with its rationale, marked current

superseded, not deleted

When a later session changes the answer, the old note is marked superseded rather than quietly overwritten.

conflicts surface

Two sessions that disagree get flagged, so the contradiction reaches a person instead of an agent.

continuity

When someone leaves, their reasoning stays queryable. That is usually the sentence a lead cares about most.

fig. iv · a code graph can be rebuilt · this cannot

05 · verify

Memory that earns its trust.

Distilled memory is a machine's claim about what your team decided, and claims age. Two sessions contradict each other; a note's files get reworked without it. Motif refuses to paper over either. A contradiction is flagged, a note whose sources moved on is marked possibly stale, and both wait for a person rather than quietly becoming the answer an agent repeats.

$ motif memory review # everything waiting on a human, both sides cited
$ motif memory prefer 47 --over 12 # this claim wins; the loser is superseded, not deleted
$ motif memory confirm 31 # vouch for it: verified outranks machine-only
$ motif memory retire 8 # out of recall, still in the record
$ motif memory dispute 22 # flag it as wrong without ruling yet

a number, not a vibe

Every claim carries a confidence score. Corroboration and a human's vouch raise it; conflict, staleness and age lower it. Recall ranks and labels by it, so an agent knows how much to trust each line.

rulings are recorded

Nothing is deleted. Who ruled, over what, and why becomes part of the record, and the losing claim stays as superseded rather than vanishing.

honest under conflict

An unresolved contradiction reaches an agent with both sides and a warning, never as one quiet wrong answer.

fig. v · a machine's claim, ruled on by a person

iiiact
06 · weave it back

The record opens the pull request.

A ruling fixes the memory. The repository can still say what the losing claim said, and the record can see a fix that shipped with no test. On projects you opt in, the Weaver closes both: a daemon claims the job, works in a throwaway worktree, and opens a draft PR on a motif/ branch with the ruling or the session that made the change cited in the body.

$ motif weaver enable ~/work/payments-api # opt this project in, draft PRs only
$ motif weaver scan # untested fixes and features it could close
$ motif weaver run src/limiter.ts # write the missing test → draft PR
$ motif weaver resolve 14 merged # record what happened to it

the rails do not bend

Your checkout is never touched, a default branch cannot be pushed, a repository that already agrees produces no PR, and a job born from personal evidence is never queued.

it is handed the receipt

The agent gets the session that made the change rather than a search task, so it writes the change instead of hunting for it, reading the graph rather than the whole tree.

the loop closes

A fix born from a ruling that gets closed sends that ruling back to review. The record learns from what its own hands produced.

fig. vi · memory with hands, on a leash

07 · move

Any agent. Any teammate.

None of this asks anyone to change tools. A session started in one agent continues natively in another, or lands with a teammate: Motif writes the target's own session file, so the tool opens it as its own history rather than as a paste, and their daemon materialises it on their machine. The tool is a preference. The memory is shared.

claude · ~/webapp
✻ Claude Code · ~/webapp   > the auth test is flaky again, fix the retry logic   ● The backoff timer resets on every ACK, so the third retry   fires early under packet loss. ✓ Updated retry.ts · tests running…   out of context window · 128 messages
➜ ~/webapp motif handoff a1f42c91 --to codex --open reading  128 messages · claude code writing  ~/.codex/sessions/…/rollout-0198f3.jsonl state    thread registered · resume picker updated   or: motif handoff a1f42c91 --to-member "Ben" ✓ launching codex resume 0198f3…
╭─────────────────────────────────────╮ │ OpenAI Codex · ~/webapp │ ╰─────────────────────────────────────╯ › resumed thread 0198f3 · "fix flaky auth retry"   128 messages of context · handed off from claude code   user  so where were we? codex Picking up where Claude left off: retry.ts is patched;       the flaky test needs one more assertion on backoff.   ⏎ send · native session · full history attached

both directions

Claude Code to Codex and back. The target tool treats the session as its own history, because it is.

to a person

Hand a session to a teammate and their daemon materialises it in their editor, ready to resume.

collected either way

Cursor sessions come along too. Read them, search them, hand them to an agent that can resume.

A Claude Code conversation resumed inside Codex on another machine, answering a question about work it never did

fig. v · the session comes with you

and if you work alone

You do not need a team.

None of this needs a team to be worth running. motif up on one machine makes your own history queryable: the decision you made three weeks ago, in a tool you have since stopped using, answered from the session where you made it. The benchmark above was measured on one developer's corpus, not a company's.

zsh · ~/work
$ npx getmotif up server on :4680 · watching claude code, codex, cursor   $ motif recall "why did we drop the retry queue" ✓ answered from your own session, three weeks old

fig. vi · one machine is a team of one