Valyu provides powerful search tools for AI agents. Web search for real-time information, plus specialized domain-specific searchtools: financeSearch (stock prices, earnings, income statements, cash flows, etc), paperSearch (full-text PubMed, arXiv, bioRxiv, medRxiv), bioSearch (clinical trials, FDA drug labels, PubMed, medRxiv, bioRxiv), patentSearch (USPTO patents), secSearch (10-k/10-Q/8-k), economicsSearch (BLS, FRED, World Bank data), and companyResearch (comprehensive company research reports).
pnpm install @valyu/ai-sdk# Add to your .env fileVALYU_API_KEY=your_api_key_hereimport { generateText, gateway, stepCountIs } from 'ai';import { webSearch } from '@valyu/ai-sdk';// Available specialised search tools: financeSearch, paperSearch,// bioSearch, patentSearch, secSearch, economicsSearch, companyResearch
const { text } = await generateText({ model: gateway('google/gemini-3-pro-preview'), prompt: 'Latest data center projects for AI inference?', tools: { webSearch: webSearch(), }, stopWhen: stepCountIs(3),});
console.log(text);