π‘ Examples
OpenAI Inbuilt Tools
π’ Announcing our research paper: Mem0 achieves 26% higher accuracy than OpenAI Memory, 91% lower latency, and 90% token savings! Read the paper to learn how we're revolutionizing AI agent memory.
Integrate Mem0βs memory capabilities with OpenAIβs Inbuilt Tools to create AI agents with persistent memory.
Getting Started
Installation
Environment Setup
Save your Mem0 and OpenAI API keys in a .env
file:
Get your Mem0 API key from the Mem0 Dashboard.
Configuration
Adding Memories
Store user preferences, past interactions, or any relevant information:
Retrieving Memories
Search for relevant memories based on the current user input:
Structured Responses with Zod
Define structured response schemas to get consistent output formats:
Using Web Search
Combine memory with web search for up-to-date recommendations: