Deep Research Agent
This flow implements an Autonomous Research Agent that follows a rigorous four-phase protocol (Plan, Act, Process, Synthesize) to answer complex queries.
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
ChatInput-im722[<div><img alt="logo" src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Input]
style ChatInput-im722 stroke:#a170ff
ChatOutput-7h4uy[<div><img alt="logo" src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-7h4uy stroke:#a170ff
OpenAIModel-xyjkl[<div><img alt="logo" src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>OpenAI]
style OpenAIModel-xyjkl stroke:#a170ff
DeepResearchAgent-af1xa[Deep Research Agent]
style DeepResearchAgent-af1xa stroke:#a170ff
OpenAIWebSearchToolComponent-mezqb[<div><img alt="logo" src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>OpenAI Built-in tools]
style OpenAIWebSearchToolComponent-mezqb stroke:#a170ff
ChatInput-im722 -.- DeepResearchAgent-af1xa
linkStyle 0 stroke:#a170ff
DeepResearchAgent-af1xa -.- ChatOutput-7h4uy
linkStyle 1 stroke:#a170ff
OpenAIModel-xyjkl -.- DeepResearchAgent-af1xa
linkStyle 2 stroke:#a170ff
OpenAIWebSearchToolComponent-mezqb -.- DeepResearchAgent-af1xa
linkStyle 3 stroke:#a170ff
Deep Research Agent Workflow Documentation
đź§© Overview
The Deep Research Agent automates complex information gathering by following a four‑phase protocol: Plan, Act, Process, Synthesize. It receives a user query, constructs a detailed research plan, executes searches and analyses through a built‑in web‑search tool, and returns a concise, structured report. This workflow streamlines deep‑dive investigations, reducing manual effort and ensuring consistent, high‑quality outputs.
⚙️ Main Features
- Automated Planning – The agent formulates a step‑by‑step research roadmap based on the user’s initial prompt.
- Human‑in‑the‑Loop Validation – Before execution, the plan is presented for user approval or modification.
- Integrated Web Search – A built‑in web‑search tool retrieves up‑to‑date information from the internet.
- Iterative Refinement – The agent continually revises its plan and queries until all required data are gathered.
- Structured Reporting – Final outputs follow a defined schema, ensuring consistency across responses.
- Streaming Capability – Optional streaming lets users see the agent’s reasoning in real time.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Receives the user’s query and optional files. | User text, session ID, optional file attachments. | Message object containing the prompt and metadata. |
| OpenAI Model | Provides the large‑language‑model engine for planning and content generation. | Prompt, system message, model configuration (temperature, max tokens, etc.). | Language‑model instance used by the agent. |
| OpenAI Web Search Tool | Supplies a web‑search capability to fetch real‑time data. | Search query, selected model, tool configuration. | Tool instance that the agent can invoke during execution. |
| Deep Research Agent | Orchestrates the full research cycle: plan, validate, execute, synthesize. | User prompt, LLM instance, web‑search tool, optional memory and streaming settings. | Structured response message ready for display. |
| Chat Output | Presents the final answer to the user. | Response message from the agent. | Rendered chat message in the playground UI. |
Note: The Label component only displays static documentation and does not participate in the data flow.
đź§ Notes
- The agent relies on an OpenAI API key; the key must be configured in the OpenAI Model component.
- Web‑search results depend on the selected OpenAI model (e.g., gpt‑4o‑mini).
- Token limits of the chosen LLM constrain the depth of the plan and the detail of the final report.
- Human‑in‑the‑Loop approval is mandatory before any external tools are executed; disabling this feature removes the safety check.
- Streaming is optional and may increase latency; it is enabled only when the user sets the corresponding flag.
- Structured output requires a JSON schema; if the agent’s response does not match the schema, the workflow will fail.
- Memory is optional; enabling it allows the agent to preserve context across multiple interactions but increases resource usage.
- The workflow is stateless between runs unless memory is activated; each execution starts with a fresh agent instance.