{"id":13455934,"url":"https://github.com/mem0ai/mem0","last_synced_at":"2026-04-11T17:17:17.957Z","repository":{"id":176348497,"uuid":"656099147","full_name":"mem0ai/mem0","owner":"mem0ai","description":"Memory for AI Agents; SOTA in AI Agent Memory, beating OpenAI Memory in accuracy by 26% - https://mem0.ai/research","archived":false,"fork":false,"pushed_at":"2025-05-05T14:08:59.000Z","size":36502,"stargazers_count":28573,"open_issues_count":318,"forks_count":2728,"subscribers_count":151,"default_branch":"main","last_synced_at":"2025-05-05T14:10:12.218Z","etag":null,"topics":["agent","ai","aiagent","application","chatbots","chatgpt","embeddings","llm","long-term-memory","memory","memory-management","python","rag","state-management","vector-database"],"latest_commit_sha":null,"homepage":"https://mem0.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mem0ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-20T08:58:36.000Z","updated_at":"2025-05-05T14:09:06.000Z","dependencies_parsed_at":"2023-09-26T22:42:54.333Z","dependency_job_id":"c83b3d66-b9e0-4059-95bf-497c2102adaa","html_url":"https://github.com/mem0ai/mem0","commit_stats":{"total_commits":1044,"total_committers":143,"mean_commits":7.300699300699301,"dds":0.8218390804597702,"last_synced_commit":"3914f4d6ac4ab1bc3da5174c559ad43b13f005e0"},"previous_names":["embedchain/embedchain"],"tags_count":246,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mem0ai%2Fmem0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mem0ai%2Fmem0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mem0ai%2Fmem0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mem0ai%2Fmem0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mem0ai","download_url":"https://codeload.github.com/mem0ai/mem0/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492649,"owners_count":21916968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","aiagent","application","chatbots","chatgpt","embeddings","llm","long-term-memory","memory","memory-management","python","rag","state-management","vector-database"],"created_at":"2024-07-31T08:01:13.654Z","updated_at":"2026-04-06T13:02:34.233Z","avatar_url":"https://github.com/mem0ai.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/mem0ai/mem0\"\u003e\n    \u003cimg src=\"docs/images/banner-sm.png\" width=\"800px\" alt=\"Mem0 - The Memory Layer for Personalized AI\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" style=\"display: flex; justify-content: center; gap: 20px; align-items: center;\"\u003e\n  \u003ca href=\"https://trendshift.io/repositories/11194\" target=\"blank\"\u003e\n    \u003cimg src=\"https://trendshift.io/api/badge/repositories/11194\" alt=\"mem0ai%2Fmem0 | Trendshift\" width=\"250\" height=\"55\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mem0.ai\"\u003eLearn more\u003c/a\u003e\n  ·\n  \u003ca href=\"https://mem0.dev/DiG\"\u003eJoin Discord\u003c/a\u003e\n  ·\n  \u003ca href=\"https://mem0.dev/demo\"\u003eDemo\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mem0.dev/DiG\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Discord-%235865F2.svg?\u0026logo=discord\u0026logoColor=white\" alt=\"Mem0 Discord\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pepy.tech/project/mem0ai\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/dm/mem0ai\" alt=\"Mem0 PyPI - Downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/mem0ai/mem0\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/commit-activity/m/mem0ai/mem0?style=flat-square\" alt=\"GitHub commit activity\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/mem0ai\" target=\"blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/mem0ai?color=%2334D058\u0026label=pypi%20package\" alt=\"Package version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/mem0ai\" target=\"blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/mem0ai\" alt=\"Npm package\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.ycombinator.com/companies/mem0\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Y%20Combinator-S24-orange?style=flat-square\" alt=\"Y Combinator S24\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mem0.ai/research\"\u003e\u003cstrong\u003e📄 Building Production-Ready AI Agents with Scalable Long-Term Memory →\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e⚡ +26% Accuracy vs. OpenAI Memory • 🚀 91% Faster • 💰 90% Fewer Tokens\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003e **🎉 mem0ai v1.0.0 is now available!** This major release includes API modernization, improved vector store support, and enhanced GCP integration. [See migration guide →](MIGRATION_GUIDE_v1.0.md)\n\n##  🔥 Research Highlights\n- **+26% Accuracy** over OpenAI Memory on the LOCOMO benchmark\n- **91% Faster Responses** than full-context, ensuring low-latency at scale\n- **90% Lower Token Usage** than full-context, cutting costs without compromise\n- [Read the full paper](https://mem0.ai/research)\n\n# Introduction\n\n[Mem0](https://mem0.ai) (\"mem-zero\") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions. It remembers user preferences, adapts to individual needs, and continuously learns over time—ideal for customer support chatbots, AI assistants, and autonomous systems.\n\n### Key Features \u0026 Use Cases\n\n**Core Capabilities:**\n- **Multi-Level Memory**: Seamlessly retains User, Session, and Agent state with adaptive personalization\n- **Developer-Friendly**: Intuitive API, cross-platform SDKs, and a fully managed service option\n\n**Applications:**\n- **AI Assistants**: Consistent, context-rich conversations\n- **Customer Support**: Recall past tickets and user history for tailored help\n- **Healthcare**: Track patient preferences and history for personalized care\n- **Productivity \u0026 Gaming**: Adaptive workflows and environments based on user behavior\n\n## 🚀 Quickstart Guide \u003ca name=\"quickstart\"\u003e\u003c/a\u003e\n\nChoose between our hosted platform or self-hosted package:\n\n### Hosted Platform\n\nGet up and running in minutes with automatic updates, analytics, and enterprise security.\n\n1. Sign up on [Mem0 Platform](https://app.mem0.ai)\n2. Embed the memory layer via SDK or API keys\n\n### Self-Hosted (Open Source)\n\nInstall the sdk via pip:\n\n```bash\npip install mem0ai\n```\n\nInstall sdk via npm:\n```bash\nnpm install mem0ai\n```\n\n### CLI\n\nManage memories from your terminal:\n\n```bash\nnpm install -g @mem0/cli   # or: pip install mem0-cli\n\nmem0 init\nmem0 add \"Prefers dark mode and vim keybindings\" --user-id alice\nmem0 search \"What does Alice prefer?\" --user-id alice\n```\n\nSee the [CLI documentation](https://docs.mem0.ai/platform/cli) for the full command reference.\n\n### Basic Usage\n\nMem0 requires an LLM to function, with `gpt-4.1-nano-2025-04-14 from OpenAI as the default. However, it supports a variety of LLMs; for details, refer to our [Supported LLMs documentation](https://docs.mem0.ai/components/llms/overview).\n\nFirst step is to instantiate the memory:\n\n```python\nfrom openai import OpenAI\nfrom mem0 import Memory\n\nopenai_client = OpenAI()\nmemory = Memory()\n\ndef chat_with_memories(message: str, user_id: str = \"default_user\") -\u003e str:\n    # Retrieve relevant memories\n    relevant_memories = memory.search(query=message, user_id=user_id, limit=3)\n    memories_str = \"\\n\".join(f\"- {entry['memory']}\" for entry in relevant_memories[\"results\"])\n\n    # Generate Assistant response\n    system_prompt = f\"You are a helpful AI. Answer the question based on query and memories.\\nUser Memories:\\n{memories_str}\"\n    messages = [{\"role\": \"system\", \"content\": system_prompt}, {\"role\": \"user\", \"content\": message}]\n    response = openai_client.chat.completions.create(model=\"gpt-4.1-nano-2025-04-14\", messages=messages)\n    assistant_response = response.choices[0].message.content\n\n    # Create new memories from the conversation\n    messages.append({\"role\": \"assistant\", \"content\": assistant_response})\n    memory.add(messages, user_id=user_id)\n\n    return assistant_response\n\ndef main():\n    print(\"Chat with AI (type 'exit' to quit)\")\n    while True:\n        user_input = input(\"You: \").strip()\n        if user_input.lower() == 'exit':\n            print(\"Goodbye!\")\n            break\n        print(f\"AI: {chat_with_memories(user_input)}\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nFor detailed integration steps, see the [Quickstart](https://docs.mem0.ai/quickstart) and [API Reference](https://docs.mem0.ai/api-reference).\n\n## 🔗 Integrations \u0026 Demos\n\n- **ChatGPT with Memory**: Personalized chat powered by Mem0 ([Live Demo](https://mem0.dev/demo))\n- **Browser Extension**: Store memories across ChatGPT, Perplexity, and Claude ([Chrome Extension](https://chromewebstore.google.com/detail/onihkkbipkfeijkadecaafbgagkhglop?utm_source=item-share-cb))\n- **Langgraph Support**: Build a customer bot with Langgraph + Mem0 ([Guide](https://docs.mem0.ai/integrations/langgraph))\n- **CrewAI Integration**: Tailor CrewAI outputs with Mem0 ([Example](https://docs.mem0.ai/integrations/crewai))\n\n## 📚 Documentation \u0026 Support\n\n- Full docs: https://docs.mem0.ai\n- Community: [Discord](https://mem0.dev/DiG) · [X (formerly Twitter)](https://x.com/mem0ai)\n- Contact: founders@mem0.ai\n\n## Citation\n\nWe now have a paper you can cite:\n\n```bibtex\n@article{mem0,\n  title={Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory},\n  author={Chhikara, Prateek and Khant, Dev and Aryan, Saket and Singh, Taranjeet and Yadav, Deshraj},\n  journal={arXiv preprint arXiv:2504.19413},\n  year={2025}\n}\n```\n\n## ⚖️ License\n\nApache 2.0 — see the [LICENSE](https://github.com/mem0ai/mem0/blob/main/LICENSE) file for details.\n","funding_links":[],"categories":["AI Agent Frameworks","Python","Projects","🧺 Curated catalog","NLP","Applications","Repos","推理 Inference","Runtime","HarmonyOS","Addons, extensions, plug-ins for integrating LLM into third-party applications","Learning","Industry Strength Information Retrieval","📊 Data and Research Agents","LLM Ops","⚙️ Agent Operations","chatgpt","📋 List of Open-Source Projects","Memory Systems","📋 Contents","Librerías para usar NLP en español","✍️ Write Context","Personal Assistants \u0026 Conversational Agents","3. **Real-World Applications**","🧐 Memory \u0026 Persistence","MCP \u0026 Model Context Protocol","\u003ca name=\"Python\"\u003e\u003c/a\u003ePython","🧠 AI Applications \u0026 Platforms","5. Agent Memory","🛠️ Tools and Frameworks (Memory Infrastructure)","🛠️ Memory Apps \u0026 Tools","Table of Contents","Memory Management","Knowledge Graphs and Memory","AI and Agents","State \u0026 Memory","Agent Infrastructure","LLM Application / RAG","Tools","🧩 Agent Frameworks \u0026 Dev Libraries","🌟 Hidden Gems: Underrated Tools","APIs","2. Systems \u0026 Frameworks (stateful agents / memory managers)"],"sub_categories":["General Agent Frameworks","AI Agents \u0026 Templates","Memory","Advanced Components","Tool","Windows Manager","Other user interfaces","Repositories","RAG and Knowledge Bases","Other Cloud Provider Credits","🧠 Memory","Agents","Vector Store Tutorials","🤖 4. Agentic AI \u0026 Multi-Agent Systems","Modelos de Embeddings para Sentence Similarity y Semantic Search","Long-term memory","Virtual Assistants","Long-term Memory Systems","Agent Memory \u0026 Context","Tools","Rust","Knowledge Management","AI Utilities","Benchmark Reality Check (real-world tool use)","Memory \u0026 State","Memory Management","Specialized Agent Libraries","Resources"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmem0ai%2Fmem0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmem0ai%2Fmem0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmem0ai%2Fmem0/lists"}