A-MEM

Provides a self-evolving memory system for coding agents with a growing knowledge graph and advanced search capabilities.
  • other

28

GitHub Stars

other

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "diaaaj-a-mem-mcp": {
      "command": "a-mem-mcp",
      "args": [],
      "env": {
        "LLM_MODEL": "gpt-4o-mini",
        "LLM_BACKEND": "openai",
        "EVO_THRESHOLD": "100",
        "CHROMA_DB_PATH": "./chroma_db",
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
        "EMBEDDING_MODEL": "all-MiniLM-L6-v2"
      }
    }
  }
}

A-MEM MCP Server provides a self-evolving memory system for coding agents. It builds a dynamic knowledge graph by extracting keywords, context, and relationships from memories, connecting new information with existing ones to enable smarter recall and reasoning during coding tasks.

How to use

You integrate the A-MEM MCP server with your coding agent to store, search, and evolve memory notes. The server runs locally as a standard input/output process and can be configured to share memory across projects or remain project-scoped. Use the memory tools to add notes, perform semantic searches, explore connected memories, and read full memory details when needed.

How to install

Prerequisites You need Python and pip installed on your system. You will also use the memory client and the MCP server configuration to run the service.

Install the A-MEM package using Python’s package manager.

pip install a-mem

Configure and start the MCP server. The following JSON configuration shows how to expose the server for an MCP client locally.

{
  "mcpServers": {
    "a_mem": {
      "command": "a-mem-mcp",
      "env": {
        "LLM_BACKEND": "openai",
        "LLM_MODEL": "gpt-4o-mini",
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
        "EMBEDDING_MODEL": "all-MiniLM-L6-v2",
        "CHROMA_DB_PATH": "./chroma_db",
        "EVO_THRESHOLD": "100"
      }
    }
  }
}

Install and enable the session-start hook for Claude Code to remind the agent to use memory. Then run the MCP server as configured.

pip install a-mem
# Install the memory hook for Claude Code (if applicable)
a-mem-install-hook

Additional sections

Configuration notes A-MEM stores memory per-project by default in the chroma database at ./chroma_db. For global memory across projects, adjust CHROMA_DB_PATH to a shared location.

Environment variables you may configure include LLM_BACKEND, LLM_MODEL, OPENAI_API_KEY, EMBEDDING_MODEL, CHROMA_DB_PATH, and EVO_THRESHOLD. These map directly to how the MCP server connects to the LLM, stores memory, and triggers evolution.

Hook management You can install or remove the memory hook independently of the MCP server.

a-mem-install-hook     # Install or reinstall the memory hook
a-mem-uninstall-hook   # Remove the memory hook completely

Python API

If you prefer to integrate the memory system directly in Python, you can instantiate the memory system and call its methods to add, search, and read memories.

from agentic_memory.memory_system import AgenticMemorySystem

memory = AgenticMemorySystem(
    llm_backend="openai",
    llm_model="gpt-4o-mini"
)

# Add a memory note
memory_id = memory.add_note("FastAPI app uses dependency injection for DB sessions")

# Search memories
results = memory.search("database patterns", k=5)

# Read full memory details
note = memory.read(memory_id)
print(note.keywords, note.tags, note.links)

Security and best practices

Treat the memory store as a trusted data source. Protect your API keys and embedding models using environment variables and secret management. Regularly review evolution behavior to ensure that connections and tags reflect your coding intent.

Available tools

add_memory_note

Store new memory content asynchronously and return a task or note reference

search_memories

Perform semantic search across stored memories with a token-efficient interface

search_memories_agentic

Search memories and follow graph connections to expand context

search_memories_by_time

Search memories within a specified time range and filter results

read_memory_note

Retrieve full details of a memory note, with optional bulk reads

update_memory_note

Modify the content, keywords, or metadata of an existing memory note

delete_memory_note

Remove a memory note from storage

check_task_status

Check whether an asynchronous memory task has completed

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational