MemMachine is a long-term memory layer for AI agents and LLM applications. An agent writes and searches memories through a REST API, Python SDK, TypeScript SDK, or MCP server; a MemMachine server, self-hosted or on the hosted platform, processes the interactions and stores them so that information from past sessions can be recalled later.
Three memory types are kept: working memory holds short-term context for the current session, episodic memory holds graph-based conversational context that persists across sessions, and profile memory holds long-term user facts and preferences. Episodic memory is stored in a Neo4j graph database and profile memory in SQL, and memory survives restarts, session boundaries, and model changes.
A memory instance is scoped by organization, project, group, agent, user, and session identifiers. The client adds an entry with optional metadata and searches with a natural-language query, receiving episodic and profile results. Example agents include a CRM agent that recalls client history and deal stages, a healthcare navigator that tracks treatment progress, a personal finance advisor that stores risk tolerance, and a writing assistant that learns a style guide.
Features
- Memory types: working (short-term), episodic (long-term conversational), and profile (user facts) memory
- Interfaces: Python SDK, TypeScript SDK, RESTful API, and an MCP server in stdio mode (Claude Desktop) or HTTP mode
- Storage: Neo4j graph database for episodic memory and SQL for profiles
- Framework integrations: LangChain, LangGraph, CrewAI, LlamaIndex, AWS Strands Agent SDK, n8n, Dify, and FastGPT
- LLM agnostic: works with OpenAI, Anthropic, Bedrock, Ollama, and other providers
- Deployment: local, Docker, self-hosted, or the managed MemMachine Platform
