USE CASE · SECOND BRAIN

POINT IT AT A FOLDER.
EVERY LINK SHOWS ITS EVIDENCE.
REPLAY ANY MOMENT.

One command — xerj brain ~/notes — and a folder of notes becomes a queryable, timestamped, evidence-carrying knowledge graph. No graph database, no ETL, no LLM, no embedding service, no config file. Two questions no note tool answers become one HTTP call each: why does this link exist — every link carries the exact text that taught it, verified byte-for-byte against the file on disk — and what did my notes believe last Tuesday — retired links are kept, never deleted, and any past moment is replayable. Be clear about what this is: XERJ does not understand your notes. It makes the structure you already wrote queryable, timestamped, and evidence-backed — deterministically. Same folder in, byte-identical brain out, which is exactly why an agent can cite it. The proof run below is real and unstaged: this repository's own docs folder — 121 files, 5.7 MB, images and config junk included — to 364 links in 0.7 s.

FOR·AI AGENTS·NOTE-TAKERS·LOCAL-FIRST BUILDERS
0.7 s
FOLDER → QUERYABLE BRAIN
121 real files · 5.7 MB · 364 links · re-run converges in 0.14 s with zero duplicates
364
LINKS, EACH WITH ITS EVIDENCE
authored links carry the verbatim quote + byte offset · structural links carry a labeled rationale · absence is shown, never papered over
0
LINKS EVER DELETED
retired links are invalidated, kept, and replayable · excluded links are counted in every response

ONE COMMAND. CAPTURED, NOT STAGED.

The terminal output below is from the verification run, verbatim — the corpus is the XERJ repository's own docs folder, junk included. Fourteen files (images, binaries, one frontmatter file the sniffer misread — documented in the sources) were skipped and said so: exit code 3 is the documented "ready with junk" state, never a silent success.

$ xerj brain /home/claude/ai/xerj/docs
brain 'docs': 121 files (5 MB) under /home/claude/ai/xerj/docs
booted xerj server (pid 339338) — data: …/brain/data
phase A: 7 datasets inferred, 14 junk/skipped files
phase B: indexing 106 files with 8 workers → http://localhost:9340
✓ your second brain is ready — 121 files, 364 links, 0.7s
  → http://localhost:9340/_xerj-console/#/second-brain?brain=docs
  agents: XERJ_URL=http://localhost:9340 xerj-mcp
# run it again: attaches to the live server, converges in 0.14s, exit 0,
# zero duplicate links — determinism observed on real data, not asserted

THE NOTE-GRAVEYARD PROBLEM

THE XERJ ANSWER

WHY DOES THIS LINK EXIST? HERE IS THE SENTENCE.

A live link from the proof run, as the API returns it. The quote was checked byte-for-byte against the source file on disk — that exact text exists at that place in that note. This JSON is the paper trail, and it is the one surface where the raw schema shows; everywhere a human reads, the words are link, believed since, retired, what taught this.

$ curl "localhost:9340/_graph/docs/ego?node=$NODE&include_nodes=true"
{
  "type": "mdlink",
  "detector": "mdlink@1",
  "confidence": 0.9,
  "direction": "in",
  "valid_at": 1785165764150,     # believed since
  "invalid_at": null,            # never retired
  "evidence": {
    "quote": "Consistent with the [earlier run](wordpress-audit-with-xerj.md), and now with a",
    "source": "research/wordpress-authz-agentic-audit.md",
    "offset": 1568               # byte offset in the section — verified verbatim on disk
  }
}

The honest fine print, which the dashboard also carries: structural links — files that sit together, sections in sequence — carry a generated rationale ("these files sit together in notes/"), labeled as one and never presented as text from your note. A manually asserted link may carry no evidence at all, and then the row says no evidence recorded — asserted, not detected. The claim is "every link shows its evidence" — not "every link has a quote".

WHAT DID MY NOTES BELIEVE LAST TUESDAY?

The full loop, run live during verification — assert, retire, replay. Note the third call: when links are excluded from an answer, the response counts them instead of silently narrowing the world.

# assert a link
$ curl -X POST localhost:9340/_graph/docs/link -d '{"src":"…","dst":"…","type":"manual"}'
→ 201 · edge_id 51a2a80c…

# retire it — invalidated, not deleted
$ curl -X DELETE localhost:9340/_graph/docs/link/51a2a80c…
→ {"invalidated": true, "invalid_at": 1785405730710}

# ask NOW: gone — and the response says one link was excluded
$ curl "…/ego?node=…"
→ 0 links · "not_shown": {"expired_excluded": 1}

# replay the moment before the retirement: the link is BACK,
# with its quote, and its later retirement visible
$ curl "…/ego?node=…&as_of=$T_BEFORE_RETIRE"

The dashboard makes the same loop physical: a belief-time scrubber that narrates what changed — "2 appeared · 1 retired between then and this moment" — with retired links drawn struck-through, and a URL that pins a brain, a note, and a moment, so a link you share is a belief state, not just a page. Through the whole verification session the ledger stayed exact: 364 detected + 2 asserted belief intervals, 364 live / 2 retired — and the CLI, the HTTP API, and the MCP surface all reported the same numbers.

THE BUYER WHO CARES MOST IS AN AGENT.

Neighborhood-plus-moment-plus-evidence is what temporal-knowledge-graph stacks for agents charge a graph-database-plus-LLM pipeline for. XERJ ships it in one static binary, over MCP: four verbs — xerj_brain_ego, xerj_brain_link, xerj_brain_unlink, xerj_brain_overview — proven live in the verification run, round-tripping real counts under contract: xerj-second-brain/1. And because detection is deterministic, the agent's citations are re-derivable: the quote in the answer traces to a file and a byte offset that will be there tomorrow.

$ XERJ_URL=http://localhost:9340 xerj-mcp
# tools/list → …, xerj_brain_ego, xerj_brain_link, xerj_brain_unlink, xerj_brain_overview
# every brain answer carries not_shown accounting — the agent knows what it wasn't shown

WHAT IT DOES NOT DO.

A use case is only worth publishing with its limits attached. These are the four that matter, stated the way the sources state them.

01
IT DOES NOT UNDERSTAND YOUR NOTES.
The detectors are structural and lexical — wiki-links, markdown links, hrefs, directory adjacency, section sequence. No semantic similarity, no entity extraction, no LLM anywhere in the loop, and the node store's recall is lexical feature hashing, which the API declares verbatim ("embedder": "lexical-feature-hash"). What you get is the structure you already wrote, made queryable — nothing more is claimed.
02
IT IS NOT A GRAPH DATABASE.
No Cypher, no shortest-path, no PageRank, no unbounded traversal — by design. Links are ordinary documents in a search engine; expansion is a bounded, batched read capped at 2 hops per call, and asking for more returns a 400 that says exactly this. You iterate from the response's reachable set.
03
WITHOUT AUTHORED LINKS, THE BRAIN IS MOSTLY SORT ORDER.
On a folder with no wiki-links or markdown links, directory-adjacency and sequence links dominate — structure XERJ inferred from file layout, not structure you wrote. The dashboard splits AUTHORED from STRUCTURAL counts so this is visible instead of flattering: "0 authored · 214 structural" is an honest description of such a corpus, and the dashboard will say it.
04
SCALE AND TOKENS: NOT MEASURED.
The published numbers are one corpus: 121 files, 5.7 MB, 364 links, 0.7 s, 12 MB on disk (~2.1× source). Behavior at 100k notes is not measured and not claimed; token economics for agents were not measured; no head-to-head against other note tools was run. Two small observed defects ship with the sources rather than hidden: a CLI progress line once over-counted by one (the final summary and the server agreed), and one markdown file with YAML frontmatter was misclassified as YAML and skipped.

READ THE SOURCES.

Everything above is published: the captured run, the verified API responses, the full reproduction recipe down to exit codes and the auth header, and the live contract-check harness that exercises the real dashboard code against a real brain. Setup is one build and one command.

OPEN THE USE CASE REPRODUCE IT
READY?·REQUEST ACCESS

RUN IT ON
YOUR NOTES.

Tell us what your notes look like — the folder shape, the link styles you actually use, the moment you wish you could replay. We'll come back with what the detectors will and won't find there, honestly.

We only use this email to follow up about XERJ — nothing else. No spam, no reselling. ✓ THANKS. WE'LL FOLLOW UP WITHIN ONE BUSINESS DAY.