MemMachine/MemMachine

★ 3,222⑂ 213

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.

About MemMachine/MemMachine

MemMachine/MemMachine is an open-source project on GitHub, mainly written in Python. Universal memory layer for AI Agents. It provides scalable, extensible, and interoperable memory storage and retrieval to streamline AI agent state management It currently holds 3,222 stars and 213 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the AI Agent Memory board.

GitHub Repository Details

Repository MemMachine/MemMachine · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

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

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 Claude Desktop, Cursor, and other MCP-compatible clients:

# Stdio mode (for Claude Desktop)
memmachine-mcp-stdio

HTTP mode (for web clients)

memmachine-mcp-http

See the MCP documentation for setup instructions.

Who Is MemMachine For?

Key Features

For more information, refer to the API Reference Guide.

Architecture

MemMachine Architecture

1. Agents interact via the API Layer: Users interact with an agent, which connects to MemMachine through a RESTful API, Python SDK, or MCP Server. 2. MemMachine manages memory: Processes interactions and stores them as Episodic Memory (conversational context) and Profile Memory (long-term user facts). 3. Data is persisted: Episodic memory is stored in a graph database; profile memory is stored in SQL.

Use Cases & Example Agents

MemMachine's versatile memory architecture can be applied across any domain. Explore our examples to see memory-powered agents in action:

| Agent | Description | |-------|-------------| | CRM Agent | Recalls client history and deal stages to help sales teams close faster | | Healthcare Navigator | Remembers medical history and tracks treatment progress | | Personal Finance Advisor | Stores portfolio preferences and risk tolerance for personalized insights | | Writing Assistant | Learns your style guide and terminology for consistent content |

Built with MemMachine

Are you using MemMachine in your project? We'd love to feature you!

Growing Community

MemMachine is a growing community of builders and developers. Help us grow by clicking the ⭐ Star button above!

https://github.com/MemMachine/MemMachine/blob/HEAD/MemMachine Star History

Documentation

Community & Support

https://discord.gg/usydANvKqD Issues

Contributing

We welcome contributions! Please see our CONTRIBUTING.md for guidelines.

References

@misc{luo2025agentlightningtrainai,
  title={Agent Lightning: Train ANY AI Agents with Reinforcement Learning},
  author={Xufang Luo and Yuge Zhang and Zhiyuan He and Zilong Wang and Siyun Zhao and Dongsheng Li and Luna K. Qiu and Yuqing Yang},
  year={2025},
  eprint={2508.03680},
  archivePrefix={arXiv},
  primaryClass={cs.AI},
  url={https://arxiv.org/abs/2508.03680},
}

License

MemMachine is released under the Apache 2.0 License.

GitHub Stars & Activity

3,222Stars
213Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars3,222
Forks213
Open issues0
Primary languagePython
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related AI Projects

1

666ghj / MiroFish

Python★ 74,064⑂ 0
2

mem0ai / mem0

Python★ 65,695⑂ 0
3

bojieli / ai-agent-book

Python★ 48,844⑂ 0
4

volcengine / OpenViking

Python★ 38,148⑂ 0
5

topoteretes / cognee

Python★ 30,855⑂ 0
6

MemoriLabs / Memori

Python★ 16,849⑂ 0
7

NevaMind-AI / memU

Python★ 14,418⑂ 0
8

semantica-agi / semantica

Python★ 13,301⑂ 0

More AI Rankings