freshcrate
Skin:/
Home > Databases > MemMachine

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.

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

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.

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

  • 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 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?

  • Developers building AI agents, assistants, or autonomous workflows
  • Researchers experimenting with agent architectures and cognitive models
  • Teams who need persistent, cross-session memory for their LLM applications

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 our managed service

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!

MemMachine Star History

Documentation

Community & Support

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.

Release History

VersionChangesUrgencyDate
v0.3.9## What's Changed * docs: clarify filter prefix requirements by @haosenwang1018 in https://github.com/MemMachine/MemMachine/pull/1352 * docs(common): add package readme metadata by @haosenwang1018 in https://github.com/MemMachine/MemMachine/pull/1338 * docs(client): prefer released pip install instructions by @haosenwang1018 in https://github.com/MemMachine/MemMachine/pull/1335 * fix(ts-client): include readme in published package by @haosenwang1018 in https://github.com/MemMachine/MemMachinHigh5/18/2026
v0.3.8## What's Changed * Embedded VectorStore Implementation(s) by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/1292 * docs: regenerate openapi.json by @github-actions[bot] in https://github.com/MemMachine/MemMachine/pull/1385 * Fix Installation Test CI by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/1389 * update legacy LoCoMo eval scripts to current MemMachine API by @1saac-k in https://github.com/MemMachine/MemMachine/pull/1272 * New long-term episodic memory (naHigh5/8/2026
v0.3.7## What's Changed * Add strands-memmachine integration for Strands Agents by @Viranshu-30 in https://github.com/MemMachine/MemMachine/pull/1330 * fix(ts-client): Auto-select fetch adapter behind HTTPS proxies (#1269) by @alighazi288 in https://github.com/MemMachine/MemMachine/pull/1369 * Build(deps-dev): Bump ty from 0.0.24 to 0.0.32 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/1354 * Build(deps): Bump the npm_and_yarn group across 1 directory with 2 updates by @depenHigh5/1/2026
v0.3.6## What's Changed * docs: regenerate openapi.json by @github-actions[bot] in https://github.com/MemMachine/MemMachine/pull/1351 * Build(deps): Bump the npm_and_yarn group across 2 directories with 5 updates by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/1350 * Build(deps): Bump the npm_and_yarn group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/1353 * Build(deps-dev): Bump ruff from 0.15.10 to 0.15.11 by @dependaHigh4/24/2026
v0.3.5## What's Changed * Build(deps-dev): Bump pytest from 9.0.2 to 9.0.3 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/1321 * fix(embedder): always chunk text before cluster_texts() when max_input t_length is None by @sscargal in https://github.com/MemMachine/MemMachine/pull/1328 * Build(deps-dev): Bump ruff from 0.15.9 to 0.15.10 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/1320 * fix(openclaw): prevent autoRecall cross-session memory leakage (#131High4/17/2026
v0.3.4## What's Changed * Security/fix archive path traversal by @o-love in https://github.com/MemMachine/MemMachine/pull/1287 * Docs: Updating Quickstart for missing backticks and removing the Google ADK Integration Guide by @SarahScargall in https://github.com/MemMachine/MemMachine/pull/1294 * Improve vector store API by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/1201 * Define vector similarity score direction and range by @edwinyyyu in https://github.com/MemMachine/MemMachine/pHigh4/13/2026
v0.3.3## What's Changed * docs: sync platform openapi.json by @github-actions[bot] in https://github.com/MemMachine/MemMachine/pull/1237 * Bump authlib from 1.6.7 to 1.6.9 in the uv group across 1 directory by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/1234 * [GH-1147] Fix null byte crash in semantic memory ingestion by @o-love in https://github.com/MemMachine/MemMachine/pull/1165 * [GH-1146] Cap features sent to LLM during semantic ingestion update by @o-love in https://gitMedium3/27/2026
v0.3.2## What's Changed * Strip the leading 'v' from VERSION_INPUT by @sscargal in https://github.com/MemMachine/MemMachine/pull/1222 * Add LongMemEval evaluation scripts by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/1216 * Docs: Helm Chart Cloud Deployment Guide by @SarahScargall in https://github.com/MemMachine/MemMachine/pull/1224 * Add knowledge update score to lme_generate.py by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/1223 * Bump orjson from 3.11.5 to 3.1Low3/17/2026
v0.3.1## What's Changed * Specify the 'main' branch when checking out code. by @sscargal in https://github.com/MemMachine/MemMachine/pull/1182 * Correct the working-directory by @sscargal in https://github.com/MemMachine/MemMachine/pull/1185 * Add `workflow_dispatch` trigger to OpenClaw plugin publish workflow by @Copilot in https://github.com/MemMachine/MemMachine/pull/1186 * Fix/openclaw plugin publish by @sscargal in https://github.com/MemMachine/MemMachine/pull/1187 * update evaluation utilsLow3/13/2026
v0.3.0## What's Changed * Semantic Memory SetID refactor: customization by @o-love in https://github.com/MemMachine/MemMachine/pull/882 * Support basic CJK text sentence chunking by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/936 * add envvar MEMMACHINE_CONFIG_API by @jgong in https://github.com/MemMachine/MemMachine/pull/1020 * Support more search params for TypeScript client by @yaleMemVerge in https://github.com/MemMachine/MemMachine/pull/994 * Resolve ruff issues by @edwinyyyuLow3/4/2026
v0.2.6## What's Changed * Docs: align agent guide with repo workflows by @o-love in https://github.com/MemMachine/MemMachine/pull/984 * [GH-909] Improve async summary performance. by @jealous in https://github.com/MemMachine/MemMachine/pull/949 * [GH-974] Prevent consolidation on small tag groups by @o-love in https://github.com/MemMachine/MemMachine/pull/985 * [GH-959] Add datetime filter expr support by @o-love in https://github.com/MemMachine/MemMachine/pull/960 * [GH-971] Add delete_memory MCLow2/2/2026
v0.2.5## What's Changed * Update GPTStore integration guide to use v2 API format by @dxu104 in https://github.com/MemMachine/MemMachine/pull/930 * Fix unittest for read/write lock by @jealous in https://github.com/MemMachine/MemMachine/pull/962 * Add n8n integration guide by @yaleMemVerge in https://github.com/MemMachine/MemMachine/pull/955 * Dependabot: Update package versions by @sscargal in https://github.com/MemMachine/MemMachine/pull/956 * Increase vector search limit with retrieved episode Low1/26/2026
v0.2.4## What's Changed * Deduplicate sentences by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/931 * Allow users to configure the Postgres pool_size and max_overflow property values to improve performance by @sscargal in https://github.com/MemMachine/MemMachine/pull/917 * Add CI/CD workflow for TypeScript client by @yaleMemVerge in https://github.com/MemMachine/MemMachine/pull/939 * Support host.docker.internal in Linux for docker-compose by @honggyukim in https://github.com/MemMacLow1/16/2026
v0.2.3## What's Changed * Update question.yml by @sscargal in https://github.com/MemMachine/MemMachine/pull/890 * Always pull the latest MemMachine Docker Image by @sscargal in https://github.com/MemMachine/MemMachine/pull/889 * Fixes #886 - memmachine-compose.sh ignores MEMMACHINE_IMAGE in .env by @sscargal in https://github.com/MemMachine/MemMachine/pull/887 * Docs: Updating REST Example to correctly represent V2 API Endpoints by @SarahScargall in https://github.com/MemMachine/MemMachine/pull/87Low1/9/2026
v0.2.2## What's Changed * Docs: Resolving Issue #766 - rename of `.mcp.json` to `claude_desktop_config.json` by @SarahScargall in https://github.com/MemMachine/MemMachine/pull/790 * Add coding style prompt by @o-love in https://github.com/MemMachine/MemMachine/pull/756 * fix: update API endpoint URLs in startup script by @dxu104 in https://github.com/MemMachine/MemMachine/pull/803 * feat: aws strands integration. by @tianAndrew in https://github.com/MemMachine/MemMachine/pull/528 * Fix episodic cLow12/31/2025
v0.2.1## What's Changed * Docs: Adding "memmachine-server" and "memmachine-client" packages where appropriate in pip install commands. by @SarahScargall in https://github.com/MemMachine/MemMachine/pull/736 * Rename root project to 'memmachine-dev' to avoid namespace conflict with the 'memmachine' package by @sscargal in https://github.com/MemMachine/MemMachine/pull/745 * Revert "Rename root project to 'memmachine-dev' to avoid namespace coโ€ฆ by @sscargal in https://github.com/MemMachine/MemMachine/pLow12/13/2025
v0.2.0## What's Changed * Claude code Integration document by @PeterZZZ in https://github.com/MemMachine/MemMachine/pull/530 * Implement script to dump Episodes for migrations from v0.1.x by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/586 * feat: build separate pkgs by @tianAndrew in https://github.com/MemMachine/MemMachine/pull/527 * Merge the development branch to main by @malatewang in https://github.com/MemMachine/MemMachine/pull/631 * Docsv2 by @SarahScargall in https://githuLow12/10/2025
v0.2.0-rc2## What's Changed * [GH-678] Semantic: Ignore invalid column names in filter by @o-love in https://github.com/MemMachine/MemMachine/pull/722 * Create a 'memmachine' metapackage for 'memmachine-client' and 'memmachine-server' by @sscargal in https://github.com/MemMachine/MemMachine/pull/737 * Bugfix/uv lock by @sscargal in https://github.com/MemMachine/MemMachine/pull/738 * Use the latest version of uv by @sscargal in https://github.com/MemMachine/MemMachine/pull/740 **Full Changelog**: Low12/9/2025
v0.2.0-rc1## What's Changed * Claude code Integration document by @PeterZZZ in https://github.com/MemMachine/MemMachine/pull/530 * Implement script to dump Episodes for migrations from v0.1.x by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/586 * feat: build separate pkgs by @tianAndrew in https://github.com/MemMachine/MemMachine/pull/527 * Merge the development branch to main by @malatewang in https://github.com/MemMachine/MemMachine/pull/631 * Docsv2 by @SarahScargall in https://githuLow12/9/2025
v0.1.10## What's Changed * Feat: support AWS session token by @Kevin-K-W in https://github.com/MemMachine/MemMachine/pull/420 * Feat: add client for ADE integration by @tianAndrew in https://github.com/MemMachine/MemMachine/pull/490 * Update embedders to use BaseModel params by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/415 * Fix OpenAIEmbedder used in integration test by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/494 * Bug: hackthon chatgpt2memmachine not convertLow11/25/2025
v0.1.9## What's Changed * feat. Implement a simple MCP server by @jealous in https://github.com/MemMachine/MemMachine/pull/405 * Update Profile memory for Bedrock and Ollama by @gauri-nagavkar-memverge in https://github.com/MemMachine/MemMachine/pull/441 **Full Changelog**: https://github.com/MemMachine/MemMachine/compare/v0.1.8...v0.1.9Low11/3/2025
v0.1.8## What's Changed * Quick fix for leaked resources by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/365 * Fix type check error by @malatewang in https://github.com/MemMachine/MemMachine/pull/366 * Add sentence transformer embedder support by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/367 * Embedder Config by @ChristianKniep in https://github.com/MemMachine/MemMachine/pull/357 * fixed 400 bad request error when calling chat completions by @scottly06 in https://Low10/31/2025
v0.1.7## What's Changed * add logging set to LOG_LEVEL by @ChristianKniep in https://github.com/MemMachine/MemMachine/pull/248 * Enable remote postgres and neo4j by @zzaym in https://github.com/MemMachine/MemMachine/pull/261 * Bump openai from 2.2.0 to 2.3.0 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/265 * Bump fastapi from 0.118.0 to 0.119.0 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/266 * Bump ruff from 0.13.2 to 0.14.0 by @dependabot[bot] in Low10/23/2025
v0.1.6## What's Changed * Bump pydantic from 2.11.7 to 2.11.10 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/221 * Bump nltk from 3.9.1 to 3.9.2 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/224 * Add configuration.yml to gitignore by @o-love in https://github.com/MemMachine/MemMachine/pull/232 * Bump openai from 1.109.1 to 2.2.0 by @dependabot[bot] in https://github.com/MemMachine/MemMachine/pull/223 * memmachine-compose.sh: add start/build commands Low10/13/2025
v0.1.5## What's Changed * Fix/examples readme by @Charlie-Yi-2002 in https://github.com/MemMachine/MemMachine/pull/187 * Remove references to Poetry by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/213 * Update episodic memory API usage in evaluation scripts by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/207 * Fix API calls in the examples and also change the sample config to use the default profile_prompt.py by @Charlie-Yi-2002 in https://github.com/MemMachine/MemMacLow10/7/2025
v0.1.4## What's Changed * Fix profile memory model usage error by @malatewang in https://github.com/MemMachine/MemMachine/pull/174 * Fix an error in profile memory by @malatewang in https://github.com/MemMachine/MemMachine/pull/175 * Updating Documentation for 0.1.3 Release by @SarahScargall in https://github.com/MemMachine/MemMachine/pull/176 * Fix wrong variable used by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/177 * Bump openai from 1.108.1 to 1.109.1 by @dependabot[bot] in hLow10/2/2025
v0.1.3## What's Changed * Add unit test for episodic memory manager by @malatewang in https://github.com/MemMachine/MemMachine/pull/132 * Handle LLM error. issue #109 #89 by @malatewang in https://github.com/MemMachine/MemMachine/pull/123 * Fix profile memory variable naming by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/159 * Potential fix for code scanning alert no. 17: Information exposure through an exception by @sscargal in https://github.com/MemMachine/MemMachine/pull/154 * Low9/30/2025
v0.1.2## What's Changed * Optimized Docker Build Workflow by @sscargal in https://github.com/MemMachine/MemMachine/pull/90 * feat(ci): Enable manual builds and parallelize jobs by @sscargal in https://github.com/MemMachine/MemMachine/pull/91 * Optimize Docker Build & Publish Workflow Action by @sscargal in https://github.com/MemMachine/MemMachine/pull/92 * Updated Architecture Diagram by @sscargal in https://github.com/MemMachine/MemMachine/pull/93 * Add unit test for session manager by @malatewaLow9/26/2025
v0.1.1## What's Changed * Update README.md by @sscargal in https://github.com/MemMachine/MemMachine/pull/56 * Fix query_memory in locomo_search.py by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/57 * Remove extra MCP path component by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/59 * Format episodes before sending to reranker in DeclarativeMemory by @edwinyyyu in https://github.com/MemMachine/MemMachine/pull/37 * Major edits to QuickStart Guide, API Name Changes, AdjLow9/19/2025
v0.1.0## What's Changed - Initial GitHub setup including templates, security policies, and workflows. - Comprehensive documentation improvements, including contributing guides and governance. - Core code enhancements: API updates, examples, and bug fixes. - Build and infrastructure optimizations such as Dockerfile improvements and SBOM automation. ## New Contributors * @sscargal made their first contribution in https://github.com/MemMachine/MemMachine/pull/1 * @SarahScargall made their first Low9/12/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

adk-pythonAn open-source, code-first Python toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.v2.2.0
adk-jsAn open-source, code-first Typescript toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.devtools-v1.2.0
PageIndex๐Ÿ“‘ PageIndex: Document Index for Vectorless, Reasoning-based RAGmain@2026-06-02
adk-javaAn open-source, code-first Java toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.v1.4.0
agentic-rag๐Ÿ“„ Enable smart document and data search with AI-powered chat, vector search, and SQL querying across multiple file formats.main@2026-06-01

More in Databases

milvusMilvus is a high-performance, cloud-native vector database built for scalable vector ANN search
WeKnoraLLM-powered framework for deep document understanding, semantic retrieval, and context-aware answers using RAG paradigm.
ai-real-estate-assistantAdvanced AI Real Estate Assistant using RAG, LLMs, and Python. Features market analysis, property valuation, and intelligent search.
alibabacloud-adb20211201Alibaba Cloud adb (20211201) SDK Library for Python