--- id: mem0ai version: "2.0.18" license: Apache-2.0 license_treatment: permissive maintenance: active --- # mem0ai — Long-term memory for AI Agents License: permissive · Maintenance: active · Downloads: 3.9M/mo ## What it is and what it does Mem0ai is a memory management layer for AI agents and assistants that persists user preferences, session state, and interaction history across conversations. It provides semantic search, keyword matching, and entity-based retrieval to surface relevant context when needed. The package wraps LLM calls (defaulting to OpenAI) and vector storage (Qdrant) to extract, store, and retrieve memories automatically. The library is designed for three deployment modes: local testing via pip install, self-hosted Docker stack with auth and dashboard, or a managed cloud platform. It supports multi-level memory (user, session, agent state) and works with any LLM that the underlying integration supports. Core dependencies are pydantic for validation, sqlalchemy for storage abstraction, qdrant-client for vector retrieval, openai for the default LLM backend, and httpx for HTTP communication. Use it for: - Build customer support chatbots that recall past tickets and user history for context-aware responses. - Create AI assistants that adapt to individual user preferences and learning patterns over time. - Implement autonomous agents that maintain state across multiple tasks and sessions. - Develop healthcare applications that track patient preferences and medical history securely. - Build productivity tools or games that personalize workflows and environments based on user behavior. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Mem0 adds a persistent, searchable memory layer to AI agents and assistants, storing and retrieving user preferences, session state, and interaction history across conversations. Yes. Mem0ai is actively maintained, has low install friction, carries a permissive Apache-2.0 license, and addresses a real need for persistent context in multi-turn AI interactions. It is in the top 5000 PyPI packages by download volume. Start with the library for prototyping; self-hosted or cloud options are available for production. No known security vulnerabilities. ## Install pip install mem0ai uv add mem0ai poetry add mem0ai ## Installing mem0ai Before you install: Low install friction with a pure-Python wheel. Active maintenance—released 3 days ago. Depends on standard data/ML libraries (pydantic, sqlalchemy, qdrant-client, openai, httpx) and observability (posthog), all widely maintained. License in practice: Apache-2.0 permissive license allows commercial use, modification, and redistribution with minimal restrictions—suitable for both proprietary and open-source projects. Quickstart: pip install mem0ai from openai import OpenAI import httpx # Instantiate memory with default OpenAI LLM # Requires OpenAI API key in environment Requires an LLM API key (OpenAI gpt-5-mini by default); Python 3.10 or later. Verify before relying: - Whether the benchmark scores (92.5 LoCoMo, 94.4 LongMemEval, 64.1 BEAM 1M) apply to the open-source SDK or only the managed platform. - Exact performance characteristics and token costs for typical production workloads with the open-source library. - Whether entity linking and temporal reasoning features are available in the open-source SDK or platform-only. - How the library integrates with the runtime dependencies (httpx, openai, qdrant-client, sqlalchemy, pydantic) in typical workflows. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ai agent memory management, long-term memory for llms, user preference persistence, conversation context storage, semantic memory retrieval, agent state management, personalized ai interactions, agent-memory, vector-retrieval, llm-context [View on SkillFed](https://skillfed.io/packages/mem0ai) · [View on PyPI](https://pypi.org/project/mem0ai/)