Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Valyu Search Tools
Valyu provides powerful domain-specific search tools including web search, finance, academic papers, biomedical, patents, SEC filings, economics data, and company research.
Installation
npm install @valyu/ai-sdk
Environment Variables
VALYU_API_KEY=your-valyu-api-key
| Tool | Description |
|---|
valyuWebSearch | General web search |
valyuFinanceSearch | Stock prices, earnings, financials |
valyuPaperSearch | Academic papers (PubMed, arXiv, bioRxiv) |
valyuBioSearch | Clinical trials, FDA labels, biomedical |
valyuPatentSearch | USPTO patents |
valyuSecSearch | SEC filings (10-K, 10-Q, 8-K) |
valyuEconomicsSearch | BLS, FRED, World Bank data |
valyuCompanyResearch | Comprehensive company reports |
Quick Start
import { Agent } from 'praisonai';
import { valyuFinanceSearch, valyuSecSearch } from 'praisonai/tools';
const agent = new Agent({
name: 'FinanceAnalyst',
instructions: 'You analyze financial data and SEC filings.',
tools: [valyuFinanceSearch(), valyuSecSearch()],
});
const result = await agent.run('What is Apple\'s latest quarterly revenue?');
console.log(result.text);
Finance Search
import { valyuFinanceSearch } from 'praisonai/tools';
const financeTool = valyuFinanceSearch({
// Data types to include
includeStockPrices: true,
includeEarnings: true,
includeIncomeStatements: true,
includeCashFlows: true,
});
const agent = new Agent({
name: 'StockAnalyst',
tools: [financeTool],
});
Academic Paper Search
import { valyuPaperSearch } from 'praisonai/tools';
const paperTool = valyuPaperSearch({
// Sources to search
sources: ['arxiv', 'pubmed', 'biorxiv', 'medrxiv'],
// Full text search
fullText: true,
});
const agent = new Agent({
name: 'ResearchAssistant',
tools: [paperTool],
});
Biomedical Search
import { valyuBioSearch } from 'praisonai/tools';
const bioTool = valyuBioSearch({
// Include clinical trials
includeClinicalTrials: true,
// Include FDA drug labels
includeFDALabels: true,
});
Patent Search
import { valyuPatentSearch } from 'praisonai/tools';
const patentTool = valyuPatentSearch({
// USPTO patents
database: 'uspto',
});
SEC Filings Search
import { valyuSecSearch } from 'praisonai/tools';
const secTool = valyuSecSearch({
// Filing types
filingTypes: ['10-K', '10-Q', '8-K'],
});
Economics Data Search
import { valyuEconomicsSearch } from 'praisonai/tools';
const econTool = valyuEconomicsSearch({
// Data sources
sources: ['bls', 'fred', 'worldbank'],
});
Company Research
import { valyuCompanyResearch } from 'praisonai/tools';
const companyTool = valyuCompanyResearch({
// Comprehensive reports
includeFinancials: true,
includeNews: true,
includeFilings: true,
});
Advanced Example
import { Agent } from 'praisonai';
import {
valyuFinanceSearch,
valyuSecSearch,
valyuCompanyResearch
} from 'praisonai/tools';
const agent = new Agent({
name: 'InvestmentAnalyst',
instructions: `You are an investment analyst.
Use financial data, SEC filings, and company research
to provide comprehensive investment analysis.`,
tools: [
valyuFinanceSearch(),
valyuSecSearch(),
valyuCompanyResearch(),
],
});
const result = await agent.run(`
Analyze Tesla's financial health:
1. Recent stock performance
2. Latest 10-K highlights
3. Revenue trends
`);
console.log(result.text);
interface ValyuSearchResult {
results: Array<{
title: string;
url?: string;
content: string;
source: string;
date?: string;
metadata?: Record<string, unknown>;
}>;
query: string;
}
Best Practices
- Use specific tools - Choose the right tool for your domain
- Combine tools - Use multiple tools for comprehensive analysis
- Filter by source - Narrow down to relevant data sources
- Check dates - Financial data is time-sensitive