Overview
Avante.nvim includes web search tools that allow AI agents to search the internet for up-to-date information, documentation, and solutions. This is particularly useful when dealing with:- Latest framework updates and best practices
- Recently discovered bugs and solutions
- API documentation and examples
- Current technology trends and recommendations
Web search is available as a tool that the AI can use in agentic mode. You must enable a web search provider and configure the appropriate API keys.
Supported Providers
Avante supports multiple web search providers:- Tavily (default) - AI-optimized search API
- SerpAPI - Google Search API wrapper
- Google - Programmable Search Engine
- Kagi - Privacy-focused search
- Brave Search - Privacy-focused search from Brave
- SearXNG - Self-hosted metasearch engine
Configuration
Basic Setup
Configure the web search provider in your Avante setup:The web search provider to use. Options:
tavily, serpapi, google, kagi, brave, searxngOptional HTTP proxy URL for search requests. Useful in restricted networks.Example:
"http://127.0.0.1:7890"Provider Setup
Tavily (Default)
Tavily provides AI-optimized search results. Pros:- Optimized for AI applications
- Returns clean, structured results
- Fast response times
SerpAPI
SerpAPI provides Google Search results through their API. Pros:- Reliable Google Search results
- Rich metadata and structured data
- Supports many search engines
Google Programmable Search Engine
Use Google’s Programmable Search Engine for custom search.Create Search Engine
- Go to Google Programmable Search Engine
- Create a new search engine
- Configure search scope (entire web or specific sites)
- Get your Search Engine ID
Get API Key
Get an API key from Google Cloud Console
- Direct Google Search integration
- Customizable search scope
- Free tier available
Kagi
Kagi is a privacy-focused search engine with an API.Get API Token
- Subscribe to Kagi (requires paid plan)
- Go to Settings → API
- Generate an API token
- Privacy-focused (no tracking)
- High-quality results
- Fast and ad-free
- Requires paid Kagi subscription
Brave Search
Brave Search offers a privacy-respecting search API.Get API Key
- Go to Brave Search API Dashboard
- Sign up and create an API key
- Privacy-focused
- Independent index (not Google)
- Free tier available
SearXNG
SearXNG is a self-hosted metasearch engine.Deploy SearXNG
Set up your own SearXNG instance or use a public one. See SearXNG docs for deployment.
- Self-hosted (full control)
- No API costs
- Privacy-focused
- Aggregates multiple search engines
- Requires hosting infrastructure
- More complex setup
Using Web Search
Once configured, the AI can automatically use web search in agentic mode:Automatic Usage
- Recognize it needs current information
- Use the
web_searchtool automatically - Search for “React 19 new features”
- Incorporate findings into the response
Manual Tool Control
You can control tool usage through permissions:Proxy Configuration
If you’re behind a corporate proxy or firewall:- HTTP:
http://proxy:port - HTTPS:
https://proxy:port - With auth:
http://user:pass@proxy:port
Disabling Web Search
To disable the web search tool:Response Formatting
Web search results are automatically formatted and integrated into the AI’s response. The AI will:- Parse search results
- Extract relevant information
- Cite sources when applicable
- Synthesize findings into a coherent answer
Best Practices
Choose the Right Provider
Use Tavily for AI tasks, SerpAPI for Google results, or Kagi for privacy.
Monitor API Usage
Web search can be expensive. Monitor your API usage and costs.
Verify Results
Always verify critical information from web searches, especially for security-sensitive code.
Use for Documentation
Web search is excellent for finding official docs and recent API changes.
Troubleshooting
Web search not working
Web search not working
- Verify environment variable is set:
echo $TAVILY_API_KEY - Check provider is configured correctly
- Ensure you have internet connectivity
- Verify API key is valid (not expired)
- Check API quota hasn’t been exceeded
Proxy errors
Proxy errors
- Verify proxy URL format is correct
- Test proxy with curl:
curl -x http://proxy:port https://google.com - Check if proxy requires authentication
- Ensure proxy allows HTTPS connections
Rate limit errors
Rate limit errors
- Check your API plan limits
- Reduce search frequency
- Consider upgrading your plan
- Use caching if possible
Poor search results
Poor search results
- Try a different provider
- Rephrase your question to be more specific
- For Google CSE, adjust your search engine settings
Example Use Cases
- Latest Documentation
- Bug Solutions
- Best Practices
- Security Advisories
Prompt: “How do I use the new async/await syntax in Python 3.12?”The AI will search for Python 3.12 documentation and provide current information.
Related Documentation
LLM Tools
Learn about all available AI tools
Tool Permissions
Configure tool approval settings