AI agent primitives on Upstash Redis: memory, RAG, search, chat history, caching, and rate limiting. With Vercel AI SDK and Eve
TypeScript
6
121 commits
updated Oct 11, 2026
A toolkit for building production AI agents entirely on Upstash Redis. It
gives you the stateful primitives agents need — memory, conversation history, search, and caching —
plus thin adapters for the popular agent frameworks. The "semantic" features
are powered by Upstash Redis Search and its
$smart fuzzy operator, so no separate vector database is required.
| Package | Description |
|---|---|
@upstash/agentkit-sdk | Core, framework-agnostic primitives. |
@upstash/agentkit-ai-sdk | Adapter for the Vercel AI SDK. |
@upstash/agentkit-eve | Adapter for the Vercel Eve framework. |
@upstash/agentkit-tanstack-ai | Production backends for TanStack AI — chat persistence, resumable streams, distributed locks, memory, tool caching, rate limiting and search tools. |
@upstash/agentkit-eve-extension | The same capabilities as a mountable Eve extension — one file in agent/extensions/ adds memory tools, search tools, and durable chat history the agent can search. |
@upstash/mcp-toolkit | Durable building blocks for MCP servers on the official TypeScript SDK. /tasks: long-running tools that answer with a task id the model polls, with the record in Redis and the work on QStash or Workflow. /events: MCP Events, with subscriptions in Redis and signed webhook deliveries retried by QStash. |
ChatHistory): save the
whole message array per chat, list a user's chats for a sidebar, and fuzzily $smart-search what the
user or model said.recall/save tools for generateText.search/aggregate/count tools over Upstash Redis Search; the
index is created reactively on first use. Use these over your own documents for RAG-style retrieval.createRateLimit) you call before the model.redisDocuments() stores Eve's own fileMemory()
documents (so they work off Vercel), and redisMemory() is a full provider with ranked recall and
automatic capture.defineSandbox (UpstashSandbox, eve ≥ 0.65).@upstash/mcp-toolkit) — a long-running MCP tool returns a task
id instead of blocking, and the model polls task_status; the record lives in Redis and the work
runs through QStash or Workflow, so it survives the process that accepted the call. MCP Events let
a host subscribe and get a signed webhook when something happens, including when a task finishes.Runnable demos (real Upstash Redis + a mock/real model) live in examples/:
ai-sdk-demo, eve-demo,
eve-extension-demo (an eve agent that mounts
@upstash/agentkit-eve-extension), tanstack-ai-demo (a
TanStack AI chat whose persistence, resumable stream and memory work across server instances, with
a two-instance E2E suite), and mcp-toolkit-demo (an MCP server whose
long-running tool returns a task id the model polls, plus a separate events server that fires deploy.finished, with the client's
wire log on screen).
pnpm install
pnpm build # build all packages
pnpm test # run all tests (against a real Upstash Redis; LLM calls mocked unless OPENAI_API_KEY is set)
pnpm lint # eslint + prettier
pnpm typecheck # tsc across packages
Tests need UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN (in a repo-root .env); suites that
hit Redis skip themselves when absent. Some tests use UPSTASH_BOX_API_KEY and OPENAI_API_KEY.
Each package reports its name and version to Upstash as a header on the requests made by your redis
client (e.g. @upstash/redis@1.38.0,@upstash/agentkit-sdk@0.2.0,@upstash/agentkit-ai-sdk@0.2.0), so we
know which SDK versions are in use. No personal data, keys or identifiers are collected. Opt out with
enableTelemetry: false on any feature config, with the same option on the redis client, or by setting
the UPSTASH_DISABLE_TELEMETRY environment variable.
This repo uses Changesets.
pnpm changeset # describe a change
pnpm ci:version # bump versions + changelogs (also stamps each package's telemetry VERSION constant)
pnpm ci:publish # publish to npm
# (`version`/`release` script names are avoided — they collide with pnpm's built-in commands.)
MIT
AI agent primitives on Upstash Redis: memory, RAG, search, chat history, caching, and rate limiting. With Vercel AI SDK and Eve
TypeScript
6
121 commits
updated Oct 11, 2026
A toolkit for building production AI agents entirely on Upstash Redis. It
gives you the stateful primitives agents need — memory, conversation history, search, and caching —
plus thin adapters for the popular agent frameworks. The "semantic" features
are powered by Upstash Redis Search and its
$smart fuzzy operator, so no separate vector database is required.
| Package | Description |
|---|---|
@upstash/agentkit-sdk | Core, framework-agnostic primitives. |
@upstash/agentkit-ai-sdk | Adapter for the Vercel AI SDK. |
@upstash/agentkit-eve | Adapter for the Vercel Eve framework. |
@upstash/agentkit-tanstack-ai | Production backends for TanStack AI — chat persistence, resumable streams, distributed locks, memory, tool caching, rate limiting and search tools. |
@upstash/agentkit-eve-extension | The same capabilities as a mountable Eve extension — one file in agent/extensions/ adds memory tools, search tools, and durable chat history the agent can search. |
@upstash/mcp-toolkit | Durable building blocks for MCP servers on the official TypeScript SDK. /tasks: long-running tools that answer with a task id the model polls, with the record in Redis and the work on QStash or Workflow. /events: MCP Events, with subscriptions in Redis and signed webhook deliveries retried by QStash. |
ChatHistory): save the
whole message array per chat, list a user's chats for a sidebar, and fuzzily $smart-search what the
user or model said.recall/save tools for generateText.search/aggregate/count tools over Upstash Redis Search; the
index is created reactively on first use. Use these over your own documents for RAG-style retrieval.createRateLimit) you call before the model.redisDocuments() stores Eve's own fileMemory()
documents (so they work off Vercel), and redisMemory() is a full provider with ranked recall and
automatic capture.defineSandbox (UpstashSandbox, eve ≥ 0.65).@upstash/mcp-toolkit) — a long-running MCP tool returns a task
id instead of blocking, and the model polls task_status; the record lives in Redis and the work
runs through QStash or Workflow, so it survives the process that accepted the call. MCP Events let
a host subscribe and get a signed webhook when something happens, including when a task finishes.Runnable demos (real Upstash Redis + a mock/real model) live in examples/:
ai-sdk-demo, eve-demo,
eve-extension-demo (an eve agent that mounts
@upstash/agentkit-eve-extension), tanstack-ai-demo (a
TanStack AI chat whose persistence, resumable stream and memory work across server instances, with
a two-instance E2E suite), and mcp-toolkit-demo (an MCP server whose
long-running tool returns a task id the model polls, plus a separate events server that fires deploy.finished, with the client's
wire log on screen).
pnpm install
pnpm build # build all packages
pnpm test # run all tests (against a real Upstash Redis; LLM calls mocked unless OPENAI_API_KEY is set)
pnpm lint # eslint + prettier
pnpm typecheck # tsc across packages
Tests need UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN (in a repo-root .env); suites that
hit Redis skip themselves when absent. Some tests use UPSTASH_BOX_API_KEY and OPENAI_API_KEY.
Each package reports its name and version to Upstash as a header on the requests made by your redis
client (e.g. @upstash/redis@1.38.0,@upstash/agentkit-sdk@0.2.0,@upstash/agentkit-ai-sdk@0.2.0), so we
know which SDK versions are in use. No personal data, keys or identifiers are collected. Opt out with
enableTelemetry: false on any feature config, with the same option on the redis client, or by setting
the UPSTASH_DISABLE_TELEMETRY environment variable.
This repo uses Changesets.
pnpm changeset # describe a change
pnpm ci:version # bump versions + changelogs (also stamps each package's telemetry VERSION constant)
pnpm ci:publish # publish to npm
# (`version`/`release` script names are avoided — they collide with pnpm's built-in commands.)
MIT