Skip to content

Lineleaf / Context lineage & invalidation for AI agents

Every AI memory knows where it came from.

Lineleaf records how every memory, embedding, summary and agent plan was derived. When a source is erased, poisoned or corrected, you see the blast radius, repair only what it touched, and keep a signed receipt.

Design Partner Preview · v0.1 Spec · Open-source core planned

For agents$ curl -s https://lineleaf.dev/llms.txt
CLI · v0.1 spec$ lineleaf inspect gmail:msg_8812 → 5 descendants · 4 stores · dry run
Planned adaptersMem0Zep/GraphitiLettaLangGraphpgvectorPineconeRedis

The problem

The problem

Memory is write-optimized. One fact fans out into an embedding, a graph edge, a summary, a cached answer, and an agent’s next action. When the source changes, gets erased, or turns out poisoned, nobody knows what else is now wrong.

One source. Three ways it goes wrong.

One fact becomes an entire system of copies.

The source can be erased, poisoned or simply wrong. Each time, the copies have to follow. Only the copies.

Choose a trigger

GDPR erasure

Fig. 2 · invalidate() · Art. 17

An email reading “Prefer aisle seat; passport #…” is erased under GDPR Article 17. The erasure travels down the lineage: the memory, embedding and cached answer are purged, the summary is rebuilt from what remains, the plan is marked stale, and a signed erasure receipt is issued.

One source, five descendants

Fig. 1 · derive()

A source record, “I live in Vancouver.”, branches into a memory, an embedding, a cached answer, a summary and an agent plan, each linked back by a cobalt lineage rule.

Trace any answer to its origin

Fig. 3 · why()

An agent’s answer about Kitsilano is traced backward through the cached answer, embedding and memory to its origin: “I live in Vancouver.”

Every action, on a signed receipt

Fig. 4 · plan.execute()

Six completed actions fold into a compact receipt with a sha256 digest and an ES256 signature stamp.

Three operations · one inspector

See the blast radius before anything is touched.

Pick a trigger, run the dry run, then execute the cascade and keep the signed receipt.

derive()
Built this graph as the agent wrote: every node and edge below.
→ recorded automatically
invalidate()
Plans the change as a dry run, then cascades it through every store.
→ Run dry-run · Execute cascade
why()
Explains any record: its fingerprint, parents, children and fate.
→ click any node
lineleaf · inspectorInteractive browser simulation · Zero-content metadata ledger
Choose a trigger

Trigger · gmail:msg_8812

The user invokes their right to erasure (GDPR Art. 17) for one email. Five records were derived from it, across four stores.

Blast radius · 5 descendants

Developers

Instrument once, or not at all.

Wrap the agent runtime and every tool_output → context → memory_write hop is captured as an edge. Or call the three operations yourself, with TTLs, dry runs and receipts.

v0.1 spec · zero-code

agent.py

from langgraph.store.postgres import PostgresStorefrom lineleaf.integrations.langgraph import instrument store = PostgresStore.from_conn_string(DB_URL)agent = instrument(builder.compile(store=store))   # your graph, unchanged # Every run now records its own lineage:#   tool_output → context → memory_write → pgvector, redis# No derive() calls. Edges carry ids and sha256 fingerprints, never content.agent.invoke({"messages": [message]}, config)

Design Partner Preview · v0.1 Spec

Read the v0.1 spec

Today’s workarounds

Deleting the source was never the hard part.

What teams do now when a source is erased, poisoned or corrected, and what each approach leaves behind.

  • Delete raw source & hope

    Backflow: summaries, embeddings and caches keep the fact alive.

    Cross-store cascade
    No
    Surgical (preserves valid memory)
    Yesnothing else is touched, not even the copies
    Notifies running agents
    No
    Signed audit receipt
    No
  • Nuke & rebuild entire user memory

    Destroys valuable learned state; high token cost.

    Cross-store cascade
    Partialonly the stores you remember
    Surgical (preserves valid memory)
    No
    Notifies running agents
    No
    Signed audit receipt
    No
  • Blanket TTL expiration

    Stale or poisoned beliefs stay active until they expire.

    Cross-store cascade
    Noeach store on its own clock
    Surgical (preserves valid memory)
    Novalid memory expires too
    Notifies running agents
    No
    Signed audit receipt
    No
  • Single-store memory delete (Mem0 / Zep native)

    Deletes inside that product. Your other vector indexes, Redis caches and LangGraph state are out of its reach.

    Cross-store cascade
    Noone store
    Surgical (preserves valid memory)
    Yeswithin that store
    Notifies running agents
    No
    Signed audit receipt
    Nonone across stores
  • Lineleaf lineage graph

    v0.1 design: cross-store cascade, surgical rebuilds, live webhooks, signed receipts.

    Cross-store cascade
    Yesvia adapters
    Surgical (preserves valid memory)
    Yesrebuilds from valid parents
    Notifies running agents
    Yeslineage.stale webhooks
    Signed audit receipt
    Yessha256 chain · ES256

Architecture

Lineleaf sits beside the stack you already use.

Lineleaf beside an agent stackSource write: data flows from sources through your agent into your stores, unchanged. The middleware streams one edge per hop (identifiers and a sha256 fingerprint, no content) into the lineage ledger.SOURCESGmailSlackMCP toolsAgent runtimeLangGraph · customlineleaf middlewareMem0pgvectorPineconeRedisLINELEAF · LEDGERedgegmail:msg_8812 → mem0:mem_7f2aedgemem0:mem_7f2a → pgvector:emb_3310edgepgvector:emb_3310 → redis:ans_88edgemem0:mem_7f2a → summary:sum_12
Source write: data flows from sources through your agent into your stores, unchanged. The middleware streams one edge per hop (identifiers and a sha256 fingerprint, no content) into the lineage ledger.

Lineleaf tracks relationships, identifiers, and fingerprints, not another copy of the underlying content.

In development
Lineage ledger, SDK and middleware
Planned adapter
Mem0, Zep/Graphiti, Letta, LangGraph, pgvector, Pinecone, Redis
Adapter interface
Any store you operate yourself

Design partners

Help define the first release.

Lineleaf is looking for teams building assistants, agents, and AI products with persistent memory. Design partners will help shape the first adapters, invalidation workflows, and audit experience.

We’ll only use this to reply. Privacy · Full questionnaire