Email Drafter — Multi-Agent Email Writing with Google ADK and Cloud Run
Source: Dev.to
What I Built
I built Email Drafter, a small web app that turns structured user input into a polished email draft using a multi‑agent workflow.
The app collects:
- Recipient type
- Purpose
- Tone
- Language
- Key points
Instead of a single giant prompt, the workflow is split into multiple specialized roles:
- One agent plans the email.
- One agent reviews the plan.
- One agent writes the final draft.
- An orchestrator coordinates the workflow.
The services are deployed separately on Google Cloud Run, giving the app a more realistic distributed AI architecture rather than a local prototype. Email drafting was chosen because planning, reviewing, and writing naturally map to distinct tasks, making it an ideal test case for multi‑agent orchestration.
Agents
Researcher Agent
Creates a structured email plan from the user input.
Judge Agent
Reviews the plan and checks whether it is complete enough before moving on.
Content Builder Agent
Writes the final email draft from the approved plan.
Orchestrator Agent
Coordinates the workflow between the other agents and returns the final result to the frontend.
Overall Flow
Frontend → Orchestrator → Researcher → Judge → Content Builder → Final Email Draft
Lessons Learned
- Modular debugging: Splitting the workflow made it easy to pinpoint whether an issue originated in planning, review, or writing.
- Deployment complexity: Running multiple services locally, wiring them together, and deploying to Cloud Run required more effort than the core prompt logic.
- Prompt phrasing matters: Small changes in instructions significantly affected output quality, shifting responses from generic plans to realistic email drafts.
- Production‑ready design: Even for a simple tool, separating responsibilities yields a more modular, maintainable, and scalable system.
Demo & Resources
- Video Demo – (link to video)
- Live App – (link to deployed app)
- GitHub Repo – (link to source code)