Skip to main content
Deep Research gives agents the ability to autonomously search the web, read sources, extract knowledge, and synthesize findings across multiple research waves.

Enable Deep Research

from definable.agent import Agent

agent = Agent(model="gpt-4o", deep_research=True)

output = await agent.arun("What are the latest advances in quantum computing?")
print(output.content)  # Grounded response with citations

Custom Configuration

from definable.agent.research import DeepResearchConfig

agent = Agent(
    model="gpt-4o",
    deep_research=DeepResearchConfig(
        depth="deep",                  # "quick", "standard", or "deep"
        search_provider="duckduckgo",  # or "google", "serpapi"
        max_sources=30,
        max_waves=5,
        include_citations=True,
    ),
)

Depth Presets

PresetWavesSourcesUse case
quick18Fast fact-checking
standard315Balanced research (default)
deep530Comprehensive analysis

How It Works

  1. Wave 1: Generate search queries from the user’s question.
  2. Search: Execute queries via the configured search provider.
  3. Read: Fetch and parse source pages concurrently.
  4. Extract: Use a compression model to extract Compact Knowledge Units (CKUs).
  5. Evaluate: Score relevance, detect contradictions, identify gaps.
  6. Repeat: Generate follow-up queries and research further (waves 2+).
  7. Inject: Final CKUs are injected into the agent’s system prompt.

Configuration Reference

depth
str
default:"standard"
Research depth: "quick", "standard", or "deep".
search_provider
str
default:"duckduckgo"
Search backend: "duckduckgo", "google", or "serpapi".
max_sources
int
default:"15"
Maximum unique sources across all waves.
max_waves
int
default:"3"
Maximum research waves.
include_citations
bool
default:"true"
Include source citations in the research context.
trigger
str
default:"always"
When to research: "always", "auto" (model decides), "tool" (explicit call).

Imports

from definable.agent.research import DeepResearchConfig