Mem0

Universal memory layer that gives AI agents and assistants long-term, personalized recall

Library
PyPI
v2.2.1
66,108 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
91 /100 Excellent
Development Activity 96
Maintenance 100
Community 76
Maturity 52
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
84 /100 Excellent
Architecture 85
Code Quality 82
Innovation 88
Learning Curve 80

Mem0 (“mem-zero”) is an open-source memory layer for AI agents and assistants. It extracts, stores, and retrieves salient facts about users, sessions, and agents so that LLM applications can remember preferences and context across conversations instead of starting from scratch every turn.

It plugs into your existing LLM and vector-store stack through a simple add/search API, supports multi-level memory (user, session, agent), and offers both a self-hosted open-source SDK and an optional fully managed platform.

What You Get

  • A simple add/search/get_all memory API for storing and retrieving facts
  • Multi-level memory across user, session, and agent scopes
  • Pluggable LLM, embedding, and vector-store backends (OpenAI, Qdrant, Chroma, Pinecone, and many more)
  • Both a self-hosted open-source SDK and an optional managed hosted platform
  • Async and sync clients plus a REST server for language-agnostic access

Common Use Cases

  • Personalizing customer-support and assistant chatbots with remembered preferences
  • Giving autonomous agents durable long-term memory of past actions and facts
  • Reducing prompt token costs by retrieving only relevant context instead of full history
  • Building AI companions that adapt to individual users over time

Under The Hood

Architecture - Mem0 centers on a Memory class (mem0/memory/) that orchestrates an LLM for fact extraction, an embedding model, and a vector store for retrieval, with a parallel hosted MemoryClient (mem0/client/main.py) that talks to the managed REST API. The add pipeline extracts salient facts from a message via the LLM, embeds them, and upserts them into the configured vector store; search embeds the query and fuses semantic, keyword, and entity signals to return only relevant memories.

Tech Stack - Written in Python (>=3.10) and built with hatchling. Core dependencies include pydantic, openai, httpx, qdrant-client, sqlalchemy, and posthog, with a large matrix of optional extras for alternative vector stores (Chroma, Pinecone, Weaviate, Milvus, pgvector) and LLM providers (Groq, Together, LiteLLM).

Code Quality - The codebase is modular, splitting llms, embeddings, vector_stores, configs, and memory into clear provider-abstraction packages, and ships a substantial test suite (~98 test modules under tests/) covering client, memory, LLM, and vector-store behavior. Configuration is driven through pydantic models, giving type-checked, swappable backends.

API Design - The public surface is deliberately small and ergonomic: add, search, get_all, update, and delete, mirrored across sync and async clients, so getting started requires only a few lines. Provider selection is config-driven rather than code-heavy, keeping application code stable as backends change.

Used by 5 apps in this directory

Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 1 weeks ago
Python
62%
MIT

AutoGen

AI Development · Automation

61,194

Build autonomous and human-in-the-loop multi-agent AI systems with a layered, event-driven Python and .NET framework pioneered at Microsoft Research.

View details
56
Repo Health
78
Technical
73
Dependency
Built with
Python 62%
C# 25%
TypeScript 12%
Updated 5 months ago
Python
66%
Other

AutoGPT

AI Assistants · Automation · Productivity

187,596

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
66
Dependency
Built with
Python 66%
TypeScript 33%
Updated 1 weeks ago
Python
82%
Apache 2.0

headroom

AI Development · Developer Tools

73,966

Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.

View details
85
Repo Health
86
Technical
69
Dependency
Built with
Python 82%
Rust 12%
Updated 1 weeks ago
Python
69%
MIT

Langflow

AI Agents · AI Development

155,319

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
65
Dependency
Built with
Python 69%
TypeScript 22%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers