# Repository Briefing: MemMachine/MemMachine
> Source: https://repoforai.com/repo/MemMachine/MemMachine (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/MemMachine/MemMachine
- **Official Docs / Website**: https://memmachine.ai
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (88/100 · Maintenance 35/35 · Adoption 16/25 · Releases 17/20 · License 20/20)
- **Latest Release**: v0.4.0 (2026-10-08) — https://github.com/MemMachine/MemMachine/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, MCP, API
- **Momentum**: 3,099 ★ total (+0 24h / +6 7d) · 230 forks
- **Topics**: `agent`, `agentic-ai`, `agents`, `agents-sdk`, `ai`, `ai-agents`, `chatbots`, `conversational-agents`, `conversational-ai`, `genai`, `knowledge-graph`, `llm`
- **When to Use**: Best for: Teams building personalized assistants or multi-agent applications that need session context, cross-session recall, and durable user profiles behind one service. Skip if: You only need document RAG, a session buffer, or vector search, or your application already owns memory lifecycle and access control and needs only a storage backend.

## Overview
```text
### Architecture & Core Mechanics
MemMachine is a Python memory service that sits between an agent and its storage backends. Its uv workspace separates packages/client, packages/common, and packages/server. From a running service, an agent selects an organization and project, obtains a memory handle using group, agent, user, and session IDs, writes interactions with optional metadata, and searches for context to pass back to the model.

The data model separates working memory for the current session, episodic memory for conversational history, and profile memory for durable user facts. PostgreSQL with pgvector backs profile storage in Compose. Long-term episodic memory has two Compose topologies: event uses Qdrant, while declarative uses Neo4j. The graph-oriented path therefore does not describe every installation. REST and SDK calls serve application integrations; MCP provides separate stdio and HTTP entrypoints.

### Key Capabilities & Differentiators
The useful distinction is between recalling an earlier interaction and retrieving a durable fact about a user. An assistant can retrieve the conversation in which a preference was expressed without treating every conversational detail as permanent profile data. The Python search example exposes long-term episodes at results.content.episodic_memory.long_term_memory.episodes, giving callers a concrete path to the returned content.

Model-provider options include OpenAI, Anthropic, Bedrock, and Ollama. The integration surface includes Python and TypeScript SDKs, REST, MCP, and adapters for frameworks such as LangChain, LangGraph, CrewAI, and LlamaIndex. That makes memory independently deployable from the agent framework, but switching providers still warrants checking retrieval behavior and whether existing embeddings and indexes remain usable.

### Trade-offs & Limitations
Compared with using Qdrant or PostgreSQL with pgvector directly, MemMachine moves memory scoping, recall, and profile handling behind a shared service. That is useful when several agents need the same memory contract; for one bot that only needs vector search, the extra service and backend configuration may not pay off. Choose the Neo4j path when graph-oriented episodic memory is a requirement, not on the assumption that it improves recall for every workload.

For production, plan backups and restores across profile and episodic stores, and verify access isolation and deletion across both. Group, agent, user, and session IDs scope memory requests; do not treat them as proof of authorization boundaries. Apache-2.0 permits commercial use subject to its terms, but does not settle the terms of external model services or how those services handle user data.

### Hardware & Deployment Guide
For a first self-hosted deployment, run the Python service locally or use Docker Compose. Set COMPOSE_PROFILES in .env or pass --profile event for Qdrant or --profile declarative for Neo4j. With neither profile active, Compose starts neither episodic backend. Match episodic_memory.long_term_memory in configuration.yml to the active profile; memmachine-compose.sh generates matching settings. Before launching MCP directly, run memmachine-server prepare to create schemas for the configured databases.

The Python client requires a running server; a managed option is also available. Self-hosting storage does not make inference offline: an external model API still requires network access, while local inference through Ollama must be sized separately. v0.3.8 introduced embedded vector-store implementations, but the two Compose profiles select external stores. v0.4.0 added BEAM benchmark support; that addition is not a measured result for your workload.
```

## Key Capabilities
```text
- Memory lifecycle: Working memory serves the current session, episodic memory recalls earlier interactions, and profile memory stores durable user facts and preferences.
- Memory scoping: Organization and project selection precedes a memory handle scoped by group, agent, user, and session IDs; writes can include metadata.
- Storage topology: Compose selects Qdrant for event or Neo4j for declarative long-term episodic memory; PostgreSQL with pgvector stores profiles.
- Protocol endpoints: REST and Python and TypeScript SDKs support application integration; MCP exposes memmachine-mcp-stdio and memmachine-mcp-http.
- Framework adapters: LangGraph, CrewAI, AWS Strands, and n8n integrations provide entrypoints for existing agent and workflow stacks.
- Release evidence: v0.3.8 introduced embedded vector-store implementations; v0.4.0 added BEAM benchmark support.
```

## Quick Start / Clone
```bash
pip install memmachine-client
```
