Lab build

Deep research agent

Plans web searches, runs them in parallel, writes a report and emails it from a Gradio app.

Role
Builder, end to end
Group
Agents and MCP
Services
AI & LLM systems

What it does

A planner agent with Pydantic structured output turns a query into a list of searches, and search agents run them concurrently with asyncio using OpenAI's hosted WebSearchTool. A writer agent produces a markdown report and an email agent sends it as HTML through SendGrid. Runs are inspected in OpenAI traces, exposed through a Gradio app and deployed to Hugging Face Spaces.

What was built

  1. 01

    Planner agent returns a structured list of search items with reasons, set by a configurable search count.

  2. 02

    Search agents run in parallel with asyncio and summarise results from the hosted web search tool.

  3. 03

    Writer agent assembles a detailed markdown report from the summaries.

  4. 04

    Email agent converts the report to HTML and sends it with a SendGrid tool.

  5. 05

    Gradio app streams progress and the final report; the app is deployed to Hugging Face Spaces.

The pipeline, layer by layer

Five layers, one pipeline.

  1. L1Input

    • Gradio query box
  2. L2Planning

    • Planner agent
  3. L3Research

    • Parallel search agents
    • Hosted web search
  4. L4Output

    • Writer agent report
    • Email agent via SendGrid
  5. L5Deploy

    • Hugging Face Spaces

Stack

  • OpenAI Agents SDK
  • WebSearchTool
  • Pydantic
  • asyncio
  • SendGrid
  • Gradio
  • Hugging Face Spaces

Next lab build · 32 / 46

LangGraph Sidekick browsing agent

Browser-using LangGraph assistant that works toward user-set success criteria through an evaluator loop.

Previous: Autonomous trading floor on MCP

Need a system like this in production? Tell us about it.