PythonOpenAI Agents SDKMulti-agentPydanticGradio
Imat Deep Research
By Raymart "Imat" Marasigan

- Published on
- Type
- Open source, solo build
- Role
- AI Engineer (design and build)

Sharing
Imat Deep Research turns one question into a sourced, long-form report. It is built in Python on the OpenAI Agents SDK and runs as a Gradio web app. View the code on GitHub.
How it works
- Clarifier agent decides whether the question can be researched, and asks you two follow-up questions to narrow it.
- Planner agent turns the question and your answers into a typed search plan: each search with the reason for running it.
- Search agent runs every planned search concurrently with a web-search tool and summarizes each result.
- Writer agent synthesizes the summaries into a structured report: a short summary, the full Markdown report and follow-up questions.
- Email agent delivers the report as HTML email over SMTP, with a Pushover notification as the fallback.
Engineering decisions
- Typed contracts between agents. Every stage hands the next a Pydantic model, so the planner's output is validated before any search runs.
- Parallel tool calls. Planned searches run concurrently instead of one after another.
- Streaming progress. The orchestrator is an async generator, so each stage streams a status line into the UI as it finishes.
- Tracing. Each run is wrapped in one trace, so every agent step can be inspected in the OpenAI traces dashboard.
- Guarding the pipeline. Requests that can't be researched stop at the clarifier, before any search or model spend.
Stack: Python 3.12, OpenAI Agents SDK, Pydantic, Gradio, uv, ruff.