Marketing Campaign Assistant - Google ADK Tutorial Project
Defines a multi-agent workflow that researches, writes, and formats a marketing campaign brief from a product idea.
What this file does
Defines a multi-agent workflow that researches, writes, and formats a marketing campaign brief from a product idea.
When to use it
- Building a multi-agent system with Google ADK
- Automating marketing brief creation from a product concept
- Learning sequential agent orchestration with state passing
- Prototyping agent workflows that use Google Search as a tool
Assumes this stack
Marketing Campaign Assistant - Google ADK Tutorial Project
This repository contains the code for the Marketing Campaign Assistant project, built as part of a tutorial series on Google's Agent Development Kit (ADK).
Part 1 of this series focuses on building the core multi-agent logic using Python and Google ADK, and running/visualizing it locally using the ADK command-line interface and web development UI.
Watch the tutorial video here: https://www.youtube.com/watch?v=/r-JsrEoctCQ
Project Description
The Marketing Campaign Assistant is a multi-agent system designed to automate the initial steps of creating a marketing campaign brief. It takes a product idea as input and uses a workflow of specialized AI agents to:
- Research market trends and target audience.
- Craft key messaging.
- Write ad copy variations.
- Suggest visual concepts.
- Format the results into a cohesive brief.
This project demonstrates how to leverage Google ADK's code-first approach and workflow orchestration capabilities to build agents that collaborate on a complex task.
Features Covered in Part 1
- Defining specialized
LlmAgentcomponents. - Orchestrating agents in a specific sequence using a
SequentialAgentworkflow. - Using built-in tools (like Google Search).
- Passing state/information between agents.
- Running the agent locally via the ADK CLI (
adk run). - Visualizing the agent's execution flow and state using the ADK Web UI (
adk web).
Prerequisites
- Python 3.7+
- pip (Python package installer)
- Access to an LLM provider (like Google AI Studio/Vertex AI, OpenAI, etc.) and an associated API Key. This tutorial uses Google's Gemini models via the Google AI client library, which is integrated with ADK.
- A Google API Key with access to Gemini models. You can obtain one from Google AI Studio.
- Basic familiarity with Python.
Installation
- Clone the repository:
git clone https://github.com/AhsanAyaz/marketing-agents-adk cd marketing-agents-adk - Create a virtual environment (recommended):
python -m venv .venv - Activate the virtual environment:
- On macOS and Linux:
source venv/bin/activate - On Windows:
.\venv\Scripts\activate
- On macOS and Linux:
- Install dependencies:
(Note: Thepip install -r backend/requirements.txtrequirements.txtis located inside thebackendfolder, as Part 2 will add a frontend folder at the top level.) - Set up your API Key:
- Create a file named
.envin the directorymarketing_campaign_agent. - Add your Google API Key to this file, using the environment variable name expected by the Google AI client library (usually
GOOGLE_API_KEY).GOOGLE_API_KEY='YOUR_ACTUAL_GOOGLE_API_KEY' - Replace
'YOUR_ACTUAL_GOOGLE_API_KEY'with your key.
- Create a file named
Project Structure (Part 1)
marketing-agents-adk/
├── marketing_campaign_agent/
│ ├── __init__.py # Package initialization
└── .env # Stores your API key (not committed to git)
│ ├── agent.py # Defines all LlmAgents and the SequentialAgent workflow
│ ├── requirements.txt # Project dependencies
│ └── instruction.py # Text files containing detailed instructions for each agent
How to Run the Agent (Part 1)
You can run and interact with the agent as explained in the video:
Using the ADK Web UI (adk web)
* Ensure your virtual environment is activated and the `.env` file is set up correctly in the project root.
* Navigate to the project root directory (`marketing-agents-adk`).
* Run the ADK web command:
```bash
adk web
```
* The command will start a local web server and provide a URL (usually `http://localhost:8000`).
* Open this URL in your web browser.
* In the Web UI, select `marketing_campaign_agent` from the dropdown on the left.
* You can then type messages, view agent responses, and explore the "Events" tab to see the internal workflow execution, including which sub-agents were called and in what order.
Future Development (Part 2)
In the next part of this tutorial series, we will:
- Deploy our agent to Google Cloud
Stay tuned!
Contributing
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
License
MIT
What's inside
6 sections, 4 code blocks, 1 project tree, 1 agent definition file, 1 instruction file
Change this for your project
- Replace
AhsanAyaz/marketing-agents-adkwith your own repository URL - Replace
marketing_campaign_agentwith your own agent directory name - Replace
GOOGLE_API_KEYwith your own environment variable name if different - Replace
'YOUR_ACTUAL_GOOGLE_API_KEY'with your actual API key
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Separate agent instructions into a dedicated
instruction.pyfile for maintainability - Use
SequentialAgentto enforce a fixed pipeline of specialized sub-agents
Related Documents
api-contracts
Defines request and response schemas for six API endpoints in a FastAPI ad optimizer backend.
Creative Strategy Reference
Summarizes 2025 Meta ad creative best practices: hook types, video specs, UGC, carousel strategy, copy formulas, and testing metrics.
Copy Hackers, Books 1-4
Distills Joanna Wiebe's four-book copywriting series into actionable tips for headlines, CTAs, formatting, and messaging strategy.
Bulletin for Friday, 09 Jan 2026
Lists 42 blog posts from 33 sources collected over a 7-day period, each with a title and link.