Work with memory
Meko's memory system gives agents persistent recall across sessions.
This guide covers memory operations you drive from a coding agent over MCP: add a memory, search for relevant memories, and list everything stored for the current user in a datapack.
Meko can also move memories into shared, institutional knowledge through a separate review flow (learnings, collective memory, and shared knowledge). That lifecycle, including how candidates are identified and promoted from Learnings in the Meko UI, is described in Learnings. For how extraction and dual storage (vectors + graph) work under the hood, see Memory.
Private memories are one part of a datapack's knowledge base. The other major component is source data, which includes unstructured files (text, PDFs, documents) and structured sources (databases, tabular data). See Knowledge bases.
Memories are stored in a semantic graph with graph edges for entity relationships (for example, John likes bananas) and document chunks with vectors for similarity search. That combination supports retrieval by relationship and by meaning, not only by exact text match.
Add memories
Via MCP (from your coding agent)
The simplest way to add memories is through natural language in your coding agent:
Please remember that I like to take vacations at tropical beach locations, on a budget
Remember this coding preference: I prefer Python type hints and use pytest for testing
The MCP server calls memory_add behind the scenes, which uses an LLM to extract entities and relationships from your text.
Automatically, from saved conversations
You don't have to explicitly ask your agent to "remember" something for it to become a memory. If your client has automatic capture enabled (the Automated install) or your agent otherwise saves the turn with conversation_add_message, Meko scans the saved turn server-side and creates memories from the durable facts it finds — no extra step required.
Conversation-driven extraction runs asynchronously after a turn is saved, and can occasionally miss an individual fact within a longer turn. For anything that must not be lost, explicitly say "remember this" (memory_add) rather than relying on automatic extraction alone.
Search memories
Via MCP (from your coding agent)
With Meko connected through MCP, your agent can retrieve memories on its own when answering questions that clearly depend on stored preferences or facts. You do not have to name a tool for that to happen. When you want to inspect or force a lookup, for example, to confirm what was saved, ask in natural language, as in the following examples.
Example 1:
What are my vacation preferences?
Example 2:
What coding standards have I set?
The MCP server performs a semantic similarity search across your memories and returns the most relevant results with relevance scores.
memory_search spans the current user's agent namespaces in the selected datapack. For example, a search from Claude Code can find a relevant memory written from Cursor or Claude Desktop. The agent_id sent with the search is used for trace attribution; it doesn't filter the results. Agents should make one search rather than repeating it for every known agent ID.
Retrieving all memories or running a broad memory search can add substantial content to your LLM context. Set memory_search.limit to return fewer search results when appropriate. See the MCP memory tools reference for details.
How search works
Memory search combines two strategies:
- Vector similarity. Finds memories with semantically similar embeddings.
- Graph traversal. Finds related entities and relationships. For example, searching for "vacation" might also surface memories about "travel budget" through graph connections.
Results from both strategies are combined and ranked, allowing a memory to be retrieved not just by exact match, but by semantic similarity as well. For example, the memory "John likes bananas" can be surfaced in response to not only the query "who likes banana?" but also a semantic query like "Who likes fruits?"
View all memories
To see every memory Meko has stored for you in a datapack, ask your coding agent in plain language. For example:
List every memory Meko has for me in my default datapack.
Show all memories stored for me in this datapack — I want the complete list, not just the top matches.
You should see the agent use the MCP tool memory_get_all to return the full list across your agent namespaces (not ranked like search), which is useful for auditing or building a memory dashboard.
Promote memories to shared knowledge
Datapack owners and maintainers can use memory_promote to move private memories into the datapack's shared knowledge base and Collective Memory. Promotion removes the selected records from private memory and can't be reversed through the MCP tool.
Before promoting, your agent should:
- Retrieve and show the exact memories it will promote.
- Explain that datapack members will be able to find the promoted knowledge and that the private records will be removed.
- Ask for explicit confirmation.
- Call
memory_promoteonly after you confirm.
For the complete shared-knowledge lifecycle, see Learnings.
Next steps
- Learn about memory
- Learnings — review, identification, and promotion to shared knowledge
- Work with knowledge bases