All integrations

Upstash AgentKit

Extension

Add long-term memory, Redis Search, and durable chat history with Upstash Redis.

Read the full extension docs

Install

Install the Upstash AgentKit extension for eve:

bash
pnpm add @upstash/agentkit-eve-extension

The extension requires eve 0.25.2 or later. Add an Upstash Redis database's REST credentials to the agent's environment; the default Redis client reads them automatically:

bash
UPSTASH_REDIS_REST_URL=https://...UPSTASH_REDIS_REST_TOKEN=...

Quick start

Mount the extension under agent/extensions/:

ts
import agentkit from "@upstash/agentkit-eve-extension";
export default agentkit();

The filename supplies the agentkit namespace. This minimal mount adds agentkit__recall_memory and agentkit__save_memory, plus instructions that teach the model when to use them. By default, memory is isolated by the authenticated principal when available and otherwise by the eve session ID.

Configure

Two further capabilities are opt-in, and they are independent of each other: chat history covers the agent's own past conversations, while search is retrieval over documents you seed into your own Redis Search index.

Enable durable transcript capture with chatHistory: true. A hook writes every user and assistant message to Redis as the session streams, and the model gains agentkit__search_chat_history to find earlier conversations by what was said and agentkit__read_chat_history to read one back — so a user can ask about something settled in a previous session. Both tools take userId from the session rather than from model input, so they only ever reach the current user's own transcripts.

To add RAG over your own data, install @upstash/redis and provide a Redis Search schema:

bash
pnpm add @upstash/redis
ts
import { s } from "@upstash/redis";import agentkit from "@upstash/agentkit-eve-extension";
export default agentkit({  chatHistory: true,  search: {    schema: s.object({      title: s.string(),      author: s.string().noTokenize(),      year: s.number(),    }),    indexName: "books",  },});

Search configuration adds the dynamic agentkit__search, agentkit__search_aggregate, and agentkit__search_count tools over that index, whose documents you write yourself; it is separate from chat history, which keeps its own keyspace and index. Both tool groups resolve at session start, so an unconfigured capability contributes no tools at all.

For multi-tenant agents, set userId to a stable tenant-scoped value or derive it from the request context, and never use a shared constant across tenants. You can also tune memory recall, search limits, chat-history keys and TTL, or supply an explicit Redis client. See the Upstash AgentKit eve extension guide for the complete configuration and override reference.