LlamaIndex ReAct Agent
📢 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.
Create a ReAct Agent with LlamaIndex which uses Mem0 as the memory store.
Overview
A ReAct agent combines reasoning and action capabilities, making it versatile for tasks requiring both thought processes (reasoning) and interaction with tools or APIs (acting). Mem0 as memory enhances these capabilities by allowing the agent to store and retrieve contextual information from past interactions.
Setup
Initialize the LLM.
Initialize the Mem0 client. You can find your API key here. Read about Mem0 Open Source.
Create the tools. These tools will be used by the agent to perform actions.
Initialize the agent with tools and memory.
Start the chat.
Input
Output
Input
Output
Input
Output
Using the agent WITHOUT memory
Input
Output
Using the agent WITH memory
Input
Output