Menu

Technologist, gamer, and dad.

"Building smart things with AI and telling stories with code."

Index
#ai-agents #gemini #google-cloud #hackathon #adk #multi-agent-systems

Building a Fashion AI Agent in 3 Hours

Luis Sala
Luis Sala
Sep 15, 2025 7 min read
Building a Fashion AI Agent in 3 Hours

What happens when you give a team of developers 3 hours to build an AI agent from scratch? Chaos, creativity, and surprisingly functional software.

I recently participated in Google Cloud’s AI Agent Bake-Off, a hackathon-style challenge where we tackled a real problem in fashion e-commerce: the “imagination gap.” Online shoppers struggle to visualize how clothes will actually look on them, leading to abandoned carts and costly returns. Our mission was to build an AI agent that could bridge that gap.

The Challenge

The prompt was ambitious: “Can you build an AI agent that helps people see themselves in clothes they want, providing a more fulfilling shopping experience and minimizing the global impact of returns?”

We had access to Google Cloud’s cutting-edge AI toolkit:

  • Gemini — Google’s flagship multimodal model for natural language understanding, reasoning, and generation
  • Agent Development Kit (ADK) — An open-source framework for orchestrating multi-agent workflows
  • Imagen — For photorealistic image generation and manipulation
  • Veo — For video generation (imagine seeing yourself walk down a virtual runway)
  • Vertex AI — The underlying infrastructure tying it all together

Three hours. A blank canvas. Let’s go.

What We Built

Our Fashion AI Agent became a personal wardrobe concierge with three core capabilities:

1. Closet Cataloging
Users could photograph their existing wardrobe and have the AI automatically catalog each item—identifying garment type, color, style, and even suggesting occasions where it might work. The agent used Gemini’s vision capabilities to understand clothing at a granular level: Is this a casual Oxford or a dress shirt? Cotton or linen? The kind of distinctions that matter when building outfits.

2. Virtual Try-On
Here’s where Imagen shined. Users could upload a photo of themselves and see how different clothing combinations might look. The underlying technology understands how different fabrics drape, fold, and stretch across different body types—the same approach Google later rolled out in their Shopping try-on feature.

3. The Unworn Clothes Problem
We’ve all got items languishing in the back of our closets. The agent tracked what you’ve worn (based on what you tell it) and proactively suggested combinations featuring neglected pieces. “You haven’t worn that blue blazer in 47 days—here are three outfits that could bring it back into rotation.”

How ADK Made Multi-Agent Orchestration Possible

The most interesting architectural decision was moving from a single monolithic agent to a multi-agent system. This is where ADK proved invaluable.

The Problem with Single Agents

An early prototype tried to do everything in one agent: understand the user’s request, analyze their wardrobe, generate outfit recommendations, and handle the virtual try-on. It worked, but it was slow, inconsistent, and hard to debug. When something went wrong, we couldn’t tell which part of the reasoning had failed.

Enter Multi-Agent Architecture

ADK provides three workflow primitives that became our building blocks:

  • SequentialAgent — Executes sub-agents in a fixed order, like an assembly line
  • ParallelAgent — Runs multiple agents simultaneously, then aggregates results
  • LoopAgent — Repeats execution until a termination condition is met

We ended up using all three.

The Recommender-Critic Pattern

The architecture that emerged was what I’d call a “recommender-critic” pattern. Here’s how I described it during the event:

“We have a recommender that would then be critiqued by a separate agent, and they would effectively have a back and forth conversation, and only the top recommendations would make it through to the user.”

In practice, this meant:

  1. Recommender Agent — Generated outfit suggestions based on the user’s closet, stated preferences, and occasion
  2. Critic Agent — Evaluated each recommendation against style guidelines, color theory, and the user’s historical preferences
  3. LoopAgent wrapper — Allowed the recommender and critic to iterate until the recommendations met a quality threshold

This separation of concerns made each agent simpler to build and debug. The recommender could be creative and prolific; the critic could be strict and analytical. Neither needed to be good at both.

Parallel Processing for Speed

When a user asked for outfit suggestions, we didn’t want them waiting while we analyzed each garment sequentially. ADK’s ParallelAgent let us:

  • Analyze multiple closet items simultaneously
  • Generate several outfit options in parallel
  • Run style-check and occasion-appropriateness evaluations concurrently

The result was substantially faster response times than our sequential prototype—critical for a user experience that needed to feel snappy and conversational.

Shared Session State

One of ADK’s elegant features is how agents share context. All sub-agents within a workflow share the same session.state, which meant:

  • The closet-analysis agent could write item metadata to state
  • The recommender agent could read that metadata without re-analyzing
  • The critic agent could access both the recommendations and the original context

This avoided the anti-pattern of passing massive context blobs between agents and kept each agent focused on its specific task.

The Voice and Vision Experience

We made the interaction feel natural by combining Gemini’s multimodal capabilities:

  • Voice input — Users could describe what they were looking for conversationally: “I have a dinner date Saturday, something nice but not too formal”
  • Vision input — Snap a photo of a new piece at the store and ask “Would this work with what I already own?”
  • Visual output — See yourself in the suggested outfit, not just a text description

This multimodal loop—voice in, vision out, with natural language refinement—felt like the future of how we’ll interact with AI assistants.

Lessons Learned Under Pressure

Building under a three-hour constraint forces clarity. Some things that worked:

Start with the MVP, ruthlessly.
Our first working demo was embarrassingly simple: one agent that could recommend an outfit from a hardcoded closet. But it worked end-to-end in 45 minutes, giving us a foundation to build on.

Specialize your agents early.
The moment we split the monolithic agent into recommender and critic, debugging became tractable. When outfit suggestions were bland, we knew to tune the recommender. When obviously bad suggestions slipped through, we knew the critic needed work.

Parallel beats sequential when tasks are independent.
Analyzing a closet of 30 items sequentially took forever. Parallelizing that analysis was a simple change in ADK (swap SequentialAgent for ParallelAgent) but transformed the user experience.

Let agents argue.
The back-and-forth between recommender and critic produced better results than either agent alone. There’s something powerful about building disagreement into your system.

The Great Pants Crisis of Hour Two

About halfway through the hackathon, we hit an unexpected snag: our sample dataset was exclusively upper-body fashion. Shirts, blouses, jackets—plenty of options. But pants? Skirts? Shorts? Nothing. Zero bottom-ware.

This became a problem when we tried to demo a complete outfit recommendation. Our agent would confidently suggest “pair this navy blazer with…” and then awkwardly trail off, leaving users to imagine their own lower half.

So we did what any reasonable team would do under time pressure: we pivoted to AI-generated pants. We spent a solid chunk of our precious three hours prompting Imagen to generate realistic images of khakis, jeans, and dress pants that could populate our virtual closet. There’s something deeply humorous about a room full of engineers intensely debating whether the AI-generated chinos looked “business casual enough.”

The lesson? Always check your training data for completeness before the clock starts.

The Bigger Picture

This hackathon reinforced something I’ve been thinking about for a while: AI agents are the future of software interaction, but not in the “one super-intelligent agent does everything” sense. The power comes from composing specialized agents into systems that exhibit emergent capabilities none could achieve alone.

The fashion use case is just one example. The same patterns—recommender-critic loops, parallel analysis, sequential refinement pipelines—apply to:

  • Code review systems (generator, reviewer, refactorer)
  • Research assistants (searcher, analyzer, synthesizer)
  • Customer service (router, specialist, escalation handler)
  • Content creation (drafter, editor, fact-checker)

ADK makes these patterns accessible. You don’t need to build your own orchestration layer or figure out how agents should communicate. You declare the workflow structure, and ADK handles the execution.

Watch the Full Session

The entire bake-off was recorded. You can watch us build the agent in real-time, complete with the inevitable debugging sessions and “wait, why isn’t that working?” moments:

My fellow participants—Jigyasa Grover, Ivan Nardini, Sam Witteveen, Annie Wang, and Suriya Gnanasundar—brought diverse perspectives that made the collaboration genuinely fun. Special thanks to Ivan for his work on ADK and his patience explaining features I was learning on the fly.

Get Started with ADK

If you’re interested in building multi-agent systems, here’s where to start:

The barrier to building sophisticated AI agents has dropped dramatically. The question isn’t whether you can build multi-agent systems—it’s what problems you’ll solve with them.


Have questions about the Fashion AI Agent or ADK in general? Find me on BlueSky or LinkedIn.

End of file.

Share on: