A-MEM

RAG & Memory 💻 Python ⚖️ MIT 🟡 Quiet lately
387 stars

A-MEM is an agentic memory system for LLM agents that dynamically organizes memories using Zettelkasten principles. It solves the problem of static memory organization by enabling intelligent indexing, linking, and evolution of memories. It is for developers building LLM agents that need adaptive memory management.

✨ Key features

  • Dynamic memory organization based on Zettelkasten principles
  • Intelligent indexing and linking via ChromaDB
  • Comprehensive note generation with structured attributes
  • Interconnected knowledge networks
  • Continuous memory evolution and refinement
  • Agent-driven decision making for adaptive memory management

🎯 Use cases

  • Build LLM agents with persistent, self-organizing memory
  • Enhance retrieval-augmented generation with semantic memory search
  • Create personal knowledge management systems for AI assistants
  • Develop applications that require adaptive memory over time

📦 Installation

🧰 Requirements: Python environment with pip; requires an LLM backend (OpenAI, Ollama, SGLang, or OpenRouter) and optionally an API key for cloud services.

git clone https://github.com/agiresearch/A-mem.git
cd A-mem
python -m venv .venv
source .venv/bin/activate  # On Windows, use: .venv\Scripts\activate
pip install .

For development: pip install -e .

🚀 Usage

from agentic_memory.memory_system import AgenticMemorySystem

memory_system = AgenticMemorySystem(
    model_name='all-MiniLM-L6-v2',
    llm_backend="openai",
    llm_model="gpt-4o-mini"
)

memory_id = memory_system.add_note(
    "Machine learning algorithms use neural networks to process complex datasets and identify patterns."
)

memory = memory_system.read(memory_id)
print(memory.content)
print(memory.keywords)
print(memory.context)
print(memory.tags)

❓ FAQ

What LLM backends are supported?

The system supports OpenAI, Ollama, SGLang, and OpenRouter backends, allowing cloud or local inference.

Can I provide my own metadata for memories?

Yes, you can provide keywords, context, and tags manually, or let the LLM auto-generate them. Partial metadata is also allowed.

How does memory evolution work?

When adding or updating memories, the system uses LLM analysis to generate metadata, finds related memories via enhanced embeddings, and updates tags, context, and links automatically.

Do I need an API key?

For OpenAI and OpenRouter backends, you need an API key. For Ollama and SGLang, you can run locally without one.

📊 Repository

Stars★ 387
Forks🍴 59
Open issues🐛 3
Last commit🕒 Mar 15, 2026
Created📅 Jul 2025
Language💻 Python
License⚖️ MIT

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.