Inspiration

As a soccer fan, I've always found that building a fantasy team often felt clunky and time consuming, involving spreadsheets and manual research. I wanted to create an AI-powered experience where anyone casual or hardcore fan could build, understand, and visualize their dream team in a few friendly chat messages.

What it does

Fantasy Soccer Agent is a chat application that helps users create their ideal fantasy soccer team. The agent collects user preferences, recommends a lineup (using mock stats), explains its picks, and generates a visual team lineup using Google Imagen.

How I built it

I used Python for the backend agent logic, Google ADK for workflow orchestration, Google Imagen for image generation, and Google Cloud Storage to serve lineup images. The user interface is a lightweight web app. Player stats and recommendations are powered by mock data for a cost-effective demo. All user preferences and teams are stored in-memory for quick prototyping.

Challenges I ran into

Adapting prompts for the Sub Agents to maintain state and execute mutlie step tasks

Rendering AI-generated images on ADK Web interface

Setting custom state for the root and sub-agents using ADK Web

Having Root agent pass context to Sub Agents on multi leg user queries

Debugging internal failures like finish_reason":"MALFORMED_FUNCTION_CALL"

Adapting prompts for Google Imagen, which can struggle with specific player likenesses

Random failures with for Google Imagen model. No images get generated for the prompt that is sent

Accomplishments that I am proud of

Building a full conversational pipeline from preference collection to team visualization using Supervisor Agent Architecture

Successfully using Google Imagen to generate engaging team lineup images

Delivering a smooth demo experience with only open/free components and mock data

What I learned

No one standard prompting works. Structure the prompts well with instructions

When to use Sub-Agents as Tools , When not to use Sub-Agents as Tools

How to design AI workflows that blend conversation, reasoning, and visualization

What's next for Fantasy Soccer Agent

Integrate live player stats and news for real-time recommendations using https://www.api-football.com/

Add persistent user accounts and team histories using Google Big Query

Improve image realism and player likeness in visualizations

Expand to other sports and fantasy formats

Open source the platform and invite community contributions

Built With

Share this project:

Updates