Skip to main content
Glama
arunkumars-mf

mem0-agent-memory

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AWS_REGIONNoAWS region for Bedrock
FAISS_PATHNoOptional path for FAISS index (default: .mem0/memory)
MEM0_RUN_IDNoOptional run ID for session partitioning
OLLAMA_HOSTNoOllama server URL (required for Ollama)
QDRANT_HOSTNoQdrant server host (for server mode)
QDRANT_PATHNoOptional path for embedded Qdrant
QDRANT_PORTNoOptional Qdrant server port (default: 6333)
MEM0_API_KEYNoAPI key for Mem0 Platform
MEM0_USER_IDNoOptional user ID (default: system username)
MEM0_VERBOSENoSet to 'true' for verbose response mode
LMSTUDIO_HOSTNoLM Studio server URL (required for LM Studio)
MEM0_AGENT_IDNoOptional agent ID (default: workspace name)
OPENSEARCH_HOSTNoOpenSearch endpoint URL
OLLAMA_LLM_MODELNoOptional Ollama LLM model (default: llama3.2)
AWS_ACCESS_KEY_IDNoAWS access key for Bedrock
BEDROCK_LLM_MODELNoOptional Bedrock LLM model (default: us.anthropic.claude-3-5-haiku-20241022-v1:0)
BEDROCK_MAX_TOKENSNoOptional max tokens for Bedrock (default: 1500)
LMSTUDIO_LLM_MODELNoOptional LM Studio LLM model (default: llama-3.2-3b-instruct)
MEM0_INFER_DEFAULTNoSet to 'true' (default) for LLM inference on storage
MEM0_MAX_RELATIONSNoMax graph relations in compact mode (default: 20)
NOMIC_USE_PREFIXESNoSet to 'true' for better search accuracy with Nomic embeddings
OLLAMA_EMBED_MODELNoOptional Ollama embedding model (default: nomic-embed-text)
BEDROCK_EMBED_MODELNoOptional Bedrock embedding model (default: amazon.titan-embed-text-v2:0)
LMSTUDIO_EMBED_MODELNoOptional LM Studio embedding model (default: text-embedding-nomic-embed-text-v1.5)
AWS_SECRET_ACCESS_KEYNoAWS secret key for Bedrock
MEM0_MIN_RELEVANCE_SCORENoMinimum 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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:

  • Store personal info: {"content": "User prefers React over Vue", "user_id": "john"}

  • Store with metadata: {"content": "API endpoint changed", "metadata": {"type": "technical", "priority": "high"}}

  • Fast storage (no LLM): {"content": "Quick note", "infer": false}

  • Session-scoped: {"content": "Current task context", "run_id": "session_123"}

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):

  • 0-100: Very high similarity (near-exact matches)

  • 100-400: High similarity (closely related)

  • 400-600: Moderate similarity (somewhat related)

  • 600-1000: Low similarity (loosely related)

  • 1000+: Very low similarity (likely unrelated)

Note: Default threshold of 1000 keeps reasonably similar results. Lower to 400-600 for stricter filtering.

Examples:

  • Search user memories: {"query": "React patterns", "user_id": "john"}

  • Auto-detect user: {"query": "my project status"}

  • Limit results: {"query": "API endpoints", "limit": 3}

  • Session-scoped: {"query": "current task", "run_id": "session_123"}

  • Pagination: {"query": "all tasks", "page": 2, "page_size": 5}

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:

  • Update content: {"memory_id": "abc-123", "content": "Updated preference: Vue over React"}

  • Update with metadata: {"memory_id": "abc-123", "content": "New content", "metadata": {"priority": "high"}}

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:

  • Preview test cleanup: {"metadata_type": "test", "dry_run": true}

  • Delete old memories: {"older_than_days": 90, "dry_run": false}

  • Delete by type: {"metadata_type": "note", "dry_run": false}

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:

  • Find decisions: {"type": "decision"}

  • Find high priority: {"priority": "high"}

  • Find blocked items: {"status": "blocked"}

  • Custom filter: {"custom_filters": {"category": "api"}}

  • Paginated: {"type": "documentation", "page": 2, "page_size": 20}

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:

  • Delete all user memories: {"user_id": "john"}

  • Delete session memories: {"run_id": "session_123"}

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:

  • Import from backup: {"file_path": ".mem0/exports/memories_john_20250113.json"}

  • Import to different user: {"file_path": "export.json", "user_id": "jane"}

  • Force reimport: {"file_path": "export.json", "skip_existing": false}

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:

  • Ingest single file: {"path": "/path/to/document.pdf"}

  • Ingest directory: {"path": "/path/to/docs", "recursive": true}

  • With metadata: {"path": "manual.pdf", "file_metadata": {"type": "documentation", "version": "2.0"}}

  • Custom chunking: {"path": "large.pdf", "chunk_size": 2048, "chunk_overlap": 400}

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 18 tools

Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count4/5

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.

Completeness5/5

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.

Maintenance

ActivityInactive
ResponsivenessNo issues