Quick Start
deep_research=True, the agent automatically:
- Breaks the question into sub-questions
- Searches the web for each sub-question
- Reads and compresses relevant pages
- Accumulates facts and detects contradictions
- Injects the research context into the system prompt
- Generates a response grounded in the research
How It Works
Configuration
Simple Enable
Custom Configuration
Via DeepResearch Engine
You can also pass a pre-builtDeepResearch engine instance directly:
Depth Presets
Search Providers
DuckDuckGo (Default)
Free, no API key required. Works out of the box.Google Custom Search Engine
Requires a Google API key and Custom Search Engine ID.SerpAPI
Requires a SerpAPI key.Custom Search Function
Provide any async callable that returns search results:Trigger Modes
Control when research runs:Standalone Usage
UseDeepResearch directly without an agent:
Events
When streaming, the research pipeline emits progress events:Output Types
ResearchResult
Configuration Reference
str
default:"standard"
Research depth preset:
"quick", "standard", or "deep".str
default:"duckduckgo"
Search backend:
"duckduckgo", "google", or "serpapi".Dict[str, Any]
Backend-specific config (API keys, CSE ID, etc.).
Callable
Custom async search callable. Overrides
search_provider.Model
Model for CKU extraction. Defaults to the agent’s model.
int
default:"15"
Maximum unique sources across all waves.
int
default:"3"
Maximum number of research waves.
int
default:"5"
Concurrent search queries per wave.
int
default:"10"
Concurrent page reads.
float
default:"0.3"
Minimum relevance score for CKU inclusion.
bool
default:"true"
Include source citations in research context.
bool
default:"true"
Surface contradictions between sources.
str
default:"xml"
Format for injected context:
"xml" or "markdown".int
default:"4000"
Approximate token budget for the context block.
float
default:"0.2"
Stop when novelty ratio drops below this between waves.
str
default:"always"
When to run:
"always", "auto", or "tool".str
Description shown in the layer guide injected into the system prompt. If
None, uses the default description.Installation
Deep research requires theresearch extra:
duckduckgo-search and curl-cffi for TLS-impersonated web reading.