Name | ola-mem0ai JSON |
Version |
0.1.97
JSON |
| download |
home_page | None |
Summary | Long-term memory for AI Agents |
upload_time | 2025-07-24 07:25:54 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <4.0,>=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<a href="https://github.com/mem0ai/mem0">
<img src="docs/images/banner-sm.png" width="800px" alt="Mem0 - The Memory Layer for Personalized AI">
</a>
</p>
<p align="center" style="display: flex; justify-content: center; gap: 20px; align-items: center;">
<a href="https://trendshift.io/repositories/11194" target="blank">
<img src="https://trendshift.io/api/badge/repositories/11194" alt="mem0ai%2Fmem0 | Trendshift" width="250" height="55"/>
</a>
</p>
<p align="center">
<a href="https://mem0.ai">Learn more</a>
Β·
<a href="https://mem0.dev/DiG">Join Discord</a>
Β·
<a href="https://mem0.dev/demo">Demo</a>
Β·
<a href="https://mem0.dev/openmemory">OpenMemory</a>
</p>
<p align="center">
<a href="https://mem0.dev/DiG">
<img src="https://dcbadge.vercel.app/api/server/6PzXDgEjG5?style=flat" alt="Mem0 Discord">
</a>
<a href="https://pepy.tech/project/mem0ai">
<img src="https://img.shields.io/pypi/dm/mem0ai" alt="Mem0 PyPI - Downloads">
</a>
<a href="https://github.com/mem0ai/mem0">
<img src="https://img.shields.io/github/commit-activity/m/mem0ai/mem0?style=flat-square" alt="GitHub commit activity">
</a>
<a href="https://pypi.org/project/mem0ai" target="blank">
<img src="https://img.shields.io/pypi/v/mem0ai?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://www.npmjs.com/package/mem0ai" target="blank">
<img src="https://img.shields.io/npm/v/mem0ai" alt="Npm package">
</a>
<a href="https://www.ycombinator.com/companies/mem0">
<img src="https://img.shields.io/badge/Y%20Combinator-S24-orange?style=flat-square" alt="Y Combinator S24">
</a>
</p>
<p align="center">
<a href="https://mem0.ai/research"><strong>π Building Production-Ready AI Agents with Scalable Long-Term Memory β</strong></a>
</p>
<p align="center">
<strong>β‘ +26% Accuracy vs. OpenAI Memory β’ π 91% Faster β’ π° 90% Fewer Tokens</strong>
</p>
## π₯ Research Highlights
- **+26% Accuracy** over OpenAI Memory on the LOCOMO benchmark
- **91% Faster Responses** than full-context, ensuring low-latency at scale
- **90% Lower Token Usage** than full-context, cutting costs without compromise
- [Read the full paper](https://mem0.ai/research)
# Introduction
[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.
### Key Features & Use Cases
**Core Capabilities:**
- **Multi-Level Memory**: Seamlessly retains User, Session, and Agent state with adaptive personalization
- **Developer-Friendly**: Intuitive API, cross-platform SDKs, and a fully managed service option
**Applications:**
- **AI Assistants**: Consistent, context-rich conversations
- **Customer Support**: Recall past tickets and user history for tailored help
- **Healthcare**: Track patient preferences and history for personalized care
- **Productivity & Gaming**: Adaptive workflows and environments based on user behavior
## π Quickstart Guide <a name="quickstart"></a>
Choose between our hosted platform or self-hosted package:
### Hosted Platform
Get up and running in minutes with automatic updates, analytics, and enterprise security.
1. Sign up on [Mem0 Platform](https://app.mem0.ai)
2. Embed the memory layer via SDK or API keys
### Self-Hosted (Open Source)
Install the sdk via pip:
```bash
pip install mem0ai
```
Install sdk via npm:
```bash
npm install mem0ai
```
### Basic Usage
Mem0 requires an LLM to function, with `gpt-4o-mini` 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).
First step is to instantiate the memory:
```python
from openai import OpenAI
from mem0 import Memory
openai_client = OpenAI()
memory = Memory()
def chat_with_memories(message: str, user_id: str = "default_user") -> str:
# Retrieve relevant memories
relevant_memories = memory.search(query=message, user_id=user_id, limit=3)
memories_str = "\n".join(f"- {entry['memory']}" for entry in relevant_memories["results"])
# Generate Assistant response
system_prompt = f"You are a helpful AI. Answer the question based on query and memories.\nUser Memories:\n{memories_str}"
messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": message}]
response = openai_client.chat.completions.create(model="gpt-4o-mini", messages=messages)
assistant_response = response.choices[0].message.content
# Create new memories from the conversation
messages.append({"role": "assistant", "content": assistant_response})
memory.add(messages, user_id=user_id)
return assistant_response
def main():
print("Chat with AI (type 'exit' to quit)")
while True:
user_input = input("You: ").strip()
if user_input.lower() == 'exit':
print("Goodbye!")
break
print(f"AI: {chat_with_memories(user_input)}")
if __name__ == "__main__":
main()
```
For detailed integration steps, see the [Quickstart](https://docs.mem0.ai/quickstart) and [API Reference](https://docs.mem0.ai/api-reference).
## π Integrations & Demos
- **ChatGPT with Memory**: Personalized chat powered by Mem0 ([Live Demo](https://mem0.dev/demo))
- **Browser Extension**: Store memories across ChatGPT, Perplexity, and Claude ([Chrome Extension](https://chromewebstore.google.com/detail/onihkkbipkfeijkadecaafbgagkhglop?utm_source=item-share-cb))
- **Langgraph Support**: Build a customer bot with Langgraph + Mem0 ([Guide](https://docs.mem0.ai/integrations/langgraph))
- **CrewAI Integration**: Tailor CrewAI outputs with Mem0 ([Example](https://docs.mem0.ai/integrations/crewai))
## π Documentation & Support
- Full docs: https://docs.mem0.ai
- Community: [Discord](https://mem0.dev/DiG) Β· [Twitter](https://x.com/mem0ai)
- Contact: founders@mem0.ai
## Citation
We now have a paper you can cite:
```bibtex
@article{mem0,
title={Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory},
author={Chhikara, Prateek and Khant, Dev and Aryan, Saket and Singh, Taranjeet and Yadav, Deshraj},
journal={arXiv preprint arXiv:2504.19413},
year={2025}
}
```
## βοΈ License
Apache 2.0 β see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "ola-mem0ai",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Mem0 <founders@mem0.ai>",
"download_url": "https://files.pythonhosted.org/packages/41/36/ff069292a868250f896f9ba47a3e0205bce3443064725f5d83d5cf3a02e8/ola_mem0ai-0.1.97.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <a href=\"https://github.com/mem0ai/mem0\">\n <img src=\"docs/images/banner-sm.png\" width=\"800px\" alt=\"Mem0 - The Memory Layer for Personalized AI\">\n </a>\n</p>\n<p align=\"center\" style=\"display: flex; justify-content: center; gap: 20px; align-items: center;\">\n <a href=\"https://trendshift.io/repositories/11194\" target=\"blank\">\n <img src=\"https://trendshift.io/api/badge/repositories/11194\" alt=\"mem0ai%2Fmem0 | Trendshift\" width=\"250\" height=\"55\"/>\n </a>\n</p>\n\n<p align=\"center\">\n <a href=\"https://mem0.ai\">Learn more</a>\n \u00b7\n <a href=\"https://mem0.dev/DiG\">Join Discord</a>\n \u00b7\n <a href=\"https://mem0.dev/demo\">Demo</a>\n \u00b7\n <a href=\"https://mem0.dev/openmemory\">OpenMemory</a>\n</p>\n\n<p align=\"center\">\n <a href=\"https://mem0.dev/DiG\">\n <img src=\"https://dcbadge.vercel.app/api/server/6PzXDgEjG5?style=flat\" alt=\"Mem0 Discord\">\n </a>\n <a href=\"https://pepy.tech/project/mem0ai\">\n <img src=\"https://img.shields.io/pypi/dm/mem0ai\" alt=\"Mem0 PyPI - Downloads\">\n </a>\n <a href=\"https://github.com/mem0ai/mem0\">\n <img src=\"https://img.shields.io/github/commit-activity/m/mem0ai/mem0?style=flat-square\" alt=\"GitHub commit activity\">\n </a>\n <a href=\"https://pypi.org/project/mem0ai\" target=\"blank\">\n <img src=\"https://img.shields.io/pypi/v/mem0ai?color=%2334D058&label=pypi%20package\" alt=\"Package version\">\n </a>\n <a href=\"https://www.npmjs.com/package/mem0ai\" target=\"blank\">\n <img src=\"https://img.shields.io/npm/v/mem0ai\" alt=\"Npm package\">\n </a>\n <a href=\"https://www.ycombinator.com/companies/mem0\">\n <img src=\"https://img.shields.io/badge/Y%20Combinator-S24-orange?style=flat-square\" alt=\"Y Combinator S24\">\n </a>\n</p>\n\n<p align=\"center\">\n <a href=\"https://mem0.ai/research\"><strong>\ud83d\udcc4 Building Production-Ready AI Agents with Scalable Long-Term Memory \u2192</strong></a>\n</p>\n<p align=\"center\">\n <strong>\u26a1 +26% Accuracy vs. OpenAI Memory \u2022 \ud83d\ude80 91% Faster \u2022 \ud83d\udcb0 90% Fewer Tokens</strong>\n</p>\n\n## \ud83d\udd25 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\u2014ideal for customer support chatbots, AI assistants, and autonomous systems.\n\n### Key Features & 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 & Gaming**: Adaptive workflows and environments based on user behavior\n\n## \ud83d\ude80 Quickstart Guide <a name=\"quickstart\"></a>\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### Basic Usage\n\nMem0 requires an LLM to function, with `gpt-4o-mini` 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\") -> 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-4o-mini\", 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## \ud83d\udd17 Integrations & 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## \ud83d\udcda Documentation & Support\n\n- Full docs: https://docs.mem0.ai\n- Community: [Discord](https://mem0.dev/DiG) \u00b7 [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## \u2696\ufe0f License\n\nApache 2.0 \u2014 see the [LICENSE](LICENSE) file for details.",
"bugtrack_url": null,
"license": null,
"summary": "Long-term memory for AI Agents",
"version": "0.1.97",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d60fbbc0efa1896eb2e97fdc573c24ee0f5bfceda5e48568635b03e27a7d883c",
"md5": "f2776aba83278a79f53b1cda8a8d9ef4",
"sha256": "0578a3fe421abd3cc55c60e4b61370aee418b6f5ac0b219963c34babcc62b98d"
},
"downloads": -1,
"filename": "ola_mem0ai-0.1.97-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f2776aba83278a79f53b1cda8a8d9ef4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 182900,
"upload_time": "2025-07-24T07:25:52",
"upload_time_iso_8601": "2025-07-24T07:25:52.029104Z",
"url": "https://files.pythonhosted.org/packages/d6/0f/bbc0efa1896eb2e97fdc573c24ee0f5bfceda5e48568635b03e27a7d883c/ola_mem0ai-0.1.97-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4136ff069292a868250f896f9ba47a3e0205bce3443064725f5d83d5cf3a02e8",
"md5": "e4726d743307c06e1a0bc240c645618e",
"sha256": "7b1216381c02da26befe5b3cd252e97f310d3ee5897bae34748a84da8ffb1419"
},
"downloads": -1,
"filename": "ola_mem0ai-0.1.97.tar.gz",
"has_sig": false,
"md5_digest": "e4726d743307c06e1a0bc240c645618e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 118954,
"upload_time": "2025-07-24T07:25:54",
"upload_time_iso_8601": "2025-07-24T07:25:54.215052Z",
"url": "https://files.pythonhosted.org/packages/41/36/ff069292a868250f896f9ba47a3e0205bce3443064725f5d83d5cf3a02e8/ola_mem0ai-0.1.97.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-24 07:25:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ola-mem0ai"
}