Skip to main content

research

Method
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) -> DeepResearchResponse

Parameters

query
str
required
The research question or topic to investigate
instructions
Optional
Override the agent’s default instructions
model
Optional
Override the default model
summary_mode
Optional
Summary mode (“auto”, “detailed”, “concise”) - OpenAI only
Enable web search - OpenAI only
code_interpreter
Optional
Enable code interpreter - OpenAI only
mcp_servers
Optional
MCP server configurations - OpenAI only
file_ids
Optional
File IDs for code interpreter - OpenAI only
Enable file search - Gemini only
file_search_stores
Optional
File search store names - Gemini only
stream
bool
default:"True"
Enable streaming for real-time progress (default: True)

Returns

Returns
DeepResearchResponse
DeepResearchResponse 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)