Docs
Search and replay
How results are ranked, where you can search from, and how to read a session back in order.
How search ranks
Search runs two queries: a word search with SQLite FTS5 and a meaning search over BGE-M3 vectors with sqlite-vec. The two rankings are merged with reciprocal rank fusion. If vectors aren't available, the word ranking is used on its own.
The ranking also takes your feedback into account, in cloud memory search and in local search. See Decisions and feedback.
Where to search
- App: the Search view, filtered by period and workspace.
- CLI:
agent-memory search --q "webhook retry" --limit 5 - MCP stdio: the
memory_searchtool. - ChatGPT and Claude:
memory_searchover Remote MCP.
Replay a session
Every result points to the session it came from. Open it in the app to read the conversation in order, or use the CLI:
agent-memory sessions detail --id "<session-id>"Over Remote MCP, session_replay returns the original record: conversation, tool results and recorded thinking. It can be narrowed to the exact range a memory came from.
Context at the start of a session
With the UserPromptSubmit hook on, Claude Code, Codex, Devin CLI and Grok search Agent Memory with the first prompt of each session and receive what is found before they reply. Hooks that pass context can also carry an instruction you saved.
agent-memory hooks enable user-prompt-submit
agent-memory hooks prompt session-start --set "Check past decisions before you start."Writing better queries
- Use concrete identifiers: repository names, issue keys, branch names, file paths, exact error text.
- Narrow to a workspace when you know the project.
- Open the source session before relying on a result. Messages are free text.