mem0ai 0.1.67
pip install mem0ai
Released:
Long-term memory for AI Agents
Navigation
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIMeta
- Author: Mem0
- Requires: Python <4.0, >=3.9
-
Provides-Extra:
graph
Classifiers
- Programming Language
Project description
Learn more · Join Discord · Demo
Introduction
Mem0 (pronounced as "mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions. Mem0 remembers user preferences, adapts to individual needs, and continuously improves over time, making it ideal for customer support chatbots, AI assistants, and autonomous systems.
Features & Use Cases
Core Capabilities:
- Multi-Level Memory: User, Session, and AI Agent memory retention with adaptive personalization
- Developer-Friendly: Simple API integration, cross-platform consistency, and hassle-free managed service
Applications:
- AI Assistants: Seamless conversations with context and personalization
- Learning & Support: Tailored content recommendations and context-aware customer assistance
- Healthcare & Companions: Patient history tracking and deeper relationship building
- Productivity & Gaming: Streamlined workflows and adaptive environments based on user behavior
Get Started
Get started quickly with Mem0 Platform - our fully managed solution that provides automatic updates, advanced analytics, enterprise security, and dedicated support. Create a free account to begin.
For complete control, you can self-host Mem0 using our open-source package. See the Quickstart guide below to set up your own instance.
Quickstart Guide
Install the Mem0 package via pip:
pip install mem0ai
Install the Mem0 package via npm:
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.
First step is to instantiate the memory:
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()
See the example for Node.js.
For more advanced usage and API documentation, visit our documentation.
[!TIP] For a hassle-free experience, try our hosted platform with automatic updates and enterprise features.
Demos
- Mem0 - ChatGPT with Memory: A personalized AI chat app powered by Mem0 that remembers your preferences, facts, and memories.
Try live demo
- AI Companion: Experience personalized conversations with an AI that remembers your preferences and past interactions
- Enhance your AI interactions by storing memories across ChatGPT, Perplexity, and Claude using our browser extension. Get chrome extension.
- Customer support bot using Langgraph and Mem0. Get the complete code from here
- Use Mem0 with CrewAI to get personalized results. Full example here
Documentation
For detailed usage instructions and API reference, visit our documentation. You'll find:
- Complete API reference
- Integration guides
- Advanced configuration options
- Best practices and examples
- More details about:
- Open-source version
- Hosted Mem0 Platform
Support
Join our community for support and discussions. If you have any questions, feel free to reach out to us using one of the following methods:
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Project details
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIMeta
- Author: Mem0
- Requires: Python <4.0, >=3.9
-
Provides-Extra:
graph
Classifiers
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mem0ai-0.1.67.tar.gz
.
File metadata
- Download URL: mem0ai-0.1.67.tar.gz
- Upload date:
- Size: 68.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf6dd89eb90b66da13db5da244d9bd1e412f47548e20c42f4cee0400437d0a53 |
|
MD5 | ae5d6fada75c62136d00d95f17187dca |
|
BLAKE2b-256 | b56f3ec6b923403e3be1b84393dc73d38dd86a84148ee3b201cdb1c1dd2a54aa |
Provenance
The following attestation bundles were made for mem0ai-0.1.67.tar.gz
:
Publisher:
cd.yml
on mem0ai/mem0
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
mem0ai-0.1.67.tar.gz
- Subject digest:
cf6dd89eb90b66da13db5da244d9bd1e412f47548e20c42f4cee0400437d0a53
- Sigstore transparency entry: 179831126
- Sigstore integration time:
- Permalink:
mem0ai/mem0@6e4fb22a7cb1a768d88aff51094baa1c778329a2
- Branch / Tag:
refs/tags/v0.1.67
- Owner: https://github.com/mem0ai
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
cd.yml@6e4fb22a7cb1a768d88aff51094baa1c778329a2
- Trigger Event:
release
- Statement type:
File details
Details for the file mem0ai-0.1.67-py3-none-any.whl
.
File metadata
- Download URL: mem0ai-0.1.67-py3-none-any.whl
- Upload date:
- Size: 106.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 895b5997041a174db2c9a1f0d7a0bcc5846417d29c6c2135dbbb8a11ee0733e2 |
|
MD5 | 32390db240edfd77481aa5928b1e1357 |
|
BLAKE2b-256 | 49a591c30ff3312ede77df39d3c36b93472c96d1fe6d54e55cd99cfeaebf701d |
Provenance
The following attestation bundles were made for mem0ai-0.1.67-py3-none-any.whl
:
Publisher:
cd.yml
on mem0ai/mem0
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
mem0ai-0.1.67-py3-none-any.whl
- Subject digest:
895b5997041a174db2c9a1f0d7a0bcc5846417d29c6c2135dbbb8a11ee0733e2
- Sigstore transparency entry: 179831135
- Sigstore integration time:
- Permalink:
mem0ai/mem0@6e4fb22a7cb1a768d88aff51094baa1c778329a2
- Branch / Tag:
refs/tags/v0.1.67
- Owner: https://github.com/mem0ai
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
cd.yml@6e4fb22a7cb1a768d88aff51094baa1c778329a2
- Trigger Event:
release
- Statement type: