upstash-redis-js
Build serverless Redis applications with the Upstash Redis TypeScript/JavaScript SDK. Handles caching, session storage, rate limiting, leaderboards, and full-text search with automatic serialization of native JavaScript types. Includes support for all Redis data structures and Lua scripting.
Upstash Redis JS enables serverless Redis operations for caching, sessions, and real-time data structures via REST.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-14
Upstash Redis JS enables serverless Redis operations for caching, sessions, and real-time data structures via REST. Build serverless Redis applications with the Upstash Redis TypeScript/JavaScript SDK. Handles caching, session storage, rate limiting, leaderboards, and full-text search with automatic serialization of native JavaScript types. Includes support for all Redis data structures and Lua scripting.
Use it when
- upstash-redis-js supports both rate limiting and leaderboard features through Redis data structures.
- upstash-redis-js works with all Redis data structures including strings, lists, sets, sorted sets, hashes, and streams.
Verify before relying
Read SKILL.md below before installing (30 files). Open directory: indexed for reading, not audited.
Install
upstash/skills/upstash-redis-js · repository language: JavaScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I cache data with upstash-redis-js?
upstash-redis-js provides serverless Redis caching through the Upstash Redis TypeScript/JavaScript SDK. Set cached values using standard Redis commands with automatic serialization of JavaScript types. Configure TTL expiration to manage cache lifecycle, and leverage the REST API for stateless operations in serverless environments. The SDK handles connection pooling and request batching automatically.
Can upstash-redis-js implement rate limiting and leaderboards?
upstash-redis-js supports both rate limiting and leaderboard features through Redis data structures. Use sorted sets for leaderboards to track scores and rankings efficiently. Implement rate limiting by tracking request counts with TTL expiration, or use Lua scripting for atomic operations. The SDK's pipeline batching enables efficient multi-command execution for high-throughput scenarios.
What Redis data structures does upstash-redis-js support?
upstash-redis-js works with all Redis data structures including strings, lists, sets, sorted sets, hashes, and streams. The SDK provides full-text search and aggregation query capabilities, plus support for Redis JSON queries. Automatic serialization handles native JavaScript types transparently, and Lua scripting enables custom atomic operations across multiple keys.
How do I set up serverless Redis caching with upstash-redis-js?
upstash-redis-js simplifies serverless Redis setup through the Upstash REST API with zero connection management. Install the SDK, configure your Upstash endpoint and token, and start using Redis commands immediately. Auto-serialization converts JavaScript objects to Redis-compatible formats automatically. The stateless design works seamlessly with AWS Lambda, Vercel, and other serverless platforms.
Does upstash-redis-js support session storage and distributed locks?
upstash-redis-js enables session storage by persisting session data with configurable TTL expiration. Implement distributed locks using Lua scripting for atomic compare-and-set operations across serverless instances. The SDK's pipeline batching reduces latency for multi-step operations, making it suitable for session management in distributed applications.
What's included in upstash-redis-js for TypeScript development?
upstash-redis-js is built for TypeScript with full type safety and includes the complete Upstash Redis SDK. Features auto-serialization for JavaScript types, support for Redis Lua scripting, sorted sets for leaderboards, and stream operations. The MIT license permits commercial use, and the SDK integrates seamlessly with Node.js and edge runtime environments.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Upstash Redis SDK - Complete Skills Guide
This directory contains comprehensive guides for using the @upstash/redis SDK. These skill files are designed to help developers and AI assistants understand and use the SDK effectively.
Installation
npm install @upstash/redis
Quick Start
Basic Initialization
import { Redis } from "@upstash/redis";
// Initialize with explicit credentials
const redis = new Redis({
url: "UPSTASH_REDIS_REST_URL",
token: "UPSTASH_REDIS_REST_TOKEN",
});
// Or initialize from environment variables
const redis = Redis.fromEnv();
Environment Variables
Set these in your .env
(truncated - see the full file via the links below)
File tree — 15 files
skills/upstash-redis-js/SKILL.md
skills/upstash-redis-js/advanced-features/auto-pipeline.md
skills/upstash-redis-js/advanced-features/pipeline-and-transactions.md
skills/upstash-redis-js/advanced-features/scripting.md
skills/upstash-redis-js/data-structures/hashes.md
skills/upstash-redis-js/data-structures/json.md
skills/upstash-redis-js/data-structures/lists.md
skills/upstash-redis-js/data-structures/sets.md
skills/upstash-redis-js/data-structures/sorted-sets.md
skills/upstash-redis-js/data-structures/streams.md
skills/upstash-redis-js/data-structures/strings.md
skills/upstash-redis-js/migrations/from-ioredis.md
skills/upstash-redis-js/migrations/from-redis-node.md
skills/upstash-redis-js/patterns/caching.md
skills/upstash-redis-js/patterns/distributed-locks.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Implement caching and session storage with serverless Redis”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
redis-js is an HTTP-based Redis client for JavaScript and TypeScript that works with Upstash's serverless infrastructure. It handles caching, session storage, rate limiting, and full-text search while automatically serializing and deserializing JavaScript types—no manual JSON conversion needed. The SDK supports all Redis data structures and includes patterns for leaderboards, distributed locks, and performance optimization.
Get a working Redis database for your agent instantly via a single HTTP request to Upstash's start-redis endpoint. No signup, credentials, or configuration needed—just POST with an idempotency key and receive an endpoint and token ready to use. Ideal for agent short-term memory, conversation logs, work queues, and ranked recall; databases expire after 3 days unless claimed.
Access unified documentation and guidance for all Upstash SDKs including Redis, QStash, Vector, Search, Workflow, and Box. Choose the relevant sub-skill for your language and use case, whether you're caching, scheduling messages, building vector applications, or orchestrating serverless workflows.
This skill guides you through implementing rate limiting with Upstash's Redis-backed TypeScript/JavaScript SDK. Learn to install the SDK, connect to Redis, create a rate limiter, and apply it to incoming requests using sliding window or other algorithms.
The QStash JavaScript SDK enables HTTP-based messaging and scheduling across serverless platforms. Publish messages to endpoints, create delayed or scheduled delivery, manage FIFO queues with flow control, and verify webhook signatures. Works with Next.js, Cloudflare Workers, Deno, Node.js, and other runtimes.
Upstash Redis Kv connects to Upstash's Redis-compatible key-value store through a REST interface, enabling you to persist and query data using standard Redis commands. The skill supports all major Redis data structures—strings, hashes, lists, sets, and sorted sets—along with operations like caching, counters, and leaderboards.
More skills Upstash Vector Db Skills (unlicensed) · upstash-cli (MIT) · python-backend (MIT) · upstash-box-py (MIT) · upstash-box-js (MIT)