Troubleshooting
Fix RetainDB auth, source, memory, MCP, and dashboard issues quickly.
Most RetainDB issues come from five places:
- API key missing or exposed in the wrong place.
- Project or scope mismatch.
- Source not indexed yet.
- Async memory writes not visible immediately.
- Agent prompt does not tell the model to use RetainDB.
Quick Triage
| Symptom | First check |
|---|---|
| 401 or unauthorized | API key header and server-side env vars |
| dashboard works but agent does not | MCP/API project and key |
| company brain answer is empty | source status and selected project |
| memory search is empty after write | include_pending: true and same user_id |
| model ignores memory | prompt injection of context |
| source disappeared from answers | source was deleted, paused, failed, or policy-filtered |
I Get 401
Check:
RETAINDB_API_KEYexists where the server or MCP process runs- request sends
Authorization: Bearer ...orX-API-Key - key starts with
rdb_ - key was not rotated
- call is not happening in browser-side code
Dashboard users do not use API keys. Agents and servers do.
Company Brain Is Empty
Check:
- Same
projectin dashboard, MCP, HTTP, and SDK. - Source status is
readyorindexed. - Query mentions something actually present in the source.
- Source is not paused or deleted.
- API key has access to the project/source.
Useful command:
bash
curl "https://api.retaindb.com/v1/sources?project=production" \
-H "Authorization: Bearer $RETAINDB_API_KEY"Source Sync Failed
Check:
- latest error message
- account connection or token validity
- whether the source type is actually enabled
- include/exclude rules
- file size or crawl limits
- retry count and last attempted time
Fix the source, then trigger sync again from the dashboard or:
bash
curl -X POST "https://api.retaindb.com/v1/sources/src_123/sync" \
-H "Authorization: Bearer $RETAINDB_API_KEY"Memory Search Is Empty After Write
Check:
- same
project - same
user_id - same
session_idif session-scoped - query is semantically related to the memory
include_pending: trueimmediately after async writes
Async writes are normal. They keep app latency low while indexing happens in the background.
MCP Agent Cannot Use RetainDB
Check:
- MCP host was restarted after config changes
RETAINDB_API_KEY,RETAINDB_API_URL, andRETAINDB_PROJECTare in the MCP server env- host supports local command MCP servers
list_sourcesworks before testingcontext
Ask the agent:
txt
Call list_sources in RetainDB and report the project and source statuses.Model Responses Ignore RetainDB
Check:
- the app actually injects RetainDB
contextinto model messages - the system prompt says to use RetainDB when relevant
- the model is told not to guess when context is missing
top_kormax_resultsis not too low- source context is not too noisy
Good instruction:
txt
Use RetainDB context as evidence. If RetainDB does not answer the question, say what is missing.What To Include In Support Reports
Include:
trace_id- project name/id
- route or MCP tool used
- source id if source-related
- timestamp
- expected behavior
- actual behavior
Do not include API keys, full private documents, or full customer transcripts.
Next: Errors, Sources API, or MCP Setup.
Was this page useful?
Your feedback helps us make the product easier to ship with.