mem0-agent-memory
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AWS_REGION | No | AWS region for Bedrock | |
| FAISS_PATH | No | Optional path for FAISS index (default: .mem0/memory) | |
| MEM0_RUN_ID | No | Optional run ID for session partitioning | |
| OLLAMA_HOST | No | Ollama server URL (required for Ollama) | |
| QDRANT_HOST | No | Qdrant server host (for server mode) | |
| QDRANT_PATH | No | Optional path for embedded Qdrant | |
| QDRANT_PORT | No | Optional Qdrant server port (default: 6333) | |
| MEM0_API_KEY | No | API key for Mem0 Platform | |
| MEM0_USER_ID | No | Optional user ID (default: system username) | |
| MEM0_VERBOSE | No | Set to 'true' for verbose response mode | |
| LMSTUDIO_HOST | No | LM Studio server URL (required for LM Studio) | |
| MEM0_AGENT_ID | No | Optional agent ID (default: workspace name) | |
| OPENSEARCH_HOST | No | OpenSearch endpoint URL | |
| OLLAMA_LLM_MODEL | No | Optional Ollama LLM model (default: llama3.2) | |
| AWS_ACCESS_KEY_ID | No | AWS access key for Bedrock | |
| BEDROCK_LLM_MODEL | No | Optional Bedrock LLM model (default: us.anthropic.claude-3-5-haiku-20241022-v1:0) | |
| BEDROCK_MAX_TOKENS | No | Optional max tokens for Bedrock (default: 1500) | |
| LMSTUDIO_LLM_MODEL | No | Optional LM Studio LLM model (default: llama-3.2-3b-instruct) | |
| MEM0_INFER_DEFAULT | No | Set to 'true' (default) for LLM inference on storage | |
| MEM0_MAX_RELATIONS | No | Max graph relations in compact mode (default: 20) | |
| NOMIC_USE_PREFIXES | No | Set to 'true' for better search accuracy with Nomic embeddings | |
| OLLAMA_EMBED_MODEL | No | Optional Ollama embedding model (default: nomic-embed-text) | |
| BEDROCK_EMBED_MODEL | No | Optional Bedrock embedding model (default: amazon.titan-embed-text-v2:0) | |
| LMSTUDIO_EMBED_MODEL | No | Optional LM Studio embedding model (default: text-embedding-nomic-embed-text-v1.5) | |
| AWS_SECRET_ACCESS_KEY | No | AWS secret key for Bedrock | |
| MEM0_MIN_RELEVANCE_SCORE | No | Minimum relevance score for search (0.0-1.0, default: 0.7) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| store_memoryA | Store memory content with metadata support. REQUIRED: Either 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) REQUIRED: 'content' - the information to remember OPTIONAL: 'metadata' - structured data about the memory (JSON object) OPTIONAL: 'infer' - if True (default), uses LLM to extract facts and dedupe. Set False for faster raw storage. OPTIONAL: 'run_id' - session/run identifier for temporary context OPTIONAL: 'custom_instructions' - per-call instructions to control what gets stored OPTIONAL: 'verbose' - if True, return full details. If False (default), return compact response. Examples:
Use for: Storing code patterns, user preferences, project details, technical knowledge. Note: With infer=True (default), mem0 uses an LLM to extract key facts and intelligently update existing memories. This is slower (~5-15s) but smarter. Use infer=False for faster raw storage (~1-2s) without deduplication. Config: Set MEM0_INFER_DEFAULT=false in env to disable infer by default. Config: Set MEM0_VERBOSE=true in env to enable verbose responses by default. Returns: Success message with memory ID (compact) or full details (verbose). |
| search_memoriesA | Search memories with semantic similarity and relevance filtering. REQUIRED: 'query' - what to search for (natural language) OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - filter by session/run identifier OPTIONAL: 'limit' - max results to return (default: 10, also sets page_size if not specified) OPTIONAL: 'page' - page number for pagination (default: 1) OPTIONAL: 'page_size' - results per page (default: uses limit value) Returns: Relevant memories filtered by maximum score threshold (configurable via MEM0_MAX_RELEVANCE_SCORE, default: 1000) Score interpretation (FAISS uses L2 distance - lower is more similar):
Note: Default threshold of 1000 keeps reasonably similar results. Lower to 400-600 for stricter filtering. Examples:
Use for: Finding relevant code, recalling user preferences, retrieving project context. |
| list_memoriesA | List all memories for a user or agent with pagination. OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - filter by session/run identifier OPTIONAL: 'page', 'page_size' - pagination controls (default: page_size=25) Returns: All memories belonging to the specified user/agent, sorted by creation date. |
| get_memoryA | Get specific memory by its unique ID. REQUIRED: 'memory_id' - the UUID of the memory to retrieve Returns: Complete memory details including content, metadata, timestamps. |
| delete_memoryA | Delete memory by its unique ID. PERMANENT deletion. REQUIRED: 'memory_id' - the UUID of the memory to delete ⚠️ WARNING: This permanently removes the memory and cannot be undone. |
| get_memory_historyA | Get change history for a specific memory by ID. REQUIRED: 'memory_id' - the UUID of the memory to get history for Returns: Chronological list of all changes made to the memory. |
| update_memoryA | Update an existing memory's content and/or metadata directly. REQUIRED: 'memory_id' - the UUID of the memory to update REQUIRED: 'content' - the new content for the memory OPTIONAL: 'metadata' - new metadata to replace existing (JSON object) Unlike store_memory with infer=true, this directly updates the specified memory without LLM processing or deduplication. Preserves memory history. Examples:
Returns: Updated memory details. |
| get_memory_statsA | Get statistics about stored memories. OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) Returns: Memory counts by metadata type, date ranges, and storage summary. Use for: Understanding memory usage, identifying cleanup opportunities, monitoring growth. |
| bulk_delete_memoriesA | Delete multiple memories matching filter criteria. PERMANENT deletion. OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - filter by session/run identifier OPTIONAL: 'metadata_type' - delete memories with this metadata type (e.g., "test", "note") OPTIONAL: 'older_than_days' - delete memories older than this many days OPTIONAL: 'dry_run' - if True, returns what would be deleted without actually deleting (default: True) ⚠️ WARNING: Set dry_run=False to actually delete. This cannot be undone. Examples:
Returns: List of deleted (or would-be-deleted) memory IDs. |
| export_memoriesA | Export memories to JSON or Markdown format for backup or migration. OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'format' - output format: "json" (default) or "markdown" OPTIONAL: 'include_metadata' - include metadata in export (default: True) OPTIONAL: 'output_path' - custom file path (default: .mem0/exports/memories_.) OPTIONAL: 'return_content' - if True, returns content instead of writing to file (default: False) Returns: File path where export was saved, or content if return_content=True. Use for: Backup, migration between backends, documentation, sharing. |
| search_by_metadataA | Search memories by metadata fields without semantic search. OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'type' - filter by metadata type (e.g., "decision", "preference", "task_completion") OPTIONAL: 'priority' - filter by priority (e.g., "high", "medium", "low") OPTIONAL: 'status' - filter by status (e.g., "complete", "in_progress", "blocked") OPTIONAL: 'custom_filters' - dict of additional metadata key-value pairs to match OPTIONAL: 'page' - page number for pagination (default: 1) OPTIONAL: 'page_size' - results per page (default: 50, max: 100) Returns: Memories matching all specified filters with pagination. Examples:
Note: Uses native Qdrant filtering when available, falls back to post-filtering for other backends. |
| health_checkA | Check the health and connectivity of the memory backend. Returns: Backend type, connection status, and basic diagnostics. Use for: Troubleshooting connection issues, verifying configuration. |
| get_recent_memoriesA | Get recently added or updated memories for session continuity. OPTIONAL: 'days' - how many days back to search (default: 7) OPTIONAL: 'limit' - max memories to return (default: 10) OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - filter by session/run identifier Returns: Most recently added/updated memories sorted by newest first |
| delete_all_memoriesA | Delete all memories for a specific scope. PERMANENT deletion. OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - delete all memories for this session/run ⚠️ WARNING: This permanently removes ALL memories matching the scope. Cannot be undone. Examples:
Returns: Confirmation of deletion with count. |
| reset_memoryA | Reset the entire memory store. DESTRUCTIVE operation. ⚠️ CRITICAL WARNING: This deletes ALL memories in the backend, regardless of user/agent/app. Only use this for testing or when you need to completely clear the memory store. This operation cannot be undone. Returns: Confirmation of reset. |
| import_memoriesA | Import memories from exported JSON file. REQUIRED: 'file_path' - path to the JSON export file OPTIONAL: 'user_id' OR 'agent_id' - override the user/agent from the export file OPTIONAL: 'skip_existing' - if True, skip memories that already exist (default: True) OPTIONAL: 'infer' - use LLM processing during import (default: False for speed) Imports memories from a JSON file created by export_memories tool. Useful for backup restoration, migration between backends, or sharing memory sets. Examples:
Returns: Import summary with success/failure counts. |
| ingest_documentsA | Ingest documents into memory as a knowledge base using LlamaIndex. Supports: PDF, DOCX, TXT, MD, HTML, and more. Automatically chunks and stores content. REQUIRED: 'path' - file path or directory path to ingest OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - session/run identifier for partitioning OPTIONAL: 'recursive' - recursively process subdirectories (default: False) OPTIONAL: 'chunk_size' - max characters per chunk (default: 1024, min: 100, max: 8192) OPTIONAL: 'chunk_overlap' - overlap between chunks (default: 200, min: 0, max: chunk_size-1) OPTIONAL: 'file_metadata' - additional metadata to attach to all chunks OPTIONAL: 'infer' - use LLM for fact extraction (default: False for speed) Examples:
Returns: Summary of ingested documents with chunk counts and memory IDs. |
| setup_steeringA | Setup the memory-first steering file for Kiro. Creates a steering file at .kiro/steering/memory-first.md that instructs the AI to always check memory before starting tasks and store important outcomes. OPTIONAL: 'workspace_path' - path to workspace root (default: current directory) Call this once after adding the MCP server to enable memory-first workflows. Returns: Success message with file path created. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
The tools are largely distinct, with clear separation between CRUD, semantic search, metadata search, bulk operations, and export/import. The main potential confusion is among the multiple deletion tools (delete_memory, delete_all_memories, bulk_delete_memories, reset_memory) and between list_memories and get_recent_memories, but the descriptions clarify scope well.
Tool names consistently follow a verb_noun snake_case pattern, with plural nouns for collection operations and singular nouns for single-item operations. Minor outliers like health_check and setup_steering are still readable and do not break the overall convention.
Eighteen tools is slightly above the ideal range, but each tool occupies a reasonable niche in a comprehensive memory-management workflow. The count feels justified given coverage of CRUD, search, bulk deletion, import/export, stats, history, ingestion, and health checks.
The tool surface covers the full memory lifecycle: create, read, update, delete, search, bulk operations, backup/restore, analytics, and history. No critical dead ends are apparent for the stated purpose of agent/assistant memory management.