StackMap
Subscribe
Explore / MemMachine
MemMachine

MemMachine

Long-term memory layer for AI agents — episodic (graph), profile (SQL) and working memory behind Python/TS SDKs, REST and MCP; ships LangChain, LangGraph, CrewAI and LlamaIndex integrations.

3,308 196 Python Apache-2.0updated today
Curator's take

Pick it when memory is a product requirement, not a cache: separating episodic (graph) from profile (SQL) from working memory maps to how assistants actually personalize, and the documented LangGraph/CrewAI/LlamaIndex integrations mean you don't write the glue. NOT worth the footprint for a single-user tool — it wants a server plus Neo4j and SQL; a vector store or a JSON file gets a prototype further. Watch the open-core boundary: the managed platform is the business model.

Mapped by ShipWithAI editors · links verified
README.md

MemMachine

MemMachine: Long Term Memory for AI Agents

The open-source memory layer for AI agents.

Stop building stateless agents. Give your AI persistent memory with just 5 lines of code.


GitHub Release Version GitHub License Ask DeepWiki Discord
Docker Pulls GitHub Downloads
PyPI Downloads - memmachine-client PyPI Downloads - memmachine-server

What is MemMachine?

MemMachine is an open-source long-term memory layer for AI agents and LLM-powered applications. It enables your AI to learn, store, and recall information from past sessions—transforming stateless chatbots into personalized, context-aware assistants.

Key Capabilities

  • Episodic Memory: Graph-based conversational context that persists across sessions
  • Profile Memory: Long-term user facts and preferences stored in SQL
  • Working Memory: Short-term context for the current session
  • Agent Memory Persistence: Memory that survives restarts, sessions, and even model changes

Quick Start

Get up and running in under 5 minutes:

Prerequisites: This code requires a running MemMachine Server. Start a server locally or create a free account on the MemMachine Platform.

pip install memmachine-client
from memmachine_client import import MemMachineClient

# Initialize the client
client = MemMachineClient(base_url="http://localhost:8080")

# Get or create a project
project = client.get_or_create_project(org_id="my_org", project_id="my_project")

# Create a memory instance for a user session
memory = project.memory(
    group_id="default",
    agent_id="travel_agent",
    user_id="alice",
    session_id="session_001"
)

# Add a memory
memory.add("I prefer aisle seats on flights", metadata={"category": "travel"})
# => [AddMemoryResult(uid='...')]

# Search memories
results = memory.search("What are my flight preferences?")
print(results.content.episodic_memory.long_term_memory.episodes[0].content)
# => "I prefer aisle seats on flights"

For full installation options (Docker, self-hosted, cloud), visit the Quick Start Guide.

Integrations

MemMachine works seamlessly with your favorite AI frameworks:

Framework Description
LangChain Memory provider for LangChain agents
LangGraph Stateful memory for LangGraph workflows
CrewAI Persistent memory for CrewAI multi-agent systems
LlamaIndex Memory integration for LlamaIndex applications
AWS Strands Memory for AWS Strands Agent SDK
n8n No-code workflow automation integration
Dify Memory backend for Dify AI applications
FastGPT Integration with FastGPT platform

MCP Server Support

MemMachine includes a native Model Context Protocol (MCP) server for seamless integration with

Continue your stack

What teams reach for next — and why each earns a place beside MemMachine. Ranked by curator confidence.