Favicon of MemMachine

MemMachine

An open-source AI agent memory layer you can self-host or use as a managed service, with support for Ollama and persistent user profiles.

Screenshot of MemMachine website

MemMachine is a self-hosted memory layer for developers building AI agents and LLM applications that need to remember users across conversations. Memory persists across sessions, restarts, agents, and model changes, so an application's user history isn't tied to one model provider. It's open source under Apache 2.0.

The system separates current-session working memory from longer-term records. Episodic memory keeps conversational context in a graph database, while profile memory stores user facts and preferences in SQL. That separation lets an assistant recall earlier exchanges and retain details such as a client's deal stage or a user's writing preferences without retraining the model for each person.

You can run the server locally, in Docker, on premises, or in a private cloud, keeping its memory storage in an environment you control. A managed cloud service is also available, where the memory server runs with the provider. MemMachine works with Ollama as well as OpenAI, Anthropic, and Bedrock, so self-hosting the memory layer and choosing where the model runs are separate decisions.

For teams with an existing agent stack, integrations include LangChain, LangGraph, CrewAI, LlamaIndex, and AWS Strands. It also connects to n8n, Dify, and FastGPT. Developers can access memory through REST APIs and Python or TypeScript SDKs; its MCP server connects it to clients such as Claude Desktop and Cursor.

Similar to MemMachine