Khoj + Fable 5: A Second Brain That Knows Your Notes
Point a self-hosted assistant at your documents so Fable 5 can answer from your own notes, not just the internet.
Run this workflow
CI-verified, 4/4 fixtures passing.
Build this with your agent
One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.
Intended Use
Anyone sitting on a pile of notes (PDFs, Word, Markdown, Notion) who wants Fable to answer from them. CI verifies the deterministic spine: the chat-model setting is valid and names claude-fable-5 with model type Anthropic, no key. Fable remembering and answering from your docs is the thinking part and is fenced.
Not for
- Building a product on top without checking the AGPL-3.0 terms (fine for personal use)
- Expecting CI to verify the answers from your docs; that's the fenced model step
The Stack
Tested Against
khoj@latestclaude-fable-5Side effects & data flow
- Network
- none, local only
- Writes
- ./khoj-chat-model.json, ./checkkhoj.mjs
- Credentials
- none required
Prerequisites
- Python 3.10+ (pip install khoj), then run khoj
- An Anthropic API key (Claude API) for claude-fable-5
Steps
- 1
Install Khoj and set Fable as the chat model
pip install khoj, then run khoj and open the settings page. Add Claude as your chat model: set the chat-model to claude-fable-5 and the model-type to Anthropic, then connect a folder of documents.
- 2
What CI checks: the chat-model setting is valid and names Fable
CI confirms the chat-model setting parses, the model type is anthropic, and the chat model is claude-fable-5. That's the deterministic precondition, no key. The remembering and answering are fenced.
cat > khoj-chat-model.json <<'EOF' { "name": "Anthropic", "chat_model": "claude-fable-5", "model_type": "anthropic" } EOF cat > checkkhoj.mjs <<'EOF' import { readFileSync } from 'node:fs'; const cfg = JSON.parse(readFileSync('khoj-chat-model.json', 'utf8')); let ok = true; function check(label, cond){ console.log(label + ': ' + (cond ? 'yes' : 'NO')); if(!cond) ok=false; } check('chat-model setting parses', true); check('model type is anthropic', cfg.model_type === 'anthropic'); check('chat model is claude-fable-5', cfg.chat_model === 'claude-fable-5'); if(!ok){ console.log('khoj config check FAILED'); process.exit(1); } console.log('khoj config check OK: anthropic chat-model claude-fable-5'); EOF node checkkhoj.mjs - 3
Ask it about your docs (the model step, not checked by CI)
Connect your folder and ask Khoj about your own notes. Fable finds the right passage and answers, which runs the model, so CI never claims it. The badge covers the chat-model setting, not the answer.
Eval, 4 fixtures
Last passed: verified todaymodel-typecontainstimeout 30s · max $0Expected:
model type is anthropic: yesnames-fablecontainstimeout 30s · max $0Expected:
chat model is claude-fable-5: yescheck-okcontainstimeout 30s · max $0Expected:
khoj config check OK: anthropic chat-model claude-fable-5clean-exitexit_codetimeout 30s · max $0Expected:
0
Results
~35,000 stars; the difference between a model that knows the internet and one that knows your project.
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).