Skip to main content
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:
Combine memory with web search for up-to-date recommendations:

Examples

Complete Car Recommendation System

Responses

Resources


Agents SDK Tool with Mem0

Extend the OpenAI Agents SDK with Mem0 integration capabilities.

Control Memory Ingestion

Fine-tune what memories get stored during tool calls.
Using Mem0? Star us on GitHub to help more developers discover memory for AI apps.