Build a Software Dev Team with AI

Orchestrate three AI agents to plan, code, and review software using Google ADK.

Introduction

30 Second Summary

Software teams spend most of their time on the same repeatable loop: plan the feature, write the code, review the code.

In this project, you will build a team of three AI agents that handle this entire loop automatically, taking a feature request and producing planned, coded, and reviewed software using Google ADK and Gemini.

What You'll Build

A multi-agent software development pipeline powered by three specialized AI agents, orchestrated through Google ADK's SequentialAgent.

By the end of this project, you'll have:

  • A Planner Agent that breaks down feature requests into structured implementation plans.
  • A Coder Agent with a custom tool that writes real code and saves files to disk.
  • A Reviewer Agent that produces detailed code reviews covering bugs, security, and best practices.
  • A parallel review system where a Security Reviewer and a Style Reviewer run at the same time using ParallelAgent.

Set Up Your Development Environment

Before your AI agents can start collaborating, you need a working Python environment with Google ADK installed. ADK is Google's framework for building AI agents powered by Gemini. In this step, you'll install Python, set up a virtual environment, and scaffold your agent project.

In This Step, Get Ready To:
  • Install Python and VS Code on your machine.
  • Create a project folder with a virtual environment.
  • Install Google ADK and scaffold your agent project.
Install Python and VS Code

Google ADK requires Python 3.10 or later. You'll also need VS Code as your code editor.

  • Download and install Python 3.10+ from python.org if you don't already have it installed.
  • Open a terminal and verify your installation.

macOS

python3 --version

Windows

python --version

I see a version number

You should see something like Python 3.12.x (or any version 3.10 or higher). You're good to go.

Command not found

If you see "command not found" or a version below 3.10, download the latest version from python.org and run the installer again.

Still seeing an old version?

On macOS, the system Python is often outdated. Make sure you're running python3 instead of python. On Windows, make sure you checked "Add Python to PATH" during installation. Help me troubleshoot my Python installation.

  • Download and install VS Code from code.visualstudio.com.
  • Open VS Code and click the Extensions icon in the left sidebar.
  • Search for Python and click Install on the official Microsoft Python extension.
Create a Project Folder and Virtual Environment

A virtual environment is an isolated space for your project's Python packages. This keeps your ADK installation separate from other Python projects on your machine.

  • Open a terminal and create a new project folder.
mkdir dev-team-agents && cd dev-team-agents
  • Create a virtual environment inside this folder.

macOS

python3 -m venv .venv

Windows

python -m venv .venv
  • Activate the virtual environment.

macOS

source .venv/bin/activate

Windows

.venv\Scripts\Activate.ps1

Pro tip: using CMD instead?

If you're using Command Prompt instead of PowerShell, run .venv\Scripts\activate.bat instead.

You'll know the virtual environment is active when you see (.venv) at the beginning of your terminal prompt.

Why use a virtual environment?

Without a virtual environment, installing packages with pip puts them in your global Python installation. This can cause version conflicts between projects. A virtual environment gives each project its own isolated set of packages.

Install Google ADK and Scaffold the Agent Project

Google ADK comes with a CLI tool that installs the framework and scaffolds new agent projects for you. One command creates all the files you need.

  • Install Google ADK using pip.
pip install google-adk

What does this command do?

This installs the google-adk package and all its dependencies into your virtual environment. It also gives you the adk command-line tool for creating, running, and testing agents.

  • Scaffold a new agent project called dev_team.
adk create dev_team

This creates a dev_team/ folder with three files: agent.py, .env, and __init__.py. You'll write all your agent code in agent.py.

  • Open the .env file inside the dev_team/ folder.
  • Set your Google AI Studio API key by replacing your-api-key-here with your actual key.
GOOGLE_API_KEY="your-api-key-here"

Where do I find my API key?

You can get a free API key from Google AI Studio. Copy the key and paste it between the quotes, replacing your-api-key-here. The Gemini API free tier is all you need for this project.

  • Open the entire dev-team-agents folder in VS Code by selecting File, then Open Folder.

Your project structure should look like this:

dev-team-agents/
  .venv/
  dev_team/
    __init__.py
    agent.py
    .env

Your development environment is ready. Next up, you'll build the first agent on your team: the Planner.

Build the Planner Agent

Every software project starts with a plan. Your first agent will act as a senior software architect, taking a vague feature request and turning it into a structured implementation plan. This plan gets saved to shared session state so the other agents can read it later.

In This Step, Get Ready To:
  • Define the Planner Agent with a system instruction and output_key.
  • Test the Planner Agent in ADK's built-in browser UI.
Define the Planner Agent in agent.py

An Agent in Google ADK is mostly configuration. You give it a name, a model, and an instruction that tells it how to behave. The output_key parameter is what makes multi-agent collaboration possible. When you set output_key="plan", ADK automatically saves the agent's final text output to session.state["plan"]. Later agents can read this value by referencing {plan} in their instructions.

  • Open dev_team/agent.py in VS Code.
  • Replace all the generated code with the following:
from google.adk.agents import Agent

planner_agent = Agent(
    name="planner",
    model="gemini-2.5-flash",
    instruction="""You are a senior software architect. When given a feature request:
1. Break it down into clear implementation steps.
2. List the key technical decisions (frameworks, libraries, data structures).
3. Output a structured plan with numbered steps that a developer can follow.

Be specific and practical. Include file names and function signatures where appropriate.""",
    output_key="plan",
)

# ADK looks for this specific variable name
root_agent = planner_agent

What does this code do?

This defines a single agent with four key properties:

  • name identifies the agent in logs and the browser UI.
  • model sets which Gemini model powers the agent.
  • instruction is the system prompt that shapes the agent's behavior.
  • output_key saves the agent's response to shared session state under the key "plan".

The root_agent variable is required by ADK. It tells the framework which agent to run when you launch the project.

Test the Planner Agent in the Browser

ADK includes a built-in browser UI that lets you chat with your agents and inspect their outputs. You need to run the adk web command from the parent directory that contains your dev_team/ folder.

  • Make sure you are in the dev-team-agents directory (the parent of dev_team/).
  • Run the following command:
adk web --port 8000
  • Open http://localhost:8000 in your browser.
  • Select dev_team from the agent dropdown at the top left.
  • Type the following feature request into the chat:
Build a REST API for a to-do list app with CRUD operations

What should I see?

The Planner Agent responds with a structured implementation plan. It should include numbered steps, technical decisions like which framework to use, and specific file names or function signatures. The plan is detailed enough that a developer (or another agent) could follow it to build the feature.

  • Stop the server with Ctrl+C when you are done reviewing the output.

Seeing an error when you run adk web?

Make sure your virtual environment is activated. You should see (.venv) at the beginning of your terminal prompt. Also double-check that your GOOGLE_API_KEY is correctly set in dev_team/.env. Help me debug this error.

Your Planner Agent is working and saving its output to shared state. Next up, you will build the Coder Agent that reads this plan and writes actual code files to disk.

Build the Coder Agent with a File-Saving Tool

Your Planner Agent can break down feature requests into structured plans. Now you need an agent that can actually write the code. The Coder Agent will read the plan from shared session state and produce working code files. To make the Coder truly useful, you will also give it a custom tool that saves files directly to disk.

In This Step, Get Ready To:
  • Create a custom file-saving tool that writes code to disk.
  • Define the Coder Agent with access to the Planner's output and the file-saving tool.
  • Test the Coder Agent standalone to verify it writes and saves code.
Create the File-Saving Tool

ADK tools are plain Python functions that give agents the ability to interact with the outside world. ADK uses the function's docstring to understand when and how to call the tool. Without a tool, the Coder Agent can only generate text. With a file-saving tool, it can actually write code files to your computer.

  • Open dev_team/agent.py in VS Code.
  • Add import os at the top of the file, alongside your existing imports.
  • Add the following save_file function above your Planner Agent definition.
import os
from google.adk.agents import Agent

def save_file(filename: str, content: str) -> dict:
    """Save content to a file in the output directory.

    Use this tool to save code files to disk. Provide the filename
    (e.g., 'app.py') and the full file content as a string.
    """
    os.makedirs("output", exist_ok=True)
    file_path = os.path.join("output", filename)
    with open(file_path, "w") as f:
        f.write(content)
    return {"status": "success", "file_path": file_path}

What does this code do?

The save_file function creates an output/ directory if it does not already exist, then writes the content to a file inside it. The function returns a dictionary with the status and file path so the agent knows the save succeeded.

The detailed docstring is critical. ADK reads it to understand what the tool does and when the agent should call it. A vague docstring means the agent will not know when to use the tool.

Define the Coder Agent

The Coder Agent needs to do two things: read the Planner's output from shared state, and use the save_file tool to write files. The {plan} placeholder in the instruction references the output_key that the Planner Agent set in the previous step.

  • Add the following coder_agent definition below the planner_agent in agent.py.
coder_agent = Agent(
    name="coder",
    model="gemini-2.5-flash",
    instruction="""You are an expert software developer.

Read the implementation plan below and write clean, well-documented code
that follows the plan exactly.

Implementation plan:
{plan}

For each file you write, use the save_file tool to save it to disk.
Include clear comments in your code explaining what each section does.""",
    tools=[save_file],
    output_key="code",
)

How does the Coder read the Planner's output?

When the Planner Agent runs, its output_key="plan" setting automatically saves its final text output to session.state["plan"]. ADK's instruction processor then replaces {plan} in the Coder's instruction with the actual plan content. This is how agents communicate in a SequentialAgent pipeline.

Why does the Coder also have an output_key?

Setting output_key="code" saves the Coder's final text output to shared state under the key code. The Reviewer Agent you will build next will read from {code} to review what the Coder wrote. Each agent in the chain passes its output forward through state.

Test the Coder Agent Standalone

Before wiring the Coder into the full pipeline, you can test it on its own to make sure the tool works correctly. You will temporarily set it as the root_agent and give it a simple task directly.

  • Temporarily set root_agent = coder_agent at the bottom of agent.py.
  • From the parent directory (the one containing dev_team/), run the dev server.
adk web --port 8000
  • Open http://localhost:8000 in your browser.
  • Select the agent from the dropdown at the top left.
  • Type a simple request like: "Create a Python file called hello.py that prints Hello World".

You should see the Coder Agent generate code and call the save_file tool. The tool call will appear in the browser UI as a separate step in the conversation.

  • Check the output/ folder in your project directory to verify the file was saved.
  • Stop the server with Ctrl+C when done.

Pro tip: check the output folder

The output/ folder is created relative to where you ran adk web, not inside the dev_team/ folder. Look for it in your parent project directory.

Tool not being called?

If the Coder Agent generates code but never calls save_file, check that your function has a detailed docstring. ADK relies on the docstring to understand when to use the tool. Also verify that tools=[save_file] is included in the agent definition. Help me debug my tool setup.

Your Coder Agent can now read plans and write real code files. Next up, you will build the Reviewer Agent that reads the Coder's output and catches bugs before they ship.

Build the Reviewer Agent

Your Planner produces a structured plan, and your Coder turns that plan into real code saved to disk. But how do you know the code is any good? In a real development team, every piece of code goes through a review before it ships. Your third agent handles exactly that.

In This Step, Get Ready To:
  • Define a Reviewer Agent that reads generated code from shared session state.
  • Verify that all three agents are properly configured with distinct output_key values.
Define the Reviewer Agent

The Reviewer Agent reads the code that the Coder saved to shared session state and produces a structured code review. It references the Coder's output using {code} in its instruction. Google ADK automatically resolves this placeholder from the session state key set by the Coder's output_key.

  • Open dev_team/agent.py in VS Code.
  • Add the following reviewer_agent definition below your coder_agent:
reviewer_agent = Agent(
    name="reviewer",
    model="gemini-2.5-flash",
    instruction="""You are a senior code reviewer. Review the following code carefully:

{code}

Provide a structured review covering:
1. Correctness and logic bugs
2. Security vulnerabilities
3. Code style and best practices
4. Suggestions for improvement

Be specific and reference line numbers or function names where possible.""",
    output_key="review",
)

What does this code do?

The {code} placeholder in the instruction pulls in whatever the Coder Agent saved to session state under the key code. ADK's instruction processor handles this substitution automatically.

Setting output_key="review" saves the Reviewer's final output to session.state["review"]. Any future agent in the pipeline could reference {review} to read the review results.

Verify All Three Agents Are Defined

Before wiring the agents into a pipeline, confirm that all three agents are properly set up with distinct output_key values. Each key must be unique so that agents do not overwrite each other's work in shared session state.

  • Scroll through agent.py and confirm you have these three agents defined:
  • Confirm the save_file tool function is defined above the agent definitions and listed in the Coder's tools parameter.

Why do the output_key values matter?

Each output_key creates a named slot in the shared session state. The Planner writes to plan, the Coder writes to code, and the Reviewer writes to review. If two agents used the same key, the second one would overwrite the first agent's output.

All three agents are ready. In the next step, you will wire them together into a SequentialAgent pipeline so they execute one after another automatically.

Connect the Agents with SequentialAgent

You have three agents that each do their job well in isolation. The Planner produces a plan, the Coder writes code, and the Reviewer critiques it. But right now, they don't know about each other. You need a way to wire them into a single pipeline where one agent's output automatically feeds into the next.

Google ADK's SequentialAgent does exactly this. It takes a list of sub-agents and runs them in order, passing data between them through shared session state. Each agent's output_key saves its final output to state, and the next agent reads it using {key_name} in its instruction.

In This Step, Get Ready To:
  • Import and configure a SequentialAgent to connect all three agents into a pipeline.
  • Run the full pipeline and watch all three agents collaborate on a feature request.
  • Inspect the results to see how shared session state connects each agent's work.
Import SequentialAgent and Create the Pipeline

A SequentialAgent provides deterministic execution order. The Planner always runs first, then the Coder, then the Reviewer. There is no risk of the LLM routing to the wrong agent or skipping a step. This makes the pipeline predictable and easy to debug.

  • Open dev_team/agent.py in VS Code.
  • Update your import statement at the top of the file to include SequentialAgent:
from google.adk.agents import Agent, SequentialAgent
  • Replace any temporary root_agent assignment at the bottom of the file with the SequentialAgent pipeline:
root_agent = SequentialAgent(
    name="dev_team_pipeline",
    sub_agents=[planner_agent, coder_agent, reviewer_agent]
)

What does this code do?

The SequentialAgent takes a list of sub_agents and runs them in the exact order you provide. First planner_agent runs and saves its output to session.state["plan"]. Then coder_agent reads {plan} from state and saves its output to session.state["code"]. Finally reviewer_agent reads {code} and produces the review.

The variable name root_agent is required by ADK. It looks for this specific variable to know which agent to run.

Why SequentialAgent Instead of LLM-Driven Delegation?

ADK also supports LLM-driven delegation, where one agent decides which agent to hand off to next. That approach is powerful for open-ended tasks, but it adds unpredictability. The LLM might route to the wrong agent or skip a step entirely.

A software development pipeline has a clear, fixed order: plan, then code, then review. SequentialAgent guarantees that order every time, making it easier to debug and more reliable in production.

Run the Full Pipeline
  • Make sure you are in the parent directory (the one containing the dev_team/ folder), not inside dev_team/ itself.
  • Run the ADK web server:
adk web --port 8000
  • Open http://localhost:8000 in your browser.
  • Select the agent from the dropdown at the top left.
  • Type the following feature request into the chat:
Build a Python REST API for a to-do list app with endpoints for creating, reading, updating, and deleting tasks. Use Flask.

Now watch all three agents execute in sequence. The Planner produces a structured implementation plan. The Coder reads that plan, writes the code, and saves files to disk. The Reviewer reads the generated code and delivers a detailed code review.

What should I see?

In the browser UI, you should see three distinct sections of output. The first section is the Planner's implementation plan with technical decisions and step-by-step tasks. The second section is the Coder's code output, including tool calls to save_file. The third section is the Reviewer's code review covering correctness, security, and best practices.

The full pipeline may take 30-60 seconds to complete since each agent makes its own API call to Gemini.

Seeing an Error About root_agent?

If you see an error like root_agent not found, make sure the variable is named exactly root_agent (not agent or pipeline). Also confirm you are running adk web from the parent directory, not from inside dev_team/. Help me debug this error.

Inspect the Results

The pipeline has finished, but the real learning is in understanding how the agents communicated. Each agent wrote to a different key in shared session state, and the next agent read from it.

  • Read through each agent's output in the browser UI. Notice how the Coder's code follows the Planner's plan, and the Reviewer's feedback references the Coder's implementation.
  • Check the output/ folder in your project directory for the saved code files.
  • Stop the server with Ctrl+C when you are done exploring.

How Does Shared Session State Work?

When an agent has output_key="plan", its final text output is automatically saved to session.state["plan"]. The next agent references this value by using {plan} in its instruction string. ADK's instruction processor automatically replaces {plan} with the actual plan content from state.

This is why each agent's output_key must be unique. If two agents used the same key, one would overwrite the other's output.

Your multi-agent development team is fully operational. Three AI agents now collaborate automatically on any feature request you throw at them. Next up, you will take this pipeline further with a secret mission that adds parallel code reviews.

Secret mission

Add Parallel Code Reviews with ParallelAgent

Your pipeline runs reviews one at a time. But in real engineering teams, security reviews and style reviews happen simultaneously. Can you upgrade your pipeline to run two specialized reviewers in parallel, then combine their findings into a single report?

Before you go

Clean Up Your Resources

This project runs entirely locally using the Gemini API free tier, so there are no ongoing costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.

Resources you used:

  • Python virtual environment (.venv folder inside dev-team-agents/).
  • Google ADK agent project (dev_team/ folder with agent.py, .env, __init__.py).
  • Generated code files in the output/ folder.
  • Google AI Studio API key (stored in dev_team/.env).

Keep everything running

No action needed. Choose this if you are still actively building or want to extend the pipeline with more agents.

  • Your project files, virtual environment, and API key stay in place.
  • You can restart the ADK web UI anytime by activating your virtual environment and running adk web --port 8000 from the parent directory.
  • The Gemini API free tier does not charge for usage, so there are no costs while your project sits idle.

Pause - I'll come back to this later

Shut down running processes to free up memory. Your project files stay on disk so you can pick up where you left off.

  • Stop the ADK web server if it is still running by pressing Ctrl+C in your terminal.
  • Deactivate your virtual environment by running deactivate in your terminal.
  • To resume later, navigate back to your dev-team-agents folder, reactivate the virtual environment, and run adk web --port 8000.

Delete - I don't want to use this again

Remove all project resources and start fresh. This cannot be undone.

  • Stop the ADK web server if it is still running by pressing Ctrl+C.
  • Deactivate your virtual environment by running deactivate.
  • Delete the entire project folder by running rm -rf dev-team-agents (macOS/Linux) or deleting the dev-team-agents folder from File Explorer (Windows).
  • If you want to revoke your API key, go to Google AI Studio and delete the key you created for this project.

Mission accomplished

That's a Wrap!

Nice work! You just built a fully functional software development team powered by AI agents. Give a feature request to your pipeline, and three specialized agents collaborate to plan, code, and review the result automatically.

Here's what you learned:

  • Built three specialized agents (Planner, Coder, and Reviewer) that communicate through shared session state and output_key.
  • Created a custom save_file tool and wired it into the Coder Agent so it can write real code files to disk.
  • Connected all three agents into an automated pipeline using Google ADK's SequentialAgent, the most common production multi-agent pattern.
  • Added concurrent security and style reviews using ParallelAgent to fan out work and a Summary Agent to gather the results.

Ready to quiz yourself?