This page uses a plain
Agent with a search tool — a flexible custom research recipe. For provider-native Deep Research (OpenAI / Gemini) with the DeepResearchAgent class, see the Deep Research page.Quick Start
1
Simple Usage
Attach a search tool and pose a research question.
2
With Configuration
Return a structured report with a Pydantic schema.
How It Works
Simple
Agents: 1 — Single agent handles search, analysis, and synthesis.Workflow
- Receive research topic
- Search web for relevant sources
- Analyze and synthesize findings
- Generate structured report
Setup
Run — Python
Run — CLI
Model used by the research-assistant intermediary
Deep research runs a primary researcher agent and a small “research-assistant” intermediary that gathers initial information using tools. The intermediary honours the same cascade as the rest of the CLI:Run — agents.yaml
Serve API
Advanced Workflow (All Features)
Agents: 1 — Single agent with memory, persistence, structured output, and session resumability.Workflow
- Initialize session for resumable research context
- Configure SQLite persistence for research history
- Execute multi-source search with structured output
- Store findings in memory for follow-up queries
- Resume session to continue research
Setup
Run — Python
Run — CLI
Run — agents.yaml
Serve API
Monitor / Verify
Cleanup
Features Demonstrated
Best Practices
Ask for cited sources
Ask for cited sources
Instruct the agent to list the URLs it used. Research without provenance is hard to trust and impossible to verify.
Use structured output for reports
Use structured output for reports
Define a Pydantic schema with
summary, key_findings, and sources so the report renders consistently and feeds downstream tools.Pin the intermediary model to control cost
Pin the intermediary model to control cost
Deep research runs an assistant that consumes tool-call turns. Set
OPENAI_MODEL_NAME=gpt-4o-mini for that helper to avoid inflating cost on long runs.Escalate to Deep Research for provider-native depth
Escalate to Deep Research for provider-native depth
For OpenAI or Gemini deep-research APIs with built-in browsing, use the
DeepResearchAgent class rather than this search-tool recipe.Related
Provider-native deep research with the DeepResearchAgent class.
Analyze datasets to support data-driven research.

