LlamaIndex
📢 Announcing our research paper: Zentry 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.
LlamaIndex supports Zentry as a memory store. In this guide, we’ll show you how to use it.
🎉 Exciting news! ZentryMemory now supports ReAct and FunctionCalling agents.
Installation
To install the required package, run:
Setup with Zentry Platform
Set your Zentry Platform API key as an environment variable. You can replace <your-Zentry-api-key>
with your actual API key:
You can obtain your Zentry Platform API key from the Zentry Platform.
Import the necessary modules and create a ZentryMemory instance:
Context is used to identify the user, agent or the conversation in the Zentry. It is required to be passed in the at least one of the fields in the ZentryMemory
constructor. It can be any of the following:
search_msg_limit
is optional, default is 5. It is the number of messages from the chat history to be used for memory retrieval from Zentry. More number of messages will result in more context being used for retrieval but will also increase the retrieval time and might result in some unwanted results.
search_msg_limit
is different from limit
. limit
is the number of messages to be retrieved from Zentry and is used in search.
Setup with Zentry OSS
Set your Zentry OSS by providing configuration details:
To know more about Zentry OSS, read Zentry OSS Quickstart.
Create a ZentryMemory instance:
Intilaize the LLM
SimpleChatEngine
Use the SimpleChatEngine
to start a chat with the agent with the memory.
Now we will learn how to use Zentry with FunctionCalling and ReAct agents.
Initialize the tools:
FunctionCallingAgent
ReActAgent
Key Features
- Memory Integration: Uses Zentry to store and retrieve relevant information from past interactions.
- Personalization: Provides context-aware agent responses based on user history and preferences.
- Flexible Architecture: LlamaIndex allows for easy integration of the memory with the agent.
- Continuous Learning: Each interaction is stored, improving future responses.
Conclusion
By integrating LlamaIndex with Zentry, you can build a personalized agent that can maintain context across interactions with the agent and provide tailored recommendations and assistance.
Help
- For more details on LlamaIndex, visit the LlamaIndex documentation.
- For Zentry documentation, refer to the Zentry Platform.
- If you need further assistance, please feel free to reach out to us through following methods: