{"id":"upstash","kind":"sdk","name":"Upstash","slug":"upstash","description":"Serverless Redis, Kafka, and QStash SDKs for edge and serverless.","vendor":"Upstash","languages":["typescript","javascript","nodejs","python"],"categories":["database","infrastructure"],"homepage":"https://upstash.com","docsUrl":"https://upstash.com/docs","githubUrl":"https://github.com/upstash","packages":[{"registry":"npm","name":"@upstash/redis","url":"https://www.npmjs.com/package/@upstash/redis"}],"tags":["redis","serverless","edge"],"skills":[{"name":"upstash","url":"https://skills.sh/upstash/skills/upstash","install":"npx skills add upstash/skills","sdk":"upstash","key":"upstash/upstash","description":"Work with any Upstash TypeScript/JavaScript SDK including Redis, Box, QStash, Workflow, Vector, Search and Ratelimit. Use when the user is working with any Upstash product or SDK.","hasContent":true,"content":"---\nname: upstash\ndescription: Work with any Upstash TypeScript/JavaScript SDK including Redis, Box, QStash, Workflow, Vector, Search and Ratelimit. Use when the user is working with any Upstash product or SDK.\n---\n\n# Upstash Skills\n\nThis skill combines documentation for all Upstash SDKs. Pick the relevant sub-skill below.\n\n## [upstash-box-js](upstash-box-js/overview.md)\n\nWork with the @upstash/box TypeScript/JavaScript SDK for sandboxed cloud containers with AI agents, shell, filesystem, and git. Use when building with Upstash Box, creating sandboxed environments, running AI agents in containers, or orchestrating parallel boxes.\n\n## [upstash-box-py](upstash-box-py/overview.md)\n\nWork with the upstash-box Python SDK for sandboxed cloud containers with AI agents, shell, filesystem, and git. Use when building with Upstash Box in Python, creating sandboxed environments, running AI agents in containers, or orchestrating parallel boxes.\n\n## [upstash-cli](upstash-cli/overview.md)\n\nRun the Upstash CLI (`upstash`) against the Upstash Developer API for Redis, Vector, Search, QStash, and teams. Use when listing or managing databases, backups, vector/search indexes, QStash instances, team members, stats, or any non-interactive Upstash automation with JSON output and terminal commands.\n\n## [upstash-qstash-js](upstash-qstash-js/overview.md)\n\nWork with the QStash TypeScript/JavaScript SDK for serverless messaging, scheduling. Use when publishing messages to HTTP endpoints, creating schedules, managing queues, verifying incoming messages and other QStash features in serverless environments.\n\n## [upstash-ratelimit-js](upstash-ratelimit-js/overview.md)\n\nLightweight guidance for using the Upstash Redis RateLimit TypeScript/JavaScript SDK, including setup steps, basic usage, and pointers to advanced algorithm, features, pricing, and traffic‑protection docs.\n\n## [upstash-redis-js](upstash-redis-js/overview.md)\n\nWork with the Upstash Redis TypeScript/JavaScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating) with Upstash Redis Search (different from regular FT.SEARCH), and all Redis data structures. Supports automatic serialization/deserialization of JavaScript types. Upstash Redis Search also available via @upstash/search-redis and @upstash/search-ioredis adapters for TCP clients.\n\n## [upstash-redis-start](upstash-redis-start/overview.md)\n\nProvision a zero-config, no-signup Upstash Redis database for an AI agent via a single POST to `https://upstash.com/start-redis`. Use when an agent needs scratch Redis for short-term memory, conversation history, sub-agent work queues, or ranked recall and the user has not provided credentials. The database lives 3 days unless the user claims it.\n\n## [upstash-search-js](upstash-search-js/overview.md)\n\nSkills covering Upstash Search quick starts, core concepts, and TypeScript/JavaScript SDK usage. Use when a user asks how to get started, how indexing works, or how to use the TS client.\n\n## [upstash-vector-js](upstash-vector-js/overview.md)\n\nSkills for Upstash Vector features, TypeScript/JavaScript SDK usage, and integrations. Use when users ask how to work with Vector, its TS SDK, features, or supported frameworks.\n\n## [upstash-workflow-js](upstash-workflow-js/overview.md)\n\nSkills for the Upstash Workflow TypeScript/JavaScript SDK to define, trigger, and manage workflows. Use this Skill whenever a user wants to create workflow endpoints, run steps, or interact with the Upstash Workflow client.\n","contentSource":"https://raw.githubusercontent.com/upstash/skills/main/skills/upstash/SKILL.md","contentFetchedAt":"2026-07-27T09:00:58.133Z"},{"name":"upstash-redis-js","url":"https://skills.sh/upstash/skills/upstash-redis-js","install":"npx skills add upstash/skills --skill upstash-redis-js","sdk":"upstash","key":"upstash/upstash-redis-js","description":"Work with the Upstash Redis TypeScript/JavaScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating) with Upstash Redis Search (different from regular FT.SEARCH), and all Redis data structures. Supports automatic serialization/deserialization of JavaScript types. Upstash Redis Search also available via @upstash/search-redis and @upstash/search-ioredis adapters for TCP clients.","hasContent":true,"content":"---\nname: upstash-redis-js\ndescription: Work with the Upstash Redis TypeScript/JavaScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating) with Upstash Redis Search (different from regular FT.SEARCH), and all Redis data structures. Supports automatic serialization/deserialization of JavaScript types. Upstash Redis Search also available via @upstash/search-redis and @upstash/search-ioredis adapters for TCP clients.\n---\n\n# Upstash Redis SDK - Complete Skills Guide\n\nThis 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.\n\n## Installation\n\n```bash\nnpm install @upstash/redis\n```\n\n## Quick Start\n\n### Basic Initialization\n\n```typescript\nimport { Redis } from \"@upstash/redis\";\n\n// Initialize with explicit credentials\nconst redis = new Redis({\n  url: \"UPSTASH_REDIS_REST_URL\",\n  token: \"UPSTASH_REDIS_REST_TOKEN\",\n});\n\n// Or initialize from environment variables\nconst redis = Redis.fromEnv();\n```\n\n### Environment Variables\n\nSet these in your `.env` file:\n\n```bash\nUPSTASH_REDIS_REST_URL=https://your-redis.upstash.io\nUPSTASH_REDIS_REST_TOKEN=your-token-here\n```\n\n> **No credentials yet?** If you're an agent that needs scratch Redis and the user hasn't provided a database, you can mint a temporary one with a single POST to `https://upstash.com/start-redis` (3-day TTL, no signup).\n\n## Skill Files Overview\n\n### Data Structures (data-structures/)\n\nRedis data types with auto-serialization examples:\n\n- **strings.md** - GET, SET, INCR, DECR, APPEND with automatic type handling\n- **hashes.md** - HSET, HGET, HMGET with object serialization\n- **lists.md** - LPUSH, RPUSH, LRANGE with array handling\n- **sets.md** - SADD, SMEMBERS, set operations\n- **sorted-sets.md** - ZADD, ZRANGE, ZRANK, leaderboard patterns\n- **json.md** - JSON.SET, JSON.GET, JSONPath queries for nested objects\n- **streams.md** - XADD, XREAD, XGROUP, consumer groups\n\n### Advanced Features (advanced-features/)\n\nComplex operations and optimizations:\n\n- **auto-pipeline.md** - Automatic request batching, performance optimization\n- **pipeline-and-transactions.md** - Manual pipelines, MULTI/EXEC for atomic operations\n- **scripting.md** - Lua scripts, EVAL, EVALSHA for server-side logic\n\n### Patterns (patterns/)\n\nCommon use cases and architectural patterns:\n\n- **caching.md** - Cache-aside, write-through, TTL strategies\n- **rate-limiting.md** - Integration with @upstash/ratelimit package\n- **session-management.md** - Session storage and user state management\n- **distributed-locks.md** - Lock implementations, deadlock prevention\n- **leaderboard.md** - Sorted set leaderboards, real-time rankings\n\n### Performance (performance/)\n\nOptimization techniques and best practices:\n\n- **batching-operations.md** - MGET, MSET, batch operations\n- **pipeline-optimization.md** - When to use pipelines, performance tips\n- **ttl-expiration.md** - Key expiration strategies, memory management\n- **data-serialization.md** - Deep dive into auto serialization, custom serializers, edge cases\n- **error-handling.md** - Error types, retry strategies, timeout handling, debugging tips\n- **redis-replicas.md** - Global database setup, read replicas, read-your-writes consistency\n\n### Search (search/)\n\nFull-text search, filtering, and aggregation extension for Redis:\n\n- **overview.md** - Schema definition, field types, pitfalls, package overview\n- **commands/querying.md** - Query and count with filters, pagination, sorting, highlighting\n- **commands/aggregating.md** - Metric aggregations ($avg, $sum, $stats), bucket aggregations ($terms, $range, $histogram, $facet)\n- **commands/index-management.md** - Create, describe, drop indexes, waitIndexing\n- **commands/aliases.md** - Index aliases for zero-downtime reindexing\n- **adapters.md** - Using search with node-redis and ioredis via @upstash/search-redis and @upstash/search-ioredis\n\n### Migrations (migrations/)\n\nMigration guides from other libraries:\n\n- **from-ioredis.md** - Migration from ioredis, key differences, serialization changes\n- **from-redis-node.md** - Migration from node-redis, API differences\n\n## Common Mistakes (Especially for LLMs)\n\n### ❌ Mistake 1: Treating Everything as Strings\n\n```typescript\n// ❌ WRONG - Don't do this with @upstash/redis\nawait redis.set(\"count\", \"42\"); // Stored as string \"42\"\nconst count = await redis.get(\"count\");\nconst incremented = parseInt(count) + 1; // Manual parsing needed\n\n// ✅ CORRECT - Let the SDK handle it\nawait redis.set(\"count\", 42); // Stored as number\nconst count = await redis.get(\"count\");\nconst incremented = count + 1; // Just use it\n```\n\n### ❌ Mistake 2: Manual JSON Serialization\n\n```typescript\n// ❌ WRONG - Unnecessary with @upstash/redis\nawait redis.set(\"user\", JSON.stringify({ name: \"Alice\" }));\nconst user = JSON.parse(await redis.get(\"user\"));\n\n// ✅ CORRECT - Automatic handling\nawait redis.set(\"user\", { name: \"Alice\" });\nconst user = await redis.get(\"user\");\n```\n\n## Quick Command Reference\n\n```typescript\n// Strings\nawait redis.set(\"key\", \"value\");\nawait redis.get(\"key\");\nawait redis.incr(\"counter\");\nawait redis.decr(\"counter\");\n\n// Hashes\nawait redis.hset(\"user:1\", { name: \"Alice\", age: 30 });\nawait redis.hget(\"user:1\", \"name\");\nawait redis.hgetall(\"user:1\");\n\n// Lists\nawait redis.lpush(\"tasks\", \"task1\", \"task2\");\nawait redis.rpush(\"tasks\", \"task3\");\nawait redis.lrange(\"tasks\", 0, -1);\n\n// Sets\nawait redis.sadd(\"tags\", \"javascript\", \"redis\");\nawait redis.smembers(\"tags\");\n\n// Sorted Sets\nawait redis.zadd(\"leaderboard\", { score: 100, member: \"player1\" });\nawait redis.zrange(\"leaderboard\", 0, -1);\n\n// JSON\nawait redis.json.set(\"user:1\", \"$\", { name: \"Alice\", address: { city: \"NYC\" } });\nawait redis.json.get(\"user:1\");\n\n// Expiration\nawait redis.setex(\"session\", 3600, { userId: \"123\" });\nawait redis.expire(\"key\", 60);\nawait redis.ttl(\"key\");\n```\n\n## Best Practices\n\n1. **Use environment variables** for credentials, never hardcode\n2. **Leverage auto-serialization** - pass native JavaScript types\n3. **Use TypeScript types** for better type safety\n4. **Set appropriate TTLs** to manage memory\n5. **Use pipelines** for multiple operations\n6. **Namespace your keys** (e.g., `user:123`, `session:abc`)\n\n## Resources\n\n- [Official Documentation](https://upstash.com/docs/redis)\n- [GitHub Repository](https://github.com/upstash/redis-js)\n- [API Reference](https://upstash.com/docs/redis/sdks/ts/overview)\n- [Examples](https://github.com/upstash/redis-js/tree/main/examples)\n\n## Getting Help\n\nFor detailed information on specific topics, refer to the individual skill files in the `skills/` directory. Each file contains comprehensive examples, use cases, and best practices for its topic.\n","contentSource":"https://raw.githubusercontent.com/upstash/skills/main/skills/upstash-redis-js/SKILL.md","contentFetchedAt":"2026-07-27T09:00:58.187Z"},{"name":"upstash-ratelimit-js","url":"https://skills.sh/upstash/skills/upstash-ratelimit-js","install":"npx skills add upstash/skills --skill upstash-ratelimit-js","sdk":"upstash","key":"upstash/upstash-ratelimit-js","description":"Lightweight guidance for using the Upstash Redis RateLimit TypeScript/JavaScript SDK, including setup steps, basic usage, and pointers to advanced algorithm, features, pricing, and traffic‑protection docs.","hasContent":true,"content":"---\nname: upstash-ratelimit-js\ndescription: Lightweight guidance for using the Upstash Redis RateLimit TypeScript/JavaScript SDK, including setup steps, basic usage, and pointers to advanced algorithm, features, pricing, and traffic‑protection docs.\n---\n\n# Rate Limit TS SDK\n\n## Quick Start\n- Install the SDK and connect to Redis.\n- Create a rate limiter and apply it to incoming operations.\n\nExample:\n```ts\nimport { Ratelimit } from \"@upstash/ratelimit\";\nimport { Redis } from \"@upstash/redis\";\n\nconst redis = new Redis({ url: \"<url>\", token: \"<token>\" });\nconst limiter = new Ratelimit({ redis, limiter: Ratelimit.slidingWindow(5, \"10s\") });\n\nconst { success } = await limiter.limit(\"user-id\");\nif (!success) {\n  // throttled\n}\n```\n\n## Other Skill Files\n- **algorithms.md**: Describes all available rate‑limiting algorithms and how they behave.\n- **pricing-cost.md**: Explains pricing, Redis cost implications, and operational considerations.\n- **features.md**: Lists SDK features such as prefixes, custom keys, and behavioral options.\n- **methods-getting-started.md**: Full method reference for the SDK's API and getting started guide.\n- **traffic-protection.md**: Guidance on applying rate limiting for traffic shaping, abuse prevention, and protection patterns.\n","contentSource":"https://raw.githubusercontent.com/upstash/skills/main/skills/upstash-ratelimit-js/SKILL.md","contentFetchedAt":"2026-07-27T09:00:58.235Z"},{"name":"upstash-qstash-js","url":"https://skills.sh/upstash/skills/upstash-qstash-js","install":"npx skills add upstash/skills --skill upstash-qstash-js","sdk":"upstash","key":"upstash/upstash-qstash-js","description":"Work with the QStash TypeScript/JavaScript SDK for serverless messaging, scheduling. Use when publishing messages to HTTP endpoints, creating schedules, managing queues, verifying incoming messages and other QStash features in serverless environments.","hasContent":true,"content":"---\nname: upstash-qstash-js\ndescription: Work with the QStash TypeScript/JavaScript SDK for serverless messaging, scheduling. Use when publishing messages to HTTP endpoints, creating schedules, managing queues, verifying incoming messages and other QStash features in serverless environments.\n---\n\n# QStash JavaScript SDK\n\nQStash is an HTTP-based messaging and scheduling solution for serverless and edge runtimes. This skill helps you use the QStash JS SDK effectively.\n\n## When to use this skill\n\nUse this skill when:\n\n- Publishing HTTP messages to endpoints or URL groups\n- Creating scheduled or delayed message delivery\n- Managing FIFO queues with configurable parallelism\n- Verifying incoming webhook signatures from QStash\n- Implementing callbacks, DLQ handling, or message deduplication\n\n## Quick Start\n\n### Installing the SDK\n\n```bash\nnpm install @upstash/qstash\n```\n\n### Basic Publishing\n\n```typescript\nimport { Client } from \"@upstash/qstash\";\n\nconst client = new Client({\n  token: process.env.QSTASH_TOKEN!,\n});\n\nconst result = await client.publishJSON({\n  url: \"https://my-api.example.com/webhook\",\n  body: { event: \"user.created\", userId: \"123\" },\n});\n```\n\n## Core Concepts\n\nFor fundamental QStash operations, see:\n\n- [Publishing Messages](fundamentals/publishing-messages.md)\n- [Schedules](fundamentals/schedules.md)\n- [Queues and Flow Control](fundamentals/queues-and-flow-control.md)\n- [URL Groups](fundamentals/url-groups.md)\n- [Local Development](fundamentals/local-development.md) — automatic dev server via `devMode: true`\n\nFor verifying incoming messages:\n\n- [Receiver Verification](verification/receiver.md) - Core signature verification with the Receiver class\n- Platform-Specific Verifiers:\n  - [Next.js](verification/platform-specific/nextjs.md) - App Router, Pages Router, and Edge Runtime\n\nFor advanced features:\n\n- [Callbacks](advanced/callbacks.md)\n- [Dead Letter Queue (DLQ)](advanced/dlq.md)\n- [Message Deduplication](advanced/deduplication.md)\n- [Region migration & multi-region support](advanced/multi-region/summary.md)\n  - If needed, [multi-region env variable setup verification script](advanced/multi-region/verify-multi-region-setup.ts). Can be run without arguments\n\n## Platform Support\n\nQStash JS SDK works across various platforms:\n\n- Next.js (App Router and Pages Router)\n- Cloudflare Workers\n- Deno\n- Node.js (v18+)\n- Vercel Edge Runtime\n- SvelteKit, Nuxt, SolidJS, and other frameworks\n\n> **Note on Workflow SDK:** For building complex durable workflows that chain multiple QStash messages together, consider using the separate QStash Workflow SDK (`@upstash/workflow`). The Workflow SDK empowers you to orchestrate multi-step processes with automatic state management, retries, and fault tolerance. This Skills file focuses on the core QStash messaging SDK.\n\n## Best Practices\n\n- Always verify incoming QStash messages using the Receiver class\n- Use environment variables for tokens and signing keys\n- Set appropriate retry counts and timeouts for your use case\n- Use queues for ordered processing with controlled parallelism\n- Implement DLQ handling for failed message recovery\n","contentSource":"https://raw.githubusercontent.com/upstash/skills/main/skills/upstash-qstash-js/SKILL.md","contentFetchedAt":"2026-07-27T09:00:58.298Z"}],"official":true,"generatedAt":"2026-07-27T09:02:29.956Z"}