Skip to main content
Go to documentation:
⌘U
Weaviate Database

Develop AI applications using Weaviate's APIs and tools

Deploy

Deploy, configure, and maintain Weaviate Database

Query Agent

Run agentic search over your Weaviate Cloud collections

Weaviate Cloud

Manage and scale Weaviate in the cloud

Engram

Persistent memory for LLM agents and applications

Additional resources

Integrations
Contributor guide
Events & Workshops
Weaviate Academy

Need help?

Weaviate LogoAsk AI Assistant⌘K
Community Forum

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.

JavaScript/TypeScript client (SDK)

The latest Query Agent TypeScript client is version v1.4.1.

Installation

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:

npm install weaviate-client weaviate-agents

Or with yarn / pnpm:

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

Imports

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

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

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:

npm install weaviate-agents@latest

Questions and feedback

If you have any questions or feedback, let us know in the user forum.