MemMachine
Universal memory layer for AI Agents. It provides scalable, extensible, and interoperable memory storage and retrieval to streamline AI agent state management f
What is MemMachine?
Universal memory layer for AI Agents. It provides scalable, extensible, and interoperable memory storage and retrieval to streamline AI agent state management for next-generation autonomous systems.
Overview of MemMachine
What it is
MemMachine is an open-source long-term memory layer for AI agents and LLM-powered applications. It enables AI to learn, store, and recall information from past sessions, transforming stateless chatbots into personalized, context-aware assistants. Key capabilities include 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), and Agent Memory Persistence (memory that survives restarts, sessions, and model changes).
Key features
- Multiple Memory Types: Working (short-term), Episodic (long-term conversational), and Profile (user facts) memory
- Developer-Friendly APIs: Python SDK, RESTful API, TypeScript SDK, and MCP server interfaces
- Flexible Storage: Graph database (Neo4j) for episodic memory, SQL for profiles
- LLM Agnostic: Works with OpenAI, Anthropic, Bedrock, Ollama, and any LLM provider
- Self-Hosted or Cloud: Run locally, in Docker, or use the managed service
Use cases
- Building AI agents, assistants, or autonomous workflows that need persistent memory
- Researching agent architectures and cognitive models
- Teams needing cross-session memory for LLM applications
- Specific examples: CRM agent recalling client history and deal stages; healthcare navigator remembering medical history and tracking treatment progress; personal finance advisor storing portfolio preferences and risk tolerance; writing assistant learning style guide and terminology
Getting started
Prerequisites: This code requires a running MemMachine Server. Start a server locally or create a free account on the MemMachine Platform.bashpip install memmachine-client``````pythonfrom memmachine_client import import MemMachineClient# Initialize the clientclient = MemMachineClient(base_url='http://localhost:8080')# Get or create a projectproject = client.get_or_create_project(org_id='my_org', project_id='my_project')# Create a memory instance for a user sessionmemory = project.memory( group_id='default', agent_id='travel_agent', user_id='alice', session_id='session_001')# Add a memorymemory.add('I prefer aisle seats on flights', metadata={'category': 'travel'})# => [AddMemoryResult(uid='...')]# Search memoriesresults = memory.search('What are my flight preferences?')print(results.content.episodic_memory.long_term_memory.episodes[0].content)# => 'I prefer aisle seats on flights'
License and pricing
License: Apache 2.0. Pricing: Open source (free).
Based on the project's public README and repository metadata.