Skip to main content
Weaviate Docs (migrated from docs.weaviate.io) Docs

Search documentation

Type to search this documentation.

On this pageOverview

JavaScript/TypeScript client

The TypeScript client supports code that is written in TypeScript or JavaScript. It allows you to easily interact with the Query Agent API from your JavaScript or TypeScript applications.

It relies on the Weaviate Client package, and handles authentication and connection to your Weaviate instance from there.

The Query Agent TypeScript client is distributed as the weaviate-agents package on npm, and depends on the weaviate-client package, which it declares as a peer dependency. You should install both packages together:

Shell
npm install weaviate-client weaviate-agents

Or with yarn / pnpm:

Shell
yarn add weaviate-client weaviate-agents
Shell
pnpm add weaviate-client weaviate-agents

Import the agent class directly from the weaviate-agents package, alongside your usual weaviate-client imports:

TypeScript
import weaviate from "weaviate-client";
import { QueryAgent } from "weaviate-agents";

Troubleshooting: Force npm to install the latest version

Section titled “Troubleshooting: Force npm to install the latest version”

For existing installations, npm install may not upgrade weaviate-agents to the latest version. If this occurs, explicitly upgrade the package:

Shell
npm install weaviate-agents@latest

Have a question or feedback? Here's how to reach us.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu