📢 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.
Overview
This guide will show you how to integrate Zentry with Mastra to add long-term memory capabilities to your agents. We’ll create tools that allow agents to save and retrieve memories using Zentry’s API.Installation
- Install the Integration Package
- Add the Integration to Your Project
integrations/index.ts
- Use the Integration in Tools or Workflows
tools/index.ts
- Create a new agent
agents/index.ts
- Run the agent
index.ts
- We import the
@mastra/Zentryintegration. - We define two tools that uses the Zentry API client to create new memories and recall previously saved memories.
- The tool accepts
questionas an input and returns the memory as a string.