Inspiration

The inspiration for DevFlow.ai stems from the repetitive, time-consuming, and often bottleneck-inducing manual tasks inherent in Unity game development workflows. I envisioned a future where developers and artists could orchestrate complex game builds and asset integrations through intuitive natural language commands, eliminating the need to directly interact with intricate Git operations, Unity Editor configurations, or remote server management. The goal was to free up creative talent and accelerate iteration cycles by automating the mundane, making the development process more accessible and efficient. The Google ADK Hackathon provided the perfect platform to bring this vision to life

What it does

DevFlow.ai is an AI-powered multi-agent system designed to automate Unity game development tasks via a natural language interface. Users simply type commands like "Build the latest version of the game on main" or "I want to preview the new potion 3D model in the game," and DevFlow.ai intelligently handles the rest. It orchestrates headless Unity builds in a remote cloud environment, manages Git operations (including specific branch and commit targeting), generates Unity asset bundles for rapid preview, and provides real-time build status updates and caching. For artists, it introduces an innovative cloud asset pipeline allowing them to quickly preview new .glb models in the game without manual engine interaction or full game rebuilds.

How I built it

DevFlow.ai was built by leveraging a powerful combination of Google technologies and industry-standard tools:

  • Google Agent Development Kit (ADK) & Gemini Model: The core intelligence and orchestration are powered by ADK, utilizing the Gemini model via Vertex AI for natural language understanding and complex query resolution. A root agent (Unity Automation Orchestrator) delegates tasks to specialized sub-agents: a version control agent, a build orchestration agent, and an asset orchestration agent.
  • Python: Served as the primary scripting language for building the ADK agents, managing Git interactions on the client side, and handling cloud interactions. I also wrote a Python Pub/Sub listener that is spun up as a subprocess of the main ADK agent.
  • Unity Editor (Batchmode): I developed custom build scripts in C# to enable headless, command-line driven builds for both full games and specific asset bundles (e.g., .glb files). I also built a simple demo game with support for a character controller and runtime asset bundle loading.
  • PowerShell & NSSM: A PowerShell script runs as a persistent Windows Service (managed by NSSM) on the GCE VM, continuously listening for Pub/Sub messages and executing Unity build commands. The service also triggers git commands to point the Unity project repository at the requested commit, compresses and uploads build artifacts to GCS, downloads user-shared .glb files from GCS as part of the asset pipeline, and sends out build status notifications via Pub/Sub.
  • Google Cloud Platform (GCP):

    • Compute Engine (Windows VM): A dedicated Windows Server VM hosts the Unity Editor and Git, acting as the remote build environment.
    • Cloud Run: The ADK multi-agent application was built into a Docker container and deployed as a scalable, serverless container on Cloud Run.
    • Pub/Sub: Used as a real-time messaging bus to communicate between the ADK agents and the remote Windows VM listener, triggering builds and sending notifications.
    • Cloud Storage (GCS): Serves as the central repository for storing build artifacts, cached builds, and user-uploaded asset files, with signed URL generation for secure access.
    • Vertex AI: Provides the underlying infrastructure and services for the Gemini model.
  • Git / GitHub: Integrated for comprehensive version control, allowing agents to pull specific branches and commits. Requested commits are verified on the Python side via the version control ADK agent, and again on the Windows VM before running the git checkout command.

  • ADK Web Frontend: Leveraged ADK's built-in web interface, enhanced with a custom Build Status Tracker for real-time user notifications. Additions to existing google-adk library made in JavaScript, HTML/CSS.

Challenges I ran into

  • Unity Editor Licensing on GCE: Successfully enabling headless Unity builds on a cloud VM required significant configuration and troubleshooting.
  • Windows Service Robustness: Building a reliable PowerShell script that could run continuously as a Windows Service (using NSSM, the Non-Sucking Service Manager) and handle Pub/Sub message decoding, argument parsing, and command execution proved complex, requiring careful debugging of gcloud commands and string manipulations.
  • Natural Language Precision: Accurately translating complex natural language queries (e.g., "Build the game in test mode on main at commit...") into precise Git operations and Unity commands, including intelligent commit log validation and "latest commit" resolution, proved difficult.
  • GCS Authentication & Caching: Implementing seamless and secure caching of Unity builds in GCS, along with generating signed URLs for downloads, involved overcoming authentication complexities and pathing issues (so many pathing issues).
  • Asset Pipeline Integration: The Artist Pipeline stretch goal required a nuanced approach to asset handling, ensuring user-uploaded .glb files were temporarily placed, processed into Unity Asset Bundles, uploaded to GCS, and made loadable by a running game without polluting the main Git repo or requiring full game rebuilds.
  • ADK Library Modification: To add UI components to the web frontend that comes packaged with ADK, I had to make a copy of the ADK library specifically for my project. However, my Docker container kept defaulting to the ADK package in my requirements.txt, so I had to do a bit of unloading and reloading of packages and environment variables in my Dockerfile.

What I learned

  • Google ADK: Gained hands-on expertise in designing, building, and deploying multi-agent systems with ADK and the Gemini model.
  • Advanced Unity Automation: Mastered headless Unity builds, asset bundle generation, and dynamic build scripting.
  • Cloud Infrastructure for GameDev: Learned practical deployment and management of Unity build pipelines on Google Cloud Platform (GCE, Pub/Sub, GCS, Cloud Run).
  • Robust Windows Service Development: Acquired skills in creating and troubleshooting persistent background services on Windows using PowerShell and NSSM.
  • Complex System Integration: Understood the intricacies of integrating disparate systems (AI agents, Git, Unity Editor, cloud services) into a cohesive, automated workflow.
  • Problem-Solving for Edge Cases: Experienced and resolved numerous real-world challenges related to file permissions, network access, environment variables, and authentication in automated cloud environments.

What's next for DevFlow.ai

I'd like to add more natural language integration with Git, so that prompts like "Build Sarah's latest changes" will work. I'd also like to experiment more with workflow agents and see if I can get my Pub/Sub listener in the ADK app running in a more agentic way. It would be ideal if I could get it to respond to the incoming build notifications and start the process of generating signed download urls on its own. Thirdly, I want to invest additional time into writing test suites and adding better support for edges cases like build failures, lost messages, and invalid GCS pathing.

Built With

Share this project:

Updates