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

python
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

ParamField str

The research question or topic to investigate

ParamField Optional[str]

Override the agent’s default instructions

ParamField Optional[str]

Override the default model

ParamField Optional

Summary mode (“auto”, “detailed”, “concise”) – OpenAI only

ParamField Optional[bool]

Enable web search – OpenAI only

ParamField Optional[bool]

Enable code interpreter – OpenAI only

ParamField Optional

MCP server configurations – OpenAI only

ParamField Optional

File IDs for code interpreter – OpenAI only

ParamField Optional[bool]

Enable file search – Gemini only

ParamField Optional

File search store names – Gemini only

ParamField bool

Enable streaming for real-time progress (default: True)

Returns

ResponseField DeepResearchResponse

DeepResearchResponse containing the report, citations, and metadata

Usage

python
# 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.time
  • debug
  • error

Source

View on GitHub

praisonaiagents/agent/deep_research_agent.py at line 1131