Skip to main content
skill CX Codex

upstash-vector-js — Claude Code skill: @upstash/vector SDK

A skill that teaches your agent the @upstash/vector TypeScript SDK: upserting embeddings, similarity search, RAG and semantic caching.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add upstash/skills --skill upstash-vector-js -a claude-code
Open on GitHub

What upstash-vector-js does

This skill covers @upstash/vector, a serverless vector database for embeddings and semantic search. Your agent gets working code patterns: connecting an index with a url and token, upserting vectors, querying with topK, fetching and deleting records. The bundle includes an SDK method reference (delete, fetch, info, query, range, reset, resumable-query, upsert) plus separate files on namespaces, index structure and metadata filtering.

Indexes come in three flavours: dense, sparse and hybrid. Bring your own embeddings and upsert them directly, or push raw text and let the built-in embedding model compute the vector. Namespaces help when one index holds data for several projects or clients, and metadata filters cut results server-side. Long result sets go through resumable-query.

You need UPSTASH_VECTOR_REST_URL and UPSTASH_VECTOR_REST_TOKEN before anything runs — new Index() throws without them. The skill targets TypeScript and JavaScript, so Python projects get nothing from it.

What it helps with

  • upsert embeddings into an index and query them later
  • wire a RAG pipeline on top of a vector store
  • pick between dense, sparse and hybrid indexes
  • split tenants into namespaces instead of separate indexes
  • filter results by metadata server-side

Example prompts for the agent

  • Connect @upstash/vector and upsert this array of vectors with metadata
  • Run a similarity search and return the 5 closest matches
  • Organize the data into namespaces per client

How to install upstash-vector-js

1Skills CLI (Vercel)

npx skills add upstash/skills --skill upstash-vector-js -a claude-code

2Manually: put the files in place

~/.claude/skills/upstash-vector-js/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/upstash-vector-js/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about upstash-vector-js

How do I install upstash-vector-js in Claude?

Run npx skills add upstash/skills --skill upstash-vector-js -a claude-code. The skill lands at ~/.claude/skills/upstash-vector-js/SKILL.md.

What does upstash-vector-js do?

It gives your agent a reference for the @upstash/vector SDK: upserting and deleting vectors, similarity search, metadata filters, namespaces and resumable queries.

What do I need before using it?

An Upstash Vector index plus the UPSTASH_VECTOR_REST_URL and UPSTASH_VECTOR_REST_TOKEN environment variables that the Index constructor reads.

Source text

SKILL.md · MIT
---
name: upstash-vector-js
description: Work with the @upstash/vector TypeScript/JavaScript SDK, a serverless vector database for embeddings, similarity search, semantic search, and RAG (retrieval-augmented generation). Use when upserting, querying, fetching, ranging, or deleting vectors, upserting raw text against an index with a built-in embedding model, choosing dense, sparse, or hybrid indexes, filtering by metadata, organizing data with namespaces, running resumable queries, or connecting Upstash Vector to an AI or LLM application. Also use when the user asks for a vector store, vector search, nearest-neighbor or kNN search, embeddings storage, semantic cache, recommendations or similarity features, or a hosted vector index that needs no infrastructure.
license: MIT
metadata:
  author: Upstash
  homepage: https://upstash.com
---

# Vector Documentation Skill

## Quick Start

Vector is a high‑performance vector database for storing, querying, and managing vector embeddings.

Basic workflow:

- Install the Vector TS SDK.
- Connect to a Vector instance.
- Upsert vectors, query them, and manage namespaces.

Example (TypeScript):

```ts
import { Index } from "@upstash/vector";
const index = new Index({
  url: process.env.UPSTASH_VECTOR_REST_URL!,
  token: process.env.UPSTASH_VECTOR_REST_TOKEN!,
});

await index.upsert([{ id: "1", vector: [0.1, 0.2], metadata: { tag: "example" } }]);

const results = await index.query({
  vector: [0.1, 0.2],
  topK: 5,
});
```

For full usage, refer to the linked skill files below.

## Other Skill Files

### TS SDK Reference

- `sdk-methods`: Explains SDK commands: delete, fetch, info, query, range, reset, resumable-query, upsert

### Features

- `features/namespaces`: Explains namespaces and dataset organization.
- `features/index-structure`: Covers hybrid and sparse index structures.
- `features/filtering-and-metadata`: Details metadata storage and server-side filtering.

Use these files for deeper guidance on SDK usage, advanced configurations, algorithms, and integrations.

© Upstash · MIT · upstash/skills

Similar skills

All skills for Data and databases →

From the same set10

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor