AgentTeam(web=…) is not wired yet (PraisonAI #4004) — set web=… on each Agent(...) in the team instead.Quick Start
1
Level 1 — Bool (simplest)
Add
web=True and the agent automatically searches the internet when it needs current information.2
Level 2 — String (pick a provider)
Pass a provider name to route searches through a specific engine.
3
Level 3 — Config class (full control)
Use
WebConfig to combine search, fetch, provider, and result limits.4
Alternative — Web tools directly
Use
search_web and web_crawl as standalone tools inside any agent.How It Works
The agent decides when to search or fetch based on your query. Results flow back as context for the final answer.Configuration Options
WebConfig API Reference
Full API reference for
WebConfig — search, fetch, providers, max_resultsWebConfig Fields
Search Provider Priority (auto-fallback)
web_crawl Output
Every fetched page comes back as a dict with four keys, and the content field is Markdown — headings, lists, links, and fenced code blocks survive even when no optional crawl provider is installed.
A failed fetch adds an
error key instead of usable content.
What survives on the zero-dependency path
The built-inhttpx path uses only Python’s standard library, so it works on every install with no API key or extra package.
When an installed provider (tavily, crawl4ai, spider) is available, it is used first for higher-fidelity Markdown. The stdlib
httpx path runs as the always-available fallback — and now returns structured Markdown instead of flat text. On any parse error it falls back to flat-text extraction, so the tool never fails.Example
Common Patterns
Research Agent with Sources
Search the web and return cited sources alongside the answer.Crawl and Summarize a URL
Fetch a specific webpage and summarize it.The agent reads the page as Markdown, so headings and code blocks are preserved — the summary can quote them directly.
Multi-Agent Research Pipeline
One agent searches, another writes the report.Best Practices
Use DuckDuckGo for zero-configuration setups
Use DuckDuckGo for zero-configuration setups
DuckDuckGo requires no API key and no package beyond
ddgs. It’s the best choice for local development, prototypes, and open-source projects where you can’t bundle API keys.Switch to Tavily for production accuracy
Switch to Tavily for production accuracy
Tavily returns higher-quality snippets and supports full-page extraction. Set
TAVILY_API_KEY in your environment and the agent will prefer it automatically over free providers.Limit max_results to control token costs
Limit max_results to control token costs
Each search result adds tokens to the agent’s context. Keep
max_results=5 (the default) for most queries. Only increase it when the task genuinely requires broad coverage, such as academic literature surveys.Combine search and fetch for deep research
Combine search and fetch for deep research
search=True finds the best URLs; fetch=True reads the full page content. Use both together when a snippet is not enough — for example, reading full API documentation or news articles.Related
Search Providers
Choose DuckDuckGo, Tavily, or Serper for web search
Deep Research
Multi-step research agents that synthesize information from many sources

