Guide
Get started with Mem0 quickly!
Welcome to the Mem0 quickstart guide. This guide will help you get up and running with Mem0 in no time.
Installation
To install Mem0, you can use pip. Run the following command in your terminal:
Basic Usage
Initialize Mem0
Store a Memory
Retrieve Memories
Search Memories
Update a Memory
Memory History
Delete Memory
Reset Memory
Run Mem0 Locally
Please refer to the example Mem0 with Ollama to run Mem0 locally.
Chat Completion
Mem0 can be easily integrated into chat applications to enhance conversational agents with structured memory. Mem0’s APIs are designed to be compatible with OpenAI’s, with the goal of making it easy to leverage Mem0 in applications you may have already built.
If you have a Mem0 API key
, you can use it to initialize the client. Alternatively, you can initialize Mem0 without an API key if you’re using it locally.
Mem0 supports several language models (LLMs) through integration with various providers.
Use Mem0 Platform
In this example, you can see how the second response is tailored based on the information provided in the first interaction. Mem0 remembers the user’s preference for Indian food and their cheese allergy, using this information to provide more relevant and personalized restaurant suggestions in San Francisco.
Use Mem0 OSS
APIs
Get started with using Mem0 APIs in your applications. For more details, refer to the Platform.
Here is an example of how to use Mem0 APIs:
Contributing
We welcome contributions to Mem0! Here’s how you can contribute:
-
Fork the repository and create your branch from
main
. -
Clone the forked repository to your local machine.
-
Install the project dependencies:
-
Install pre-commit hooks:
-
Make your changes and ensure they adhere to the project’s coding standards.
-
Run the tests locally:
-
If all tests pass, commit your changes and push to your fork.
-
Open a pull request with a clear title and description.
Please make sure your code follows our coding conventions and is well-documented. We appreciate your contributions to make Mem0 better!
If you have any questions, please feel free to reach out to us using one of the following methods: