Skip to content

About

Example: Next.js + Vercel AI SDK chat with AgentSearch web search

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Next.js + Vercel AI SDK chat with AgentSearch

A minimal Next.js chat app (App Router, AI SDK streamText + useChat) whose model can call a live web search tool backed by AgentSearch. Search uses the free AgentSearch relay: 25 searches/day per user, no AgentSearch key.

Run

npm install
cp .env.example .env.local   # add OPENAI_API_KEY
npm run dev                  # http://localhost:3000

The tool lives in lib/agentsearch.ts; the route is app/api/chat/route.ts. Swap in any AI SDK provider in the route.

Deploy to Vercel

Import the repo in Vercel and set OPENAI_API_KEY. Nothing else is needed.

More

For unlimited search plus page extract and JS rendering ($0.005 per call in USDC on Base via x402), see the AgentSearch docs and the MCP server @agentsearchhq/agentsearch-mcp.

MIT

About

Example: Next.js + Vercel AI SDK chat with AgentSearch web search

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages