Overview
Valyu integrates seamlessly with LlamaIndex as a search tool, allowing you to enhance your AI agents and RAG applications with real-time web search and proprietary data sources. The integration provides LLM-ready context from multiple sources including web pages, academic journals, financial data, and more.Installation
Install the official LlamaIndex Valyu package:Free Credits
Get your API key with $10 credit from the Valyu Platform.
Basic Usage
Using ValyuToolSpec Directly
Using with LlamaIndex Agents
The most powerful way to use Valyu is within LlamaIndex agents, where the AI can dynamically decide when and how to search:Advanced Configuration
Search Parameters
The ValyuToolSpec supports all v2 API parameters for fine-tuned control:Multi-Agent Workflows
Use Valyu in complex multi-agent systems with the new AgentWorkflow:Example Applications
Financial Research Assistant
Academic Research Agent
Best Practices
1. Cost Optimization
2. Search Type Selection
3. Error Handling and Fallbacks
4. Agent System Messages
Integration with Other LlamaIndex Components
Custom Query Engines
Integration with Retrievers
API Reference
For complete parameter documentation, see the Valyu API Reference.Key Parameters
query
(required): Natural language search querysearch_type
:"all"
,"web"
, or"proprietary"
(default:"all"
)max_num_results
: 1-20 results (default: 5)max_price
: Maximum cost in dollars for a thousand retrievals (default: 20.0)relevance_threshold
: 0.0-1.0 relevance threshold (default: 0.5)is_tool_call
: Optimize for agent usage (default: true)start_date
/end_date
: Time filtering (YYYY-MM-DD format, optional)