AI Second Brain
Logseq notes, Khoj search, Karakeep + Linkwarden bookmarks, AFFiNE workspace, MarkItDown ingestor — feed everything you read into one queryable graph.
What's in this pack
This pack assembles the six self-hosted tools that together form a personal AI-queryable knowledge graph — the "second brain" pattern Tiago Forte popularized, but with the AI search layer that finally makes the brain useful rather than just a graveyard of saved articles.
| # | Asset | Role | What it solves |
|---|---|---|---|
| 1 | Logseq | Notes | Local-first outline editor with bidirectional links |
| 2 | Khoj | AI search | Semantic search + chat across all your notes and docs |
| 3 | Karakeep | Bookmarks | Self-hosted Pocket replacement with AI auto-tagging |
| 4 | Linkwarden | Bookmarks | Collection-style bookmarking with full-page archiving |
| 5 | AFFiNE | Workspace | Notion-style block editor with whiteboard mode |
| 6 | MarkItDown | Ingest | Microsoft tool that converts PDF/Word/PPT to clean Markdown |
The split between Karakeep and Linkwarden is deliberate: Karakeep optimizes for AI tagging and quick capture, Linkwarden optimizes for full-page archiving (Wayback-style snapshots so dead links don't kill your knowledge). Most teams run both, with Karakeep handling the daily firehose and Linkwarden archiving the canonical references.
Why a second brain matters now
Three shifts make this stack much more useful than the 2020-era Notion-only setup:
- AI search makes notes worth keeping. Pre-LLM, your knowledge base was only useful if you remembered it existed and could phrase a search query. Khoj's semantic search means you can ask "what did that paper about RAG context windows say about chunking?" and get the answer even if you saved it as
random_pdf_3.pdf. - Local-first means privacy isn't a tradeoff. Logseq stores its graph as plain Markdown files in a folder you control. Khoj runs locally against your Ollama or similar — none of your private notes leave your machine. Notion AI sends every query to OpenAI; this stack doesn't.
- MarkItDown closes the import gap. The hardest part of any second brain has always been getting the inputs in. MarkItDown converts PDFs, Word docs, PowerPoint slides, even YouTube transcripts to clean Markdown that Logseq and Khoj index natively.
Install in one command
# Install the entire pack into the current project
tokrepo install pack/ai-second-brain
# Or pick individual assets
tokrepo install logseq
tokrepo install khoj
The TokRepo CLI sets up Docker Compose for the server-side tools (Khoj, Karakeep, Linkwarden, AFFiNE), drops Logseq config into your existing graph directory, and installs MarkItDown as a CLI you can pipe files through. A ~/brain/ directory becomes the canonical mountpoint for all of it.
Common pitfalls
- Treating Logseq pages as files. Logseq's bidirectional links break if you rename pages outside the app — the inbound references stay pointing at the old name. Use the in-app rename or a Logseq plugin to refactor; never
mvthe markdown files. - Khoj indexing the entire disk. By default Khoj indexes everything you point it at. Don't let it scan ~/Downloads or your work git repos — index a curated
~/brain/directory instead, or you'll get noisy results and slow re-indexes. - Karakeep without a tagging policy. AI auto-tagging is excellent but inconsistent across sessions. Define 10-20 stable top-level tags (
#paper,#tutorial,#tool,#person) and let the AI fill in subtags. Otherwise you'll have 400 single-use tags after a year. - Linkwarden full-page archive on every link. Full-page archives consume real disk space (5-50 MB per archive). Selectively enable archiving for collections you actually want to outlive link rot — daily news links don't need it.
- AFFiNE as the only writing surface. AFFiNE is great for multimedia and whiteboarding but its plain-text export is rough. For text-heavy work that you want to query later, write in Logseq (Markdown native) and embed the Logseq pages in AFFiNE for rich layout when you present.
Recommended workflow
A typical knowledge capture flow looks like this. You read an article in your browser; Karakeep extension grabs it, AI tags it #paper #ml. Once a week you triage Karakeep — promote the keepers to Linkwarden for permanent archive. Important PDFs go through MarkItDown into ~/brain/clippings/. Daily notes and meeting summaries live in Logseq with [[Person Name]] and [[Project]] tags. Khoj indexes the whole thing nightly.
When you need to recall, you don't try to remember where it lives. You ask Khoj "what was the argument about MoE routing in that paper from January?" and it surfaces the right note plus the source PDF.
6 assets in this pack
Frequently asked questions
Is this pack free to run?
Yes. All six tools are open source under permissive or AGPL licenses; you self-host. Khoj's online tier is paid for hosted convenience, but the core engine runs free against Ollama or any local LLM. Compute requirements are modest — Logseq is client-only, Khoj's indexer fits on a Raspberry Pi, the rest run in lightweight Docker containers. Storage is the variable: full-page archives in Linkwarden grow fastest.
How does this compare to Notion AI or Mem?
Notion AI is faster to start with and has slicker mobile apps, but everything you write goes to OpenAI for AI features and to Notion's servers for storage. The pack here gives you 80% of the AI capability self-hosted with zero data leaving your network — at the cost of running Docker containers yourself. Mem is closer in spirit (AI-native notes) but is closed-source and SaaS-only. Pick managed if convenience trumps privacy; pick this pack if your notes contain anything sensitive.
Will this work with Claude Code or Cursor?
Yes. Khoj has an MCP server and an OpenAI-compatible API, so Claude Code can query your second brain as a tool — useful when you want the agent to ground answers in your prior research instead of re-Googling. Logseq has a community MCP that lets agents read and write directly to your graph. The TokRepo asset pages document the wiring per tool.
What's the difference between Karakeep and Linkwarden?
Karakeep is capture-first with strong AI tagging and a fast browser extension — best for the 50 links a day you save in passing. Linkwarden is archive-first with collection trees and full-page snapshots — best for the curated set you want to outlive the original site. They overlap, but the workflow we recommend uses Karakeep for inbox, Linkwarden for canonical reference.
Operational gotcha when running this stack?
Backups. Most users discover their backup strategy is broken right when they need it — Logseq's graph is local files (back up the directory), Khoj has its own SQLite + vector index (snapshot the data dir), Karakeep and Linkwarden run their own Postgres. Set up a single nightly job that snapshots all four, copies to S3 or B2, and tests restore once a quarter. The pack ships a backup.sh template for this.
12 packs · 80+ hand-picked assets
Browse every curated bundle on the home page
Back to all packs