Vercel AI SDK
Add Airweave search to your Vercel AI SDK agents with a single function call.
The @airweave/vercel-ai-sdk package currently uses the legacy search API. It will be updated to support the new three-tier search API (instant, classic, agentic) in a future release.
The @airweave/vercel-ai-sdk package provides an airweaveSearch tool that integrates seamlessly with the Vercel AI SDK.
Prerequisites
Before you start you’ll need:
- A collection with data: at least one source connection must have completed its initial sync. See the Quickstart if you need to set this up.
- An API key: Create one in the Airweave dashboard under API Keys.
Installation
Quick Start
Configuration
Configuration Options
Environment Variables
Set your API key as an environment variable. You can copy your API key from the Airweave dashboard.
TypeScript Support
Full TypeScript types are included:
Result Types
Each search result includes: