> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# research • AI Agent SDK

> research: Perform a deep research query.

# research

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**DeepResearchAgent**](../classes/DeepResearchAgent) class in the [**deep\_research\_agent**](../modules/deep_research_agent) module.

Perform a deep research query.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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 query="query" type="str" required={true}>
  The research question or topic to investigate
</ParamField>

<ParamField query="instructions" type="Optional" required={false}>
  Override the agent's default instructions
</ParamField>

<ParamField query="model" type="Optional" required={false}>
  Override the default model
</ParamField>

<ParamField query="summary_mode" type="Optional" required={false}>
  Summary mode ("auto", "detailed", "concise") - OpenAI only
</ParamField>

<ParamField query="web_search" type="Optional" required={false}>
  Enable web search - OpenAI only
</ParamField>

<ParamField query="code_interpreter" type="Optional" required={false}>
  Enable code interpreter - OpenAI only
</ParamField>

<ParamField query="mcp_servers" type="Optional" required={false}>
  MCP server configurations - OpenAI only
</ParamField>

<ParamField query="file_ids" type="Optional" required={false}>
  File IDs for code interpreter - OpenAI only
</ParamField>

<ParamField query="file_search" type="Optional" required={false}>
  Enable file search - Gemini only
</ParamField>

<ParamField query="file_search_stores" type="Optional" required={false}>
  File search store names - Gemini only
</ParamField>

<ParamField query="stream" type="bool" required={false} default="True">
  Enable streaming for real-time progress (default: True)
</ParamField>

### Returns

<ResponseField name="Returns" type="DeepResearchResponse">
  DeepResearchResponse containing the report, citations, and metadata
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# 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

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/deep_research_agent.py#L1064">
  `praisonaiagents/agent/deep_research_agent.py` at line 1064
</Card>
