Skip to content

Deep Researcher

Modules concerning the deep researchers used in Gen AI applications.

GoogleDeepResearcher(agent_name='deep-research-pro-preview-12-2025', api_key=None, streamable=True)

Bases: BaseDeepResearcher

A deep researcher that interacts with Google deep research agents.

This class extends the BaseDeepResearcher and interacts with Google deep research agents.

Examples:

deep_researcher = GoogleDeepResearcher()
output = await deep_researcher.research(query=query, event_emitter=event_emitter)

Attributes:

Name Type Description
agent_name str

The name of the Google deep research agent to use.

client_params dict[str, Any]

The parameters to be passed to the Google client.

streamable bool

Whether the deep research will be streamed if an event emitter is provided. Defaults to True.

Initializes a new instance of the GoogleDeepResearcher class.

Parameters:

Name Type Description Default
agent_name str

The name of the Google deep research agent to use. Defaults to "deep-research-pro-preview-12-2025".

'deep-research-pro-preview-12-2025'
api_key str | None

The API key to use for the Google deep research model. Defaults to None.

None
streamable bool

Whether the deep research will be streamed if an event emitter is provided. Defaults to True.

True

Raises:

Type Description
ValueError

If the agent name is not a valid Google deep research agent.

research(query, history=None, extra_contents=None, hyperparameters=None, event_emitter=None, **kwargs) async

Researches the context.

Parameters:

Name Type Description Default
query str

The query to research.

required
history list[Message] | None

The conversation history to be considered in the research. Defaults to None.

None
extra_contents list[MessageContent] | None

A list of extra contents to be included as inputs. Defaults to None.

None
hyperparameters dict[str, Any] | None

The hyperparameters to be passed to the language model. Defaults to None.

None
event_emitter EventEmitter | None

The event emitter to be used to stream the research. Defaults to None.

None
**kwargs Any

Additional keyword arguments to be passed to the research method.

{}

Returns:

Name Type Description
LMOutput LMOutput

The output from the language model.

OpenAIDeepResearcher(model_name='o4-mini-deep-research', api_key=None, system_template=DEFAULT_SYSTEM_TEMPLATE, user_template=DEFAULT_USER_TEMPLATE, retry_config=None, streamable=True)

Bases: BaseDeepResearcher

A deep researcher that interacts with OpenAI deep research models.

This class extends the BaseDeepResearcher and interacts with OpenAI deep research models.

Examples:

deep_researcher = OpenAIDeepResearcher()
output = await deep_researcher.research(query=query, event_emitter=event_emitter)

Attributes:

Name Type Description
lm_request_processor LMRequestProcessor

The LM request processor containing the OpenAI deep research model.

streamable bool

Whether the deep research will be streamed if an event emitter is provided. Defaults to True.

Initializes a new instance of the OpenAIDeepResearcher class.

Parameters:

Name Type Description Default
model_name str

The name of the OpenAI deep research model to use. Defaults to "o4-mini-deep-research".

'o4-mini-deep-research'
api_key str | None

The API key to use for the OpenAI deep research model. Defaults to None.

None
system_template str

The system template to use for the OpenAI deep research model. Defaults to DEFAULT_SYSTEM_TEMPLATE.

DEFAULT_SYSTEM_TEMPLATE
user_template str

The user template to use for the OpenAI deep research model. Defaults to DEFAULT_USER_TEMPLATE.

DEFAULT_USER_TEMPLATE
retry_config RetryConfig | None

The retry configuration to conduct the deep research. Defaults to a retry configuration with a timeout of DEFAULT_TIMEOUT.

None
streamable bool

Whether the deep research will be streamed if an event emitter is provided. Defaults to True.

True

Raises:

Type Description
ValueError

If the model name is not a valid OpenAI deep research model.

research(query, history=None, extra_contents=None, hyperparameters=None, event_emitter=None, **kwargs) async

Researches the context.

Parameters:

Name Type Description Default
query str

The query to research.

required
history list[Message] | None

The conversation history to be considered in the research. Defaults to None.

None
extra_contents list[MessageContent] | None

A list of extra contents to be included as inputs. Defaults to None.

None
hyperparameters dict[str, Any] | None

The hyperparameters to be passed to the language model. Defaults to None.

None
event_emitter EventEmitter | None

The event emitter to be used to stream the research. Defaults to None.

None
**kwargs Any

Additional keyword arguments to be passed to the research method.

{}

Returns:

Name Type Description
LMOutput LMOutput

The output from the language model.