Adapters

Framework-native tools, one provider

Adapters turn web.search() and web.scrape() into the tool format your agent framework expects. Keep provider-specific code out of your app — and switch frameworks without rewriting your search layer.

Vercel AI SDK

Built-in

Shipped inside core and used by default. web.tools() returns a Vercel AI SDK ToolSet you can pass straight into generateText / streamText. web_scrape is included only when the provider supports it.

  • — No extra package or framework option required.
  • — Install ai (v5) — an optional peer dependency of core.
  • — Customize tool names and descriptions when you need to.
default.ts
customize.ts

Custom adapter

Any framework

framework accepts any object implementing the FrameworkAdapter contract, so you can target other agent frameworks while reusing the same provider and unified API.

Build your framework's tools from web.search / web.scrape — adding an adapter is purely additive and requires no changes to core.

my-adapter.ts

The FrameworkAdapter contract

Two fields: a name, and a createTools function that receives the WebSearch instance and active provider.

contract.ts