{"name":"A-MEM: Self-Evolving Memory for Coding Agents","description":"A-MEM is an innovative self-evolving memory system designed for coding agents, organizing knowledge into a dynamic Zettelkasten-style graph. It allows memories to evolve and connect over time, enhancing an agent's ability to recall and utilize information effectively. This system offers both semantic and structural search capabilities for a richer knowledge base.","github":"https://github.com/DiaaAj/a-mem-mcp","url":"https://osrepos.com/repo/diaaaj-a-mem-mcp","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/diaaaj-a-mem-mcp","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/diaaaj-a-mem-mcp.md","json":"https://osrepos.com/repo/diaaaj-a-mem-mcp.json","topics":["Python","AI","LLM","Agentic Memory","Knowledge Graph","Coding Agents","ChromaDB"],"keywords":["Python","AI","LLM","Agentic Memory","Knowledge Graph","Coding Agents","ChromaDB"],"stars":null,"summary":"A-MEM is an innovative self-evolving memory system designed for coding agents, organizing knowledge into a dynamic Zettelkasten-style graph. It allows memories to evolve and connect over time, enhancing an agent's ability to recall and utilize information effectively. This system offers both semantic and structural search capabilities for a richer knowledge base.","content":"## Introduction\nA-MEM is an innovative self-evolving memory system specifically designed for coding agents. Unlike traditional vector stores, A-MEM automatically organizes knowledge into a dynamic Zettelkasten-style graph, where memories don't just get stored, they evolve and connect over time. This system aims to provide agents with a more intelligent and interconnected knowledge base, improving their ability to recall and utilize information effectively.\n\n## Installation\nGetting started with A-MEM is straightforward. You can install it via pip and integrate it with MCP-compatible agents like Claude Code.\n\nFirst, install the `a-mem` package:\nbash\npip install a-mem\n\n\nThen, add it to your Claude Code environment:\nbash\nclaude mcp add a-mem -s user -- a-mem-mcp \\\n  -e LLM_BACKEND=openai \\\n  -e LLM_MODEL=gpt-4o-mini \\\n  -e OPENAI_API_KEY=sk-...\n\nA session-start hook will automatically install, prompting Claude to use the memory system.\n\n## Examples\nA-MEM exposes several tools for coding agents and can also be used directly via its Python API.\n\n**Agent Tool Usage (Conceptual)**:\npython\n# Store a memory (returns task_id immediately)\nadd_memory_note(content=\"Auth uses JWT in httpOnly cookies, validated by AuthMiddleware\")\n\n# Search later\nsearch_memories(query=\"authentication flow\", k=5)\n\n# Deep search with connections\nsearch_memories_agentic(query=\"security\", k=5)\n\n\n**Python API Usage**:\npython\nfrom agentic_memory.memory_system import AgenticMemorySystem\n\nmemory = AgenticMemorySystem(\n    llm_backend=\"openai\",\n    llm_model=\"gpt-4o-mini\"\n)\n\n# Add (auto-generates keywords, tags, context)\nmemory_id = memory.add_note(\"FastAPI app uses dependency injection for DB sessions\")\n\n# Search\nresults = memory.search(\"database patterns\", k=5)\n\n# Read full details\nnote = memory.read(memory_id)\nprint(note.keywords, note.tags, note.links)\n\n\n## Why Use A-MEM?\nA-MEM offers several compelling features that enhance the capabilities of coding agents:\n\n*   **Self-Evolving Memory**: Memories are not static. When new knowledge is added, A-MEM automatically finds related memories, strengthens connections, updates context, and evolves tags, creating a dynamic knowledge graph.\n*   **Semantic + Structural Search**: It combines vector similarity with graph traversal, allowing agents to find memories by meaning and then explore their interconnected relationships for deeper insights.\n*   **Peek and Drill**: This feature enables efficient token usage by first capturing relevant memories via lightweight metadata (ID, context, keywords, tags) using breadth-first search. Agents can then drill depth-first into specific memories for full content, maximizing recall while minimizing token costs.\n\n## Links\n*   **GitHub Repository**: [https://github.com/DiaaAj/a-mem-mcp](https://github.com/DiaaAj/a-mem-mcp)\n*   **PyPI**: [https://pypi.org/project/a-mem/](https://pypi.org/project/a-mem/)","metrics":{"detailViews":0,"githubClicks":1},"dates":{"published":null,"modified":"2026-08-17T11:16:48.000Z"}}