Start with Doctor
F— apply the fix automaticallyS— skip this check?— show more information about the issueQ— quit
agentmemory doctor first whenever something isn’t working. It catches the most common issues — misconfigured MCP wiring, stale port bindings, missing env variables, and agent hook mismatches.
Common Issues
Server won't start
Server won't start
The most common cause is a stale process still holding port Stop Agent Memory cleanly — including any orphaned processes from a previous crashed run:If that doesn’t clear it, kill the process by PID:Then start again:
3111. Check what’s bound:Agent can't connect to Agent Memory
Agent can't connect to Agent Memory
Your agent’s MCP client needs to reach a running Agent Memory server before it can use any tools.If this returns an error or shows no active server, start it first: This refreshes the MCP server block in your agent’s config file with current paths and settings.If the agent is in a sandboxed environment (Flatpak, Snap, or a restricted container) that can’t reach
Confirm Agent Memory is running
agentmemoryRe-run the connect command for your agent
localhost, add AGENTMEMORY_FORCE_PROXY=1 to the MCP server env block and set AGENTMEMORY_URL to a network address the sandbox can reach.Poor recall — agent doesn't seem to remember things
Poor recall — agent doesn't seem to remember things
If your agent isn’t recalling past context, work through these checks in order:1. Enable context injectionBy default, Agent Memory captures memories but doesn’t inject them into conversation. To have past context appear automatically at session start:2. Confirm the agent is using MCP toolsRun 4. Check the memory countIf the server was recently reset or this is a fresh install, there may simply not be enough memories yet. Run
agentmemory status and look at the tool call counts. Zero calls means the hooks aren’t wired or the agent isn’t using the tools. Re-run agentmemory connect <agent> and check the agent’s plugin/MCP configuration.3. Enable consolidation for better long-term recallThe 4-tier consolidation pipeline significantly improves recall quality over time. Make sure it’s enabled (it auto-enables when any LLM key is set, but you can force it):agentmemory demo to seed sample sessions and verify recall is working at all.Too many tokens being used
Too many tokens being used
Agent Memory is designed to be token-efficient, but some configurations increase usage significantly:Reduce the context injection budgetThe default is 2000 tokens injected per session. Lower it:Switch to core toolsFewer tools means less token overhead for the agent to reason about:Disable per-observation compressionSynthetic compression (the default) handles indexing without LLM calls and works well for most use cases.
AGENTMEMORY_AUTO_COMPRESS=true calls your LLM on every observation. Turn it off if you don’t need LLM-compressed summaries:LLM API errors
LLM API errors
If you see LLM errors in logs or poor memory quality, follow these steps:1. Check your API keyOpen This shows the active LLM provider and model. If it shows The demo seeds test sessions and runs searches. If this fails, the LLM call path is broken — check the key and provider config.4. Check provider detection orderAgent Memory checks keys in this order:
~/.agentmemory/.env and confirm the key is present, uncommented, and correct. Keys must not have the export prefix.2. Check which provider is activenoop, no key has been detected.3. Test end-to-endOPENAI_API_KEY → MINIMAX_API_KEY → ANTHROPIC_API_KEY → GEMINI_API_KEY → OPENROUTER_API_KEY. If you set multiple keys, the first one in that order wins. See the LLM Providers guide for details.Can't find my project's memories
Can't find my project's memories
Agent Memory scopes memories by project directory. If you start your agent from a different working directory than you used previously, memories from the earlier sessions won’t appear in searches.1. Make sure you’re running from the same directoryStart your agent from the root of the project you want to recall memories for. Agent Memory records the working directory with each session.2. Browse sessions to find the right projectThis lists recent sessions with their project paths. You can also use the
memory_sessions MCP tool from inside your agent to browse sessions and confirm which project path they’re scoped to.3. Check the real-time viewerOpen http://localhost:3113 and browse the Sessions tab. You can see all sessions, their project paths, observation counts, and timestamps — useful for confirming where your memories actually live.Memory data is growing too large
Memory data is growing too large
Agent Memory is designed to grow over time, but if disk usage becomes a concern, you have a few options:Delete old or irrelevant memoriesUse the Cap observations per sessionLimit how many raw observations are stored per session before consolidation kicks in:The default is
memory_governance_delete MCP tool from inside your agent to remove specific memories with a full audit trail. You can also call the REST API:500. Observations beyond the cap trigger consolidation automatically.Enable memory decayWhen CONSOLIDATION_ENABLED=true, Agent Memory automatically evicts memories that haven’t been accessed recently. The decay window defaults to 30 days:Verbose Logging
For deeper diagnostics, start Agent Memory with verbose output to see full stderr, MCP shim decisions, and provider detection:Reset Everything
If you want a clean slate without losing your memory data:npm install -g @agentmemory/agentmemory and run agentmemory init to restore the config template.
Getting Help
If you’re still stuck after runningagentmemory doctor and checking the sections above, open an issue on GitHub with the output of agentmemory status and agentmemory doctor --dry-run:
GitHub Issues
Report a bug, ask a question, or search existing issues at github.com/rohitg00/agentmemory/issues