deja-bob
v0.10.0
Published
MCP server that gives IBM Bob long-term memory — search, retrieve, and compose context from past conversations.
Maintainers
Readme
🧠 Déjà Bob
"You've talked about this before..."
Déjà Bob is a Model Context Protocol (MCP) server that gives IBM Bob long-term memory. By default, each Bob conversation is completely isolated — Déjà Bob bridges that gap, letting Bob search, retrieve, and compose context from any of your past conversations on demand.
Built at the IBM Bobathon (July 2026).
✨ What It Does
- 🔍 Search all your past Bob conversations by keyword
- 📖 Pull context from one or more past sessions into a new prompt
- 🧠 Remember your preferences — tell Bob once, it applies them forever
- 🔗 Link related conversations so Bob surfaces them together automatically
- 🔒 100% local — no network calls, no data leaves your machine
- 💰 Saves tokens — smart retrieval pulls only what's needed, not everything at once
📋 Requirements
- Node.js ≥ 22 — check with
node --version. Download at nodejs.org if needed. - IBM Bob VS Code extension installed and running
🚀 Install (ask Bob to do it)
The easiest way is to just tell Bob to set it up for you.
Step 1 — Open any Bob conversation and paste this:
Please add the deja-bob MCP server to my mcp.json. Use this config:
{
"command": "npx",
"args": ["-y", "deja-bob"]
}
Add it under mcpServers and save the file.Bob will find your mcp.json, add the entry, and save it — no manual file editing needed.
Step 2 — Restart Bob
Reload the VS Code window: Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows) → Developer: Reload Window
Step 3 — Verify it's working
Start a new Bob conversation and say:
show me my past conversationsBob should return your conversation history grouped by workspace. If you see it — you're all set.
Prefer to do it manually? Open
~/.bob/settings/mcp.jsonand adddeja-bobto themcpServersobject:{ "mcpServers": { "deja-bob": { "command": "npx", "args": ["-y", "deja-bob"] } } }If the file doesn't exist yet, create it with the content above.
💬 How To Use It
You never need to interact with the tools directly. Just talk to Bob naturally — it calls Déjà Bob automatically when it detects you're referencing past work.
Pull context from a past conversation
"Using our Blueprint Genie conversation as context, help me write a one-pager for a client.""What did we decide about the database schema in that earlier conversation?""Continue where we left off on the pricing module."Use multiple conversations together
"Use the minikube conversation and the GitOps conversation as context —
now help me write a deployment guide."Bob fetches both threads and answers with full awareness of both.
Search when you can't remember the exact conversation
"Search my past conversations for anything about Kubernetes.""Find conversations where we talked about authentication."Save your preferences (tell Bob once, never repeat)
"I prefer architecture diagrams with swimlanes, not flowcharts."Bob stages this as a preference → confirms with you → stores it permanently. From then on, before drawing any diagram, Bob checks your stored preferences and applies them automatically — in every future conversation.
Other examples:
"Always use TypeScript, never plain JavaScript."
"Keep code responses concise — no over-commenting."
"For slide decks, use a white background with IBM blue accents."Link related conversations
"Link the Blueprint Genie architecture conversation to the deployment guide we made."Once linked, both conversations surface each other as 🔗 Related in every future search — Bob automatically sees the connection.
🛠️ All Available Tools
You don't need to call these directly — Bob uses them automatically. This is for reference.
Conversation Retrieval
| Tool | What it does |
|---|---|
| list_conversations | Browse all past conversations grouped by workspace |
| search_conversations | Full-text search with keyword + recency scoring |
| get_conversation_context | Fetch a conversation thread (summary_only, summary, or full) |
| compose_prompt | Inject context from multiple past conversations into a new prompt |
Preference Memory
| Tool | What it does |
|---|---|
| store_user_facts | Stage a preference, decision, or constraint for confirmation |
| confirm_user_facts | Activate staged facts after you approve them |
| reject_user_facts | Discard staged facts you don't want saved |
| get_known_preferences | Retrieve your stored preferences — filterable by topic |
| get_pending_facts | See all facts waiting for your confirmation |
| delete_user_fact | Permanently delete a stored fact |
| list_uncanonicalized_topics | Detect fragmented topic labels |
Conversation Linking
| Tool | What it does |
|---|---|
| link_conversations | Store a typed relationship between two conversations |
| summarize_conversation | Cache a TL;DR to speed up future lookups |
Task Templates
| Tool | What it does |
|---|---|
| save_task_template | Save a step-by-step procedure for a repeatable task type |
| get_task_templates | Retrieve saved templates — filterable by topic or free-text query |
| delete_task_template | Permanently delete a template by ID |
🏗️ How It Works
Bob stores all conversations in a local SQLite database at ~/.bob/db/bob.db. Déjà Bob reads from that database — it only writes summaries, preferences, and link edges that you explicitly create.
~/.bob/db/bob.db
├── tasks — one row per conversation (id, workspace, title, summary)
├── messages — every user + assistant message
├── user_facts — your stored preferences, decisions, and constraints
├── conversation_links — typed relationship edges between conversations
└── task_templates — reusable procedure outlines for repeated task typesThe server runs as a local stdio process — no API calls, no telemetry, nothing leaves your machine.
⚠️ Important: Déjà Bob reads Bob's private internal database directly — there is no official Bob API for this. The internal schema (
task_type, column names, message format) is undocumented and could change in a future Bob update without notice. If a Bob update breaks Déjà Bob, check the GitHub repo for a compatibility fix.
❓ Troubleshooting
Bob doesn't seem to be using Déjà Bob
- Make sure you restarted Bob after editing
mcp.json - Check the MCP panel in Bob's sidebar —
deja-bobshould appear with a green status dot - Try explicitly asking:
"list my past conversations using deja-bob"
npx deja-bob fails with a Node version error
- Run
node --version— you need v22 or higher - Download the latest LTS from nodejs.org
mcp.json already has other servers
- Just add
deja-bobinside the existingmcpServersobject alongside the others:
{
"mcpServers": {
"some-other-server": { "...": "..." },
"deja-bob": {
"command": "npx",
"args": ["-y", "deja-bob"]
}
}
}💰 Token Cost — Cheaper Than Copy-Pasting
The common assumption is that pulling context costs more tokens. In practice, Déjà Bob saves tokens compared to manually copying old conversations into a new chat.
Why it's cheaper
| Approach | What happens to your context window |
|---|---|
| Manual copy-paste | The entire pasted content sits in the window for the whole conversation, whether Bob needs it or not |
| Déjà Bob summary mode (default) | Loads only user + assistant messages — typically 60–70% smaller than the full thread |
| summary_only mode | Returns just a stored TL;DR — near zero cost, a few hundred tokens |
| Stored preferences | Pre-extracted facts from a tiny DB table — cheaper than any conversation lookup |
| Scored search | Returns snippets first — Bob only fetches the full thread if the snippet confirms it's relevant |
The compounding benefit
The more you use it, the cheaper it gets:
First lookup → full thread loaded → Bob caches a summary
Second lookup → summary only → ~90% cheaper
Third lookup → summary only → ~90% cheaperAfter a few sessions of normal use, most lookups cost almost nothing because summaries are already stored.
When to use each mode
| Mode | Cost | Use when |
|---|---|---|
| summary_only | ~Cheapest | You just need the TL;DR of a past conversation |
| summary (default) | ~Medium | You need the full back-and-forth but not tool call noise |
| full | ~Most expensive | You need every message including tool calls |
| get_known_preferences | ~Cheapest | Checking stored preferences before a task |
💬 Feedback
Not accepting pull requests yet — but I'd love to hear what you think.
If you run into a bug, have an idea, or want to suggest an improvement, send me a Slack message at @Blakely Pritchard.
See CHANGELOG.md for full version history and design decisions.
📄 License
Custom — IBM internal use · Free for IBM employees to use. No modification, redistribution outside IBM, or commercial use outside IBM without permission. Contact [email protected] for other uses.
Made with IBM Bob · Built at IBM Bobathon July 2026
