Inspiration

When I began the Google Cloud ADK Hackathon, my goal was simple: build a tool to solve my own pain points as a developer learning a new framework. I wanted an AI assistant that could do more than just fetch docs; I wanted a true collaborator.

A real development process isn't a single Q&A session. It's a stateful journey of analysis, research, architectural design, client feedback, code generation, and—most critically—rigorous quality assurance.

The "aha!" moment was realizing I couldn't build a single agent to do all that. I needed to architect a system. This is the story of Project Agora, a framework for creating and orchestrating hierarchical multi-agent systems, built on the Google Agent Development Kit (ADK).

What it does

Project Agora is a multi-agent AI system designed to act as an expert on the Google Agent Development Kit (ADK). It can:

  • Answer Complex Questions: Synthesize answers grounded in both official documentation (via Vertex AI RAG) and a historical database of solved problems (via BigQuery Vector Search).
  • Generate Complete ADK Projects: Take a single-sentence prompt and generate a fully scaffolded, multi-file agent application.
  • Design & Visualize Architectures: Before writing code, the system proposes a formal architecture and generates a visual diagram for user approval, ensuring alignment and preventing wasted effort.
  • Perform Automated QA: A dedicated code_reviewer_agent programmatically reviews all generated code against a formal style guide to ensure correctness and adherence to best practices.

How I built it

Project Agora implements a hierarchical agent topology with a central orchestrator_agent managing a team of six specialized sub-agents. Each sub-agent is wrapped in an ADK AgentTool, allowing the orchestrator to delegate complex tasks.

  1. Orchestration & State Management: The entire workflow is governed by a detailed prompt that turns the orchestrator_agent into a strict state machine. The application state, represented by a Pydantic SupportTicket model, is managed across turns to track the process from New to Analyzing to Resolved.

  2. Multi-Source RAG: The system’s knowledge is grounded in two parallel sources for comprehensive context:

    • knowledge_retrieval_agent: Uses the built-in VertexAiRagRetrieval tool on a corpus of the official ADK documentation scraped into Google Cloud Storage.
    • db_retrieval_agent: Executes a COSINE_DISTANCE vector search in BigQuery on a database of historical ticket embeddings.
  3. Dynamic Visualization & Code Generation: The code_generator_agent first outputs a plan in JSON, including Mermaid syntax. A custom tool then uses Playwright to render this syntax into a PNG, which is uploaded to a GCS bucket and presented to the user as a public URL.

  4. Automated Quality Gates: The code_reviewer_agent is a stateless LlmAgent with a strict prompt that includes the project's style guide. It takes the generated code as input and outputs a JSON object with a status of "approved" or "rejected" (with corrected code), creating a reliable quality gate.

  5. One-Command Setup: To handle the complex backend, I wrote a master setup_environment.sh script that automates the provisioning of the GCS bucket, the BigQuery dataset and table, and the Vertex AI RAG Corpus, making the entire system easily reproducible.

Challenges I ran into

  • Prompt-Driven State Machine: Engineering the orchestrator's prompt to be a truly robust, multi-state machine that waits for user input was a significant challenge. It required dozens of iterations to prevent the agent from "skipping ahead" and to ensure it handled both the code-generation and problem-solving branches correctly.
  • Mixing Tool Types: The Google Cloud API does not allow mixing the built-in VertexAiRagRetrieval tool with other custom tools in the same agent. I had to architect a solution where the RAG agent was isolated in its own sub-agent, which the orchestrator could then call as part of a larger, multi-tool workflow.

Accomplishments that I'm proud of

I'm incredibly proud of building a system that goes beyond a simple demo and represents a truly useful, end-to-end application. Specifically, the two feedback loops are major accomplishments:

  1. The User-Approval Loop: Having the agent generate a visual architecture diagram and wait for user sign-off is a huge step toward trustworthy and collaborative AI.
  2. The QA-Review Loop: The automated code review is the most innovative part of this project. It treats AI-generated code as a first draft that needs verification, making the final output far more reliable and production-ready.

What I learned

This project taught me that the real power of modern AI lies not in a single, monolithic model, but in the orchestration of multiple, specialized agents. The Google ADK proved to be the ideal tool for this, providing the perfect level of abstraction to build complex, stateful, and collaborative agentic systems.

What's next for Project Agora

Project Agora is designed as a domain-agnostic framework. The next step is to create industry-specific implementations. By swapping the knowledge base and agent prompts, it could be retasked to automate financial reporting, legal research, or marketing campaign creation. I'm also excited about adding deeper integrations, particularly with GitHub for automated CI/CD pipeline management.

Built With

Share this project:

Updates