How to Set Up AnythingLLM Web Search (Step-by-Step)
Enable web search in AnythingLLM agents. Configure DuckDuckGo, Google Custom Search, or Serper, use @agent syntax, troubleshoot common errors, understand privacy and costs. Start free today.
- AnythingLLM agents fetch live web data using @agent syntax, powered by DuckDuckGo, Google Custom Search, Serper, or Tavily.
- Setup takes 10-20 minutes: enable Agent Skills, configure your search provider, toggle on Web Searching.
- DuckDuckGo is free; paid providers start at $20/month for 10,000 queries.
- Web search adds 2-10 seconds per query and sends your query to external APIs--balance accuracy with privacy.
- Common errors (fetch failed, browser process failures, Ollama timeouts) are fixable with the troubleshooting matrix.
AnythingLLM agents can search the live web to answer questions beyond your training data cutoff. You configure a search provider (like DuckDuckGo or Google Custom Search), enable Agent Skills, then invoke web search using @agent in a chat. This guide walks you through each step, common setup errors, and the accuracy and privacy tradeoffs you need to know.
What You Need to Know: AnythingLLM Web Search Basics
AnythingLLM's web search capability connects your local or cloud LLM to real-time internet data through agents. Instead of relying only on your knowledge base or training data, agents fetch current information when you use the @agent command, then feed it into the model's context window. This closes the knowledge cutoff gap--your bot can tell you today's weather or this year's pricing--but it comes at a cost: latency, token consumption, and external API dependencies.
An agent is AnythingLLM's way of giving your LLM access to external tools. When you enable Agent Skills (web searching, website scraping, and others), you're giving the model permission to request real-time data and decide when to use it. The model decides whether a query needs a web search or can be answered from your knowledge base alone. It then synthesizes the results into a final response.
Web search is not a substitute for a well-tuned knowledge base. Use it when your queries depend on currency: current events, stock prices, recent product releases. Use your knowledge base when you need consistency and control. Most real-world setups combine both.
Supported Search Providers: Comparison & Setup
AnythingLLM ships with five search providers. Each has different costs, speed, and setup difficulty. DuckDuckGo is the easiest to start with because it requires no API key.
| Provider | Cost | Speed | Setup Difficulty | Best For |
|---|---|---|---|---|
| DuckDuckGo | Free | Medium | Very Easy (no key) | Testing, low-volume queries |
| Google Custom Search | $0.08 per 1K queries | Fast | Medium (Google Cloud setup) | Production searches, exact results |
| Serper | Variable (paid tier) | Very Fast | Medium (API key only) | High-volume deployments |
| Bing | Variable | Fast | Medium (Azure setup) | Windows environments |
| Tavily | Freemium | Very Fast | Easy | AI research, high accuracy |
DuckDuckGo requires no authentication. AnythingLLM sends queries directly to DuckDuckGo's API. Responses are slower than Google Custom Search and sometimes less precise, but it's the quickest way to test web search functionality without signing up for anything.
Google Custom Search gives you the most control and best indexing. You create a custom search engine in Google Cloud Console, obtain an API key, and set your search limits (typically $0.08 per 1,000 queries). Setup takes 15-20 minutes and is the standard for production deployments.
Serper is a lightweight wrapper around Google Search. You sign up, get an API key, and paste it into AnythingLLM Settings. Faster than Google Custom Search for many use cases and simpler to configure.
Bing uses Microsoft Azure Cognitive Search and is often overlooked. It works well if you're already in the Azure ecosystem and provides competitive results.
Tavily is specifically built for AI agents. It's optimized for accuracy and speed, with results formatted for LLM consumption. Free tier allows 500 queries per month; paid plans start at $20/month.
Step 1: Enable Agent Skills in AnythingLLM
Before you configure a search provider, you must enable Agent Skills at the workspace or system level. Agent Skills are AnythingLLM's way of letting your model access external tools beyond your documents.
- Open AnythingLLM and navigate to Settings (bottom-left, gear icon).
- Locate Agent Configuration or Agent Skills (exact naming varies by version).
- Select an LLM to power your agent. If you're using a local model via Ollama, ensure it meets minimum requirements: at least 4GB VRAM, quantized to Q4 or better. Smaller models (3B parameters) may struggle with agent reasoning.
- Confirm the Agent LLM is the same as (or compatible with) your main workspace LLM. Mixing LLM providers causes context mismatch and poor reasoning.
- Save and return to the chat interface.
You should now see an agent toggle or @agent option available in your chat input. If you do not see it, verify that your Agent LLM is set and saved. Some older AnythingLLM versions require a restart after enabling agents.
Step 2: Configure Your Search Provider
Choose one search provider below and follow its setup steps. Start with DuckDuckGo if you are new to agents.
DuckDuckGo (No API Key Required)
- Go to Settings Agent Configuration.
- Under Search Provider, select DuckDuckGo.
- No API key is needed. Save.
- Test: In a chat, type
@agent What was the latest Apple product announcement?and wait for a response.
DuckDuckGo is the fastest path to a working setup. Start here if you are new to agents. Responses may be slower and less precise than paid providers, but it is free and requires zero external accounts.
Google Custom Search
- Go to Google Cloud Console (console.cloud.google.com) and create a new project.
- Enable the "Custom Search API" and "Google Search Console API."
- Create an OAuth 2.0 credential (Service Account key). Download the JSON file.
- Create a Custom Search Engine at cse.google.com. Note your CX (Custom Search Engine ID), a long alphanumeric string.
- In AnythingLLM, go to Settings Agent Configuration Search Provider.
- Select Google Custom Search.
- Paste your API key and CX ID into the fields provided.
- Save and test with @agent in a chat.
Google Custom Search is more precise and faster than DuckDuckGo. You have 100 free queries per day, then pay $0.08 per 1,000 queries. Keep costs low by setting query quotas in your Cloud Console billing settings.
Serper API
- Sign up at serper.dev with your email.
- Copy your API key from the dashboard (Settings API Key).
- In AnythingLLM, go to Settings Agent Configuration Search Provider.
- Select Serper.
- Paste your API key and save.
- Test with @agent in a chat.
Serper is faster than Google Custom Search for most queries and has a cleaner, simpler setup. Pricing starts at $10/month for 5,000 queries.
Tavily API
- Sign up at tavily.com.
- Copy your API key from the dashboard.
- In AnythingLLM, go to Settings Agent Configuration Search Provider.
- Select Tavily.
- Paste your API key and save.
Tavily is built for AI agents and returns results optimized for LLM consumption. Free tier includes 500 queries per month; paid tiers start at $20/month for 10,000 queries.
Step 3: Enable Web Searching & Scraping Skills
Once your search provider is configured, you need to enable the specific agent skills. Do this at the same Agent Configuration screen.
- In Settings Agent Configuration, find the Agent Skills section.
- Toggle on Web Searching. This enables the agent to query your search provider.
- Optionally toggle on Website Scraping (allows agents to crawl full page content if a search result snippet is not detailed enough).
- Leave other skills disabled until you understand how agents consume context. Each enabled skill increases token usage and latency.
- Save your changes.
Context management is critical here. Every agent skill adds overhead. If you enable web search, website scraping, calculator, and file reading all at once, your agent takes longer to respond and burns more tokens deciding which tool to use. Start lean: just web search. Add skills only when your workflows demand them.
Website Scraping is resource-intensive. It spawns a headless browser to fetch full page content. If you are on a low-memory system (2GB or less), skip scraping and use web search alone.
Using @agent: Syntax & Real-World Examples
Now you can invoke web search in a chat. The @agent prefix tells AnythingLLM to route your query through the agent pipeline instead of a simple RAG lookup.
Basic Syntax:
Type @agent Your question here in the chat input. AnythingLLM's agent sees the prefix, decides if a web search is needed, fetches results, and returns a synthesized response with citations.
Example 1: Current Events
@agent Who won the latest Formula 1 race and by how many points?
Expected: Agent fetches the latest F1 race results and provides the winner's name, margin, and date.
Example 2: Product Information
@agent What features are in the latest version of Kubernetes released this month?
Expected: Agent searches for recent Kubernetes releases, fetches version notes, and summarizes key features with links to the official release page.
Example 3: Combining Web Search and Knowledge Base
@agent Compare our product pricing with Stripe's latest pricing, then tell me if we're competitive.
Expected: Agent fetches Stripe's current pricing from the web, combines it with your knowledge base (if you have uploaded pricing documents), and produces a comparison.
Example 4: Follow-Up Questions
After an agent response, you can ask follow-up questions. The agent retains context from the search and can dive deeper without re-searching the same topic.
You can also use agents without the @agent prefix if you have enabled agent auto-invocation in Agent Configuration. The model then decides autonomously whether to search based on your query. This is more natural but sometimes less predictable.
Troubleshooting Common Errors
These are the most common web search failures and how to fix them.
"Fetch Failed: Connection Timeout"
Symptom: Agent attempts a search but returns "fetch failed" after 10-15 seconds.
Causes: Your network cannot reach the search provider (DNS issue, firewall block, ISP geo-restriction). The search provider's API is down or rate-limiting you. You are behind a corporate proxy that blocks external API calls.
Fixes:
- Test the search provider manually. Visit https://google.com or https://duckduckgo.com in your browser. If it times out, your network is blocked.
- If using Google Custom Search or Serper, verify your API key is correct. Copy-paste it again from your provider's dashboard.
- If behind a proxy, configure AnythingLLM to use the proxy. Consult your IT team for the proxy URL and port.
- Switch to DuckDuckGo temporarily to isolate the issue. If DuckDuckGo works, the problem is provider-specific (e.g., Google blocks your region).
"Failed to Launch Browser Process"
Symptom: Web scraping fails; you see "Failed to launch browser" or "Puppeteer error."
Causes: Website Scraping requires Chromium/Puppeteer, which is resource-intensive. Your system ran out of memory. Ollama process consumed all available RAM, starving the browser.
Fixes:
- Disable Website Scraping for now. Web searching alone does not require a browser.
- Increase your system's memory or close other applications (stop Ollama, close your IDE, close Chrome).
- If using AnythingLLM in a Docker container, allocate more RAM:
docker run -m 4G...(4GB is a minimum).
"Ollama Connection Error" or "Agent LLM Timeout"
Symptom: Agent settings seem configured, but @agent calls hang or return "connection refused."
Causes: Ollama is not running or not listening on the expected port. Your Ollama model is too small (< 1B parameters) and cannot perform agent reasoning. Network path to Ollama is wrong (common in Docker/networked setups).
Fixes:
- Verify Ollama is running:
ollama serveor check your system's process manager. - Verify the Ollama endpoint in AnythingLLM settings. The default is
localhost:11434. If you are in Docker, it may beollama:11434orhost.docker.internal:11434. - Use a larger model for agents. A 7B model (e.g., mistral 7b) is the minimum. 13B is safer.
- Test Ollama directly: Make a request to
localhost:11434/api/tagsand it should return a list of models.
"Search returned no results" or "Blank response"
Symptom: Agent acknowledges the search but returns an empty or non-committal answer.
Causes: The search provider returned results, but they did not match the query intent (common with vague queries). Your context window is full, so the model cannot fit the search results. The search API key is valid but rate-limited or quota-exhausted (especially Google Custom Search on a free tier).
Fixes:
- Rephrase the query more specifically. Instead of
@agent Tell me about AI, try@agent What are the latest breakthroughs in large language model inference, announced in November 2026? - Reduce context usage. Delete old messages from the chat to free up tokens.
- If using Google Custom Search, check your billing dashboard to ensure you have queries remaining.
Accuracy, Privacy & Cost: What to Expect
Web search in AnythingLLM is powerful but comes with real tradeoffs. Understand them before deploying agents in production.
Accuracy depends on the search engine. Google indexes daily; smaller engines like Tavily update less frequently. The LLM may also hallucinate or misinterpret search results if the query is ambiguous or the results conflict. Always verify critical information--web search is a tool, not a source of truth.
Privacy is a real concern. When you invoke web search, your query is sent to the search provider (Google, Serper, DuckDuckGo, etc.). These providers log queries and may use them for analytics or improvement. If your queries contain sensitive information, use DuckDuckGo (which claims not to log queries) or self-host a private search engine like SearXNG.
Cost varies by provider. DuckDuckGo is free but slower. Google Custom Search costs $0.08 per 1,000 queries after the free tier (100 queries/day). For 10,000 queries/month, expect roughly $24/month. Serper starts at $10/month for 5,000 queries, $50/month for 50,000. Tavily offers 500 free queries/month, then $20/month for 10,000 queries.
For a small team (10-50 people) running agents casually, DuckDuckGo or Tavily free tier is sufficient. For production workloads with 10,000+ queries/month, budget $20-50/month depending on your provider and volume. This cost sits on top of your LLM costs (Ollama is free, but cloud LLM APIs charge by token).
Frequently Asked Questions
What is the difference between web search and web scraping?
Web search queries a search engine (Google, DuckDuckGo) and gets a list of results. Web scraping fetches the full content of a single webpage. Scraping uses more tokens and resources but gives complete page data. Use search first; enable scraping only if you need full-page context.
Can I use multiple search providers at once?
No. AnythingLLM accepts one active search provider. You choose one in Settings. If you want to compare providers, you must switch manually and re-run queries.
Does web search work with local models?
Yes. Web search is provider-agnostic. Whether you use Ollama, vLLM, or an API-based model like OpenAI, you can enable agent skills. The agent LLM's quality matters, though. Smaller local models (< 7B) may not perform well at reasoning through search results.
How do I cite sources when using web search?
AnythingLLM agents embed source URLs in their responses. When you ask a question with @agent, the response often includes links to the pages the agent consulted. Users can click through to verify the information.
Can I use web search with my knowledge base?
Yes. Agents access both. They decide whether to consult your knowledge base, the web, or both. You cannot force one or the other, but in practice, agents usually try the knowledge base first and resort to web search if answers are incomplete.
Is web search available in AnythingLLM Cloud?
Web search agent functionality is available in both self-hosted AnythingLLM and AnythingLLM Cloud. Features and provider support may differ between versions. Check your version's release notes.
What LLM model is best for agents?
Any model 7B parameters or larger. Mistral 7B, Llama 2 13B, and Mixtral 8x7B are popular choices. Avoid models smaller than 3B--they lack reasoning capability and will fail at agent tasks.
Why is my agent slow?
Web search adds 2-5 seconds per query (network latency plus search provider processing). Website scraping adds another 5-10 seconds. If you enable both, expect 10-15 second responses. This is normal. Use agents for queries that genuinely need real-time data; avoid them for pure knowledge base lookups.
The Bottom Line
AnythingLLM's web search agents close the knowledge cutoff gap by letting your LLM fetch real-time information. Start with DuckDuckGo (free, no setup), then graduate to Google Custom Search or Serper if you hit rate limits or need faster results.
The main tradeoffs are latency (add 2-10 seconds per query), privacy (queries go to external APIs), and cost (free to $50/month depending on volume). Most teams start free and upgrade as demand grows.
Ready to enable web search in your agents? Visit the AnythingLLM hosting hub to see how Opsily's managed deployment removes setup friction entirely. No Ollama path troubleshooting, no proxy configuration, no browser process crashes--just agents that work out of the box.