research • AI Agent SDK
research: Perform a deep research query.
research
Method
</div>
This is a method of the DeepResearchAgent class in the deep_research_agent module.
Perform a deep research query.
Signature
def research(query: str, instructions: Optional[str], model: Optional[str], summary_mode: Optional[Literal['auto', 'detailed', 'concise']], web_search: Optional[bool], code_interpreter: Optional[bool], mcp_servers: Optional[List[Dict[str, Any]]], file_ids: Optional[List[str]], file_search: Optional[bool], file_search_stores: Optional[List[str]], stream: bool) -> DeepResearchResponseParameters
ParamField
strThe research question or topic to investigate
ParamField
Optional[str]Override the agent’s default instructions
ParamField
Optional[str]Override the default model
ParamField
OptionalSummary mode (“auto”, “detailed”, “concise”) – OpenAI only
ParamField
Optional[bool]Enable web search – OpenAI only
ParamField
Optional[bool]Enable code interpreter – OpenAI only
ParamField
OptionalMCP server configurations – OpenAI only
ParamField
OptionalFile IDs for code interpreter – OpenAI only
ParamField
Optional[bool]Enable file search – Gemini only
ParamField
OptionalFile search store names – Gemini only
ParamField
boolEnable streaming for real-time progress (default: True)
Returns
ResponseField
DeepResearchResponseDeepResearchResponse containing the report, citations, and metadata
Usage
# Standard research
result = agent.research(
"What are the latest developments in quantum computing?",
summary_mode="detailed"
)
# Streaming research (Gemini) - shows real-time progress
result = agent.research(
"Research AI trends",
stream=True # Real-time thinking summaries
)
print(result.report)Uses
time.timedebugerror
Source
View on GitHubpraisonaiagents/agent/deep_research_agent.py at line 1131