Knowledge that compiles itself
PDFs, URLs, transcripts, conversations — the Second Brain extracts entities, concepts, and cross-references automatically. Every source strengthens every other source. It doesn't just store what you feed it. It understands it, connects it, and tells you what's missing.
Most AI memory tools dump isolated notes. The Second Brain builds a structured knowledge graph where everything is linked, indexed, and queryable.
PDFs, URLs, transcripts, images, conversations, code — the ingestion pipeline handles them all. Sources are archived immutably. Knowledge pages are generated automatically.
Every source goes through an 8-step pipeline. A single 20-page PDF typically produces 8–15 interconnected knowledge pages with an average of 12 cross-references each.
Your AI loads a 500-word summary of recent context at the start of every session. It always knows where you left off, what changed, and what matters right now. No crawling thousands of notes.
knowledge/ ├── index.md # Master catalog (~1,000 tokens) ├── hot.md # Session cache (~500 tokens) ← loaded first ├── entities/ # People, orgs, products (100-300 tokens each) ├── concepts/ # Ideas, patterns, frameworks ├── sources/ # One summary per ingested source ├── questions/ # Filed answers and research results ├── log.md # Chronological operation history └── overview.md # Executive summary of everything sources/ # Immutable source archive ├── articles/ # Web articles, blog posts ├── transcripts/ # Video/audio transcripts └── .manifest.json # Delta tracking (hash, ingested_at)
Three layers, each with a job. The hot cache rides in every prompt. The index maps everything. Pages hold the depth. Your AI reads exactly what it needs — nothing more.
A factual lookup costs ~1,500 tokens (hot cache + index). A full synthesis costs ~3,000–8,000 (cache + index + relevant pages). Knowledge is compiled once and queried many times — the opposite of RAG, which re-derives everything per query.
Every entity, concept, and source becomes a node. Every cross-reference becomes an edge. The graph renders in real time with physics-based layout that scales to thousands of nodes.
Three messy meeting notes go in. A structured, cross-referenced knowledge base comes out.
Different questions need different retrieval strategies. The Second Brain picks the right mode automatically, or you specify it.
Every answer cites the specific knowledge pages it drew from. Never fabricates. If there's a gap, it tells you what's missing and suggests a source to ingest.
The autoresearch engine runs 3-5 rounds of web research. Broad search first, then gap-filling, then synthesis. Everything gets filed into your knowledge base with citations and cross-references.
// Trigger autoresearch via API const research = await fetch('/v1/memory/research', { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}` }, body: JSON.stringify({ topic: 'LLM memory architectures vs RAG pipelines', max_rounds: 3, max_sources: 15, confidence_threshold: 'medium' }) }); // Returns: source pages, concept pages, entity pages, // master synthesis with citations and confidence scores
The lint engine scans your entire knowledge base for structural issues, contradictions, dead links, and gaps. Run it daily or on-demand.
Every feature from the Karpathy LLM Wiki pattern, reimagined as a cloud-native API with visual tools.
RAG re-derives answers from raw chunks every query. The Second Brain compiles knowledge once into persistent, cross-referenced pages. Knowledge compounds — retrieval doesn't.
| Feature | RAG Pipelines | Note-Taking Apps | REM Labs Second Brain |
|---|---|---|---|
| Knowledge compounds over time | — | — | Yes |
| Auto entity extraction | — | — | Yes |
| Contradiction detection | — | — | Yes |
| Bidirectional cross-references | — | Manual | Automatic |
| Source archive (immutable) | — | — | Yes |
| Session continuity (hot cache) | — | — | ~500 tokens |
| Autonomous research loops | — | — | 3-5 rounds |
| Knowledge health checks | — | — | 8 categories |
| API access | Yes | — | Yes |
| Works with any LLM | Yes | — | Yes |
Ingest sources, query knowledge, and check health — all through the same API you already use for memory.
// 1. Ingest a source await fetch('/v1/memory/ingest', { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}` }, body: JSON.stringify({ source: 'https://arxiv.org/abs/2402.15449', // URL, file path, or raw text namespace: 'research' }) }); // Creates: 1 source page, 4 entity pages, 3 concept pages, 12 cross-refs // 2. Query your knowledge base const answer = await fetch('/v1/memory/ask', { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}` }, body: JSON.stringify({ question: 'What are the tradeoffs between RAG and compiled knowledge?', depth: 'standard', // 'quick' | 'standard' | 'deep' namespace: 'research' }) }); // Returns: cited answer with source pages referenced // 3. Check knowledge health const health = await fetch('/v1/memory/health', { headers: { 'Authorization': `Bearer ${apiKey}` } }); // { orphans: 0, dead_links: 0, contradictions: 3, missing_pages: 12 }
Other tools give you a search box. REM gives you a knowledge base that builds itself.
Three API calls to a knowledge base that understands what you feed it, connects it to everything else, and tells you what's missing. Compounds over time. Feeds the Dream Engine.