.
        .:.
       .:::.
      .:::::.
     .:::::::.
    .:::::::::.
   .:::::::::::.
  .:::::::::::::.
 .:::::::::::::::.
.:::::::::::::::::.
  .:::::::::::::.
   .:::::::::::.
    .:::::::::.
     .:::::::.
      .:::::.
       .:::.
        .:.
         .
  

your agent remembers.

not vector embeddings. not a cloud service. real facts with confidence scores, timestamps, and decay. one sqlite file. one binary. zero dependencies.

SCROLL
A P I L E O F S T O N E S
a cairn is a pile of stones hikers stack to mark a path.

agents leave cairns to mark what they learned and where they've been.
each fact is a stone. the pile is the path.

MCP gave agents tools. cairn gives them a path.

FACTS ACCUMULATE. MEMORY FORMS.

N O T M E M O R Y . W A Y F I N D I N G .
01

bi-temporal tracking

every fact carries two timestamps: when it was true in the world, and when the system learned it. contradicted facts get closed, not deleted. all in sqlite.

02

extraction without LLM calls

the agent calls remember() as an MCP tool during its normal response. no separate extraction pipeline. a pattern-based post-turn hook catches 80% of facts for free.

03

forgetting is first-class

facts decay by confidence, access frequency, and age. stale facts get tombstoned (soft delete with reason). forgetting is auditable. memory gets better over time, not just bigger.

04

federated sync

your phone agent and laptop agent share a brain. peer-to-peer sync via vector clocks. conflict resolution is deterministic. no server required.

05

query by meaning

the agent says recall("what do you know about tamish's setup") and gets back a subgraph. no cypher, no SQL. semantic similarity finds entry points, graph traversal follows relationships.

06

one file. one binary.

no neo4j. no postgres. no redis. no docker. no cloud. one sqlite file you can copy, backup, or delete. one rust binary that runs anywhere. zero external services.

cairn
$ cairn remember --subject tamish --predicate uses_os --object linux
stored: tamish --uses_os--> linux (valid: now)
closed: tamish --uses_os--> macos (was valid: 2024-01-01 to 2025-07-15)

$ cairn recall "what os does tamish use"
tamish --uses_os--> linux (confidence: 1.0, learned: 2025-07-15)
tamish --uses_os--> macos (closed, superseded, learned: 2024-01-01)

$ cairn forget --older-than 30d --confidence-below 0.3
tombstoned 47 facts (reason: stale, low confidence)

$ cairn export > my-memory.json
exported 312 facts, 89 relationships

$
the numbers
0
CRATES
0
SQLITE FILE
0
DEPENDENCIES
0
COMMANDS
architecture
S E V E N C R A T E S . O N E B I N A R Y .
cairn/ crates/ store/ temporal sqlite engine, validity windows, conflict resolution traverse/ graph traversal, depth-limited forget/ decay scoring, garbage collection, tombstones query/ semantic entry points + traversal + ranking extract/ pattern-based fact extraction (no LLM) sync/ vector clocks, peer sync, conflict resolution mcp/ MCP server exposing remember/recall/forget/export bin/ cairn/ CLI + MCP server entry point one sqlite file. one binary. zero external services.
why not the others
N O W A L L E D G A R D E N S .
neo4j requires a running server
vs
one sqlite file, copy it wherever
mem0 locks you into their cloud
vs
self-hosted, your data stays on your machine
zep needs postgres + docker
vs
one rust binary, zero runtime deps
chromadb is a vector db, not memory
vs
temporal facts with decay, not just embeddings
langchain memory is ephemeral
vs
persistent, federated, auditable
install
T H R E E C O M M A N D S . T H A T ' S I T .
copied to clipboard
$ cargo install cairn
# run as MCP server
cairn serve

# or use directly
cairn remember --subject tamish --predicate uses_os --object linux
cairn recall "what os does tamish use"
cairn forget --older-than 30d