pinecone-ts-client

The official TypeScript/Node.js client for building and querying vector search applications on Pinecone.

SDK
npm
v8.2.0
279stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
80/100Excellent
Development Activity84
Maintenance84
Community72
Maturity52
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
88/100Excellent
Architecture85
Code Quality90
Innovation85
Learning Curve90

The Pinecone TypeScript SDK is the official client for Pinecone, a managed vector database used to store, search, and manage high-dimensional embeddings for semantic search, recommendation systems, and retrieval-augmented generation. It gives TypeScript and Node.js developers a fully-typed surface for creating and configuring serverless or pod-based indexes, then upserting, querying, fetching, updating, and deleting vectors against them.

Beyond core vector operations, the client bundles Pinecone’s integrated inference API (embedding generation and reranking without a separate SDK) and the Pinecone Assistant API for building RAG-powered chat assistants that can ingest files and hold conversations. The package is built and tested for both standard Node.js and edge runtimes, with a typed error hierarchy that maps HTTP failures to specific exception classes.

What You Get

  • Full CRUD operations for indexes and vectors through strongly-typed methods with a generic metadata type parameter
  • Support for both serverless (auto-scaling) and pod-based (dedicated) index architectures
  • Integrated inference client for embedding generation and reranking without a separate embeddings SDK
  • Pinecone Assistant API for creating RAG-powered chat assistants that ingest files and hold conversations
  • Bulk import operations for loading large vector datasets from object storage
  • A typed error hierarchy (PineconeBadRequestError, PineconeAuthorizationError, PineconeNotFoundError, etc.) for precise failure handling

Common Use Cases

  • Building semantic search over product catalogs, documentation, or support tickets
  • Powering retrieval-augmented generation (RAG) pipelines for LLM applications
  • Recommendation systems based on embedding similarity
  • Multi-tenant vector storage using namespaces to isolate customer data within a shared index
  • Bulk-loading historical embeddings from object storage into a fresh index

Under The Hood

Architecture The Pinecone class in src/pinecone.ts is the facade that composes four functional areas: control (index/collection/backup lifecycle management in src/control), data (vector CRUD and bulk import in src/data, exposed via the Index class), inference (embedding/reranking in src/inference), and assistant (RAG chat and file management in src/assistant). Each hand-written wrapper (e.g. createIndex.ts, upsert.ts) is a thin typed layer over auto-generated low-level REST clients under src/pinecone-generated-ts-fetch and -alpha, regenerated from Pinecone’s OpenAPI specs via codegen/build-oas.sh. IndexHostSingleton and AssistantHostSingleton cache resolved per-index/per-assistant hostnames so repeated calls don’t re-resolve on every request. Error handling is centralized in src/errors, with handling.ts mapping HTTP status codes to a typed exception hierarchy. This layered generated-plus-handwritten design means a change to the underlying OpenAPI spec ripples through the generated clients first, then the hand-written wrappers that depend on them.

Tech Stack Written in TypeScript (~99% of the codebase) targeting TypeScript >=5.2 and Node.js >=20, built with plain tsc (no bundler). Testing runs on Jest 30 with ts-jest, plus @edge-runtime/jest-environment for edge-runtime-specific test suites, jest-progress-bar-reporter, and separate Jest configs for unit, integration (node/edge), and smoke (mocked) test runs. Linting uses ESLint 10 with typescript-eslint and eslint-plugin-import-x; formatting is enforced with Prettier 3.9. Docs are generated with TypeDoc and published via a dedicated GitHub Actions workflow. No runtime dependencies are declared — the client relies on the platform’s native fetch, which is part of how it supports edge runtimes alongside Node.js.

Code Quality The repo carries roughly 97 test files spread across per-module __tests__ directories (control, data, errors, assistant, inference), a dedicated src/integration/ suite that exercises both Node and edge runtimes against real Pinecone resources, a mocked smoke-test suite (jest.config.smoke.js), and standalone ts-compilation-test/ts-external-app-test directories that verify the published package still compiles and works correctly when consumed as an external dependency. Errors are modeled as a typed class hierarchy (PineconeBadRequestError, PineconeAuthorizationError, PineconeNotFoundError, and others) rather than generic throws, each carrying request context and actionable messaging. Five GitHub Actions workflows (pr.yml, testing.yml, testing-cleanup.yml, release.yml, build-and-publish-docs.yml) run linting, the full test matrix, and doc publishing on every change.

API Design The public API is built around a small number of composable entrypoints: new Pinecone({ apiKey }), then pc.index() for vector operations or pc.assistant() for RAG chat. A generic RecordMetadata type parameter gives compile-time safety over arbitrary metadata shapes on vectors. The integrated-inference path (createIndexForModel plus upsertRecords/searchRecords) lets callers hand Pinecone raw text and skip standing up a separate embeddings client entirely — a meaningful reduction in boilerplate versus vector-database clients that leave embedding generation to the caller. An extensive guides/ directory (index management, data operations, inference, assistant, TypeScript features, upgrading, FAQ) backs the generated API reference with task-oriented documentation.

Used by 7 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

24,298

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript99%
Updated today
JavaScript
95%
MIT

AnythingLLM

Developer Tools · Automation · AI Assistants

65,696

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
90
Repo Health
78
Technical
64
Dependency
Built with
JavaScript95%
Updated 3 days ago
TypeScript
62%
Other

Flowise

Developer Tools · Automation · No Code Platforms

55,427

Drag-and-drop visual builder for AI agents, RAG pipelines, and multi-agent systems—deploy anywhere in minutes.

View details
86
Repo Health
77
Technical
63
Dependency
Built with
TypeScript62%
JavaScript27%
Updated 3 weeks ago
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

27,743

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
88
Repo Health
73
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
92%
Other

n8n

Automation · No Code Platforms

203,555

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
66
Dependency
Built with
TypeScript92%
Updated today
TypeScript
94%
Apache 2.0

reader

Data Engineering · Developer Tools

558

Production-grade open source web scraping engine that turns any URL into clean markdown for AI agents — with built-in anti-bot bypass, proxy rotation, and browser session management.

View details
67
Repo Health
79
Technical
76
Dependency
Built with
TypeScript94%
Updated 2 weeks ago
JavaScript
55%
AGPL 3.0

ToolJet

Low Code Platforms · No Code Platforms · AI Agents

40,857

Open-source AI-native platform to build and deploy internal tools, workflows, and AI agents with a visual drag-and-drop builder and 80+ data source integrations.

View details
94
Repo Health
81
Technical
63
Dependency
Built with
JavaScript55%
TypeScript38%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search