AI
AI SDK Patterns
PatternsLearnnewComposeGitHub
PatternsComposeLearnAI SDK DocsGitHub

Built with AI SDK · shadcn/ui · Next.js

© 2026 AI SDK Patterns

Web Search Agent

Integrate third-party search APIs (Tavily, Exa) with the AI SDK to build a grounded search agent with source citations.

toolsintermediate

🔒 Demo mode - web search with source citations

Install this lab

Option 1: shadcn CLI

pnpm dlx shadcn@latest add https://ai-sdk-patterns.vercel.app/r/web-search

Option 2: Copy or download

Use cases

Research Assistant Platforms

Build grounded research tools that search web, cite sources, and provide accurate, up-to-date information.

News Aggregation Systems

Create applications that gather news from multiple sources, summarize events, and provide contextual analysis.

Related labs

Tool Calling

Let the AI model call functions and use external tools with the multi-step tool loop.

Multi-Step Agent

Build an agent that orchestrates multiple tool calls in sequence, using stopWhen: stepCountIs() and automatic tool result forwarding.