> ## 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.

# DeepResearchAgent Module

> Automated deep research workflows using OpenAI and Gemini Deep Research APIs

# DeepResearchAgent Module

The `DeepResearchAgent` class automates complex research workflows using Deep Research APIs from multiple providers.

## Supported Providers

* **OpenAI**: `o3-deep-research`, `o4-mini-deep-research` (via Responses API)
* **Gemini**: `deep-research-pro` (via Interactions API)

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import DeepResearchAgent
```

## Quick Example

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import DeepResearchAgent

# OpenAI Deep Research
agent = DeepResearchAgent(
    name="Research Assistant",
    model="o3-deep-research",
    instructions="You are a professional researcher..."
)

result = agent.research("What are the economic impacts of AI on healthcare?")
print(result.report)

for citation in result.citations:
    print(f"- {citation.title}: {citation.url}")
```

## Constructor

### `DeepResearchAgent()`

Creates a new DeepResearchAgent instance.

**Parameters:**

| Parameter      | Type   | Default                 | Description                      |
| -------------- | ------ | ----------------------- | -------------------------------- |
| `name`         | `str`  | `"Deep Research Agent"` | Agent name                       |
| `model`        | `str`  | `"o3-deep-research"`    | Deep research model to use       |
| `instructions` | `str`  | `""`                    | System instructions for research |
| `verbose`      | `bool` | `False`                 | Enable verbose logging           |

## Methods

### `research(query)`

Performs deep research on a given query.

**Parameters:**

* `query` (str): The research question or topic

**Returns:** `ResearchResult` - Contains report, citations, reasoning steps

### `async_research(query)`

Async version of the research method.

**Parameters:**

* `query` (str): The research question or topic

**Returns:** `ResearchResult` - Contains report, citations, reasoning steps

## Data Classes

### `Citation`

Represents a citation in the research report.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
@dataclass
class Citation:
    title: str
    url: str
    start_index: int = 0
    end_index: int = 0
```

### `ReasoningStep`

Represents a reasoning step in the research process.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
@dataclass
class ReasoningStep:
    text: str
    type: str = "reasoning"
```

### `WebSearchCall`

Represents a web search call made during research.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
@dataclass
class WebSearchCall:
    query: str
    status: str
```

### `ResearchResult`

The complete result of a research operation.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
@dataclass
class ResearchResult:
    report: str
    citations: List[Citation]
    reasoning_steps: List[ReasoningStep]
    web_searches: List[WebSearchCall]
    metadata: Dict[str, Any]
```

## Example with Gemini

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import DeepResearchAgent

# Gemini Deep Research
agent = DeepResearchAgent(
    name="Research Assistant",
    model="deep-research-pro",
    instructions="You are a professional researcher..."
)

result = agent.research("Latest developments in quantum computing")
print(result.report)
```

## Related

* [Agent Module](/docs/sdk/praisonaiagents/agent/agent) - Base Agent class
* [QueryRewriterAgent Module](/docs/sdk/praisonaiagents/agent/query_rewriter_agent) - Query optimization for RAG
* [Knowledge Module](/docs/sdk/praisonaiagents/knowledge/knowledge) - Knowledge base integration
