Inspiration

The core problem FloraOS addresses is the inefficient and suboptimal manual management of urban garden environmental systems, which involves monitoring diverse and dynamic data like soil conditions, weather, and plant health, and then coordinating actions such as watering and nutrient delivery. The project aims to build an impressive multi-agent system using the Agent Development Kit (ADK) to automate urban garden management, showcasing complex process automation in an environmental context. FloraOS envisions intelligent, autonomous management of a simulated urban garden environment by leveraging Google Cloud for advanced perception and data handling.

What it does

FloraOS, or the Smart Garden Automation System, is an intelligent platform designed to simplify urban garden management. It functions as an ADK-powered multi-agent system providing actionable insights for gardeners by coordinating environmental data.

The system comprises four distinct agents orchestrated by ADK, acting as the central nervous system:

SoilSensorAgent: Simulates reading soil sensor data (e.g., moisture, pH, nutrient levels like NPK). It generates or reads from a predefined dataset and publishes structured soil data.

WeatherAgent: Fetches current weather conditions and short-term forecast data, utilizing public APIs like OpenWeatherMap, and publishes structured weather data including temperature, humidity, precipitation probability, and UV index.

PlantVisionAgent: Analyzes simulated images of plants to assess their health status (e.g., healthy, wilting, nutrient deficient, pest infestation). It leverages Google Cloud's Vertex AI Vision API for image classification. This agent acts as a specialized "data scientist" for visual plant health assessment.

GardenControlAgent: Serves as the "brain" or master agent. It subscribes to data from the SoilSensor, Weather, and PlantVision agents, applies rule-based decision logic, and publishes simulated actuation commands (e.g., "ACTIVATE_WATERING" or "DEPLOY_NUTRIENT_MIX_B"). This agent acts as the "AI Strategist," consuming insights from the specialized data agents to make decisions.

The system responds to user queries, typically requiring latitude and longitude coordinates, through a command-line interface, delivering insights in JSON format for easy integration with automation systems.

How we built it

FloraOS was built as an ADK-powered multi-agent system, emphasizing clear message schemas and topics for inter-agent communication via ADK. The development followed principles of MVP (Minimum Viable Product) first, focusing on the core loop of "Soil + Weather + Vision → Control → Action (simulated)". Other principles included parallel development, frequent integration, simulating first before complex Google Cloud Platform (GCP) hookups, and a focus on demonstrating ADK orchestration.

Key technologies and components used include:

Google ADK: The central orchestration framework for the multi-agent system.

Google Cloud Vertex AI Vision API: Utilized by the PlantVisionAgent for image analysis and classifying plant health states. This involves setting up a custom image classification model or using a pre-built one. The process involves data preparation (organizing images into classes like "healthy," "needs_water," "nutrient_deficient"), uploading data to Google Cloud Storage, creating a Vertex AI dataset, and training a custom image classification model with AutoML.

OpenWeatherMap API: Used by the WeatherAgent to fetch real-time weather forecasts.

Simulated Soil Data: The SoilSensorAgent currently simulates soil data, with a recommendation to integrate a real soil data API for production use.

Python 3.7+: The primary programming environment.

Libraries: requests and geopy are used for API calls and geocoding.

The codebase is organized modularly with distinct folders for each agent (GardenControlAgent, SoilSensorAgent, WeatherAgent) within an agents/ directory structure. Environment variables for API keys are stored in .env files.

Challenges we ran into

During development, several challenges were identified and addressed:

ADK Learning Curve / Integration Issues: Mitigated by starting with an ADK "Hello World" early and having the Software Engineer focus on setup, while keeping agent logic simple initially.

Vertex AI Model Setup/Training Time/Performance: The AI/ML Engineer prioritized this, with a fallback plan of simulated or hardcoded PlantVisionAgent output if setup became a blocker. The team started with very few image classes and samples, exploring pre-built models first.

Team Blockages: Addressed through daily quick stand-ups, clear task ownership, and encouraging early requests for help.

Over-scoping / Running out of time: Mitigated by ruthlessly prioritizing the MVP. WeatherAgent Limitations: The free OpenWeatherMap API (data/2.5/weather) lacks UV index and precipitation probability. Full functionality requires the paid One Call API (data/3.0/onecall).

SoilSensorAgent Limitations: Currently simulates soil data via Google Search; integrating a real soil data API (e.g., USDA Soil Survey) is recommended for production use.

Coordinate Requirements: Both sub-agents require valid latitude/longitude coordinates, as invalid or missing coordinates will prompt for correct input, and city names are not supported.

API Errors: Troubleshooting involves ensuring the OPENWEATHER_API_KEY is set correctly in the .env file.

Geocoding Issues: If geopy times out, checking internet connection or increasing the timeout in get_location_from_lat_long is suggested.

Model Compatibility and Cloud Quotas: For Vertex AI, verifying model format compatibility and checking/requesting increases in Cloud Quotas if necessary were noted challenges.

Accomplishments that we're proud of

We are proud of several key accomplishments with FloraOS:

Multi-Agent Orchestration: Successfully building an impressive multi-agent system using ADK to automate urban garden management, demonstrating complex process automation. The demo explicitly shows messages being passed and the GardenControlAgent reacting to combined inputs.

Intelligent Automation: Applying sophisticated multi-agent automation, typically seen in robotics or complex IT workflows, to a biological/environmental system like urban gardening. Machine Vision Integration: Successfully integrating machine vision (Vertex AI) for direct environmental assessment (plant health) within the automated loop. This showcases leveraging advanced AI capabilities within an agent workflow.

Modular and Maintainable Codebase: The codebase is organized in a modular structure for clarity and maintainability. Actionable Insights: The system provides actionable insights for gardeners by coordinating weather and soil health data, and delivering responses in structured JSON format for easy integration.

What we learned

The development of FloraOS provided significant learning opportunities:

ADK Expertise: Gained practical experience with Google's Agent Development Kit, understanding its role as a central nervous system for orchestrating intelligent agents.

Google Cloud Integration: Learned how to integrate advanced Google Cloud capabilities, specifically Vertex AI, for machine vision and image classification within an agent workflow. This included data preparation, uploading to GCS, creating Vertex AI datasets, and training models using AutoML.

Multi-Agent System Design: Understood the complexities of designing and implementing a multi-agent system with distinct roles (SoilSensorAgent, WeatherAgent, PlantVisionAgent, GardenControlAgent) and inter-agent communication.

MVP Development: Reinforced the importance of focusing on a Minimum Viable Product (MVP) first to ensure core functionality before expanding, along with parallel development and frequent integration to avoid "big bang" issues.

Simulation for Development: Learned the value of getting agents working with simulated data/APIs initially before tackling complex external integrations.

Practical Limitations of Free APIs: Experienced firsthand the limitations of free API tiers (e.g., OpenWeatherMap's lack of UV index and precise precipitation probability) and the need for potential upgrades for full functionality.

Data Handling and Formatting: Learned the importance of defining clear message schemas and structured data outputs (JSON) for seamless inter-agent communication and external integration.

What's next for FloraOS: Autonomous Urban Garden Management System

The future of FloraOS involves several exciting developments:

Real-world Hardware Integration: While currently simulating IoT Core integration, a key next step is true hardware integration to connect with real soil sensors and actuation commands for watering and nutrient delivery. This would transform simulated actions into tangible control over a physical garden.

Enhanced Data Accuracy: Soil Data: Integrate a real soil data API (e.g., USDA Soil Survey) instead of relying on simulated data via Google Search for more precise soil health analysis.

Weather Data: Upgrade to the paid OpenWeatherMap One Call API (data/3.0/onecall) to obtain more accurate data, including UV index and precise precipitation probability.

Advanced Plant Vision: Further development of the PlantVisionAgent to refine its machine learning model for plant health classification, potentially incorporating more image classes and improving accuracy.

Expanded Decision Logic: Evolving the GardenControlAgent's rule-based decision logic to incorporate more complex scenarios and optimize garden management further. User Interface Enhancements: While currently command-line based, future iterations could explore more intuitive user interfaces for easier interaction and visualization of garden data.

Scalability and Application: Exploring the scalability and potential for real-world application of this sophisticated multi-agent automation system beyond simulated urban gardens. FloraOS aims to continue its evolution from an intelligent bloom into a fully autonomous and impactful solution for urban garden management, making sustainable and efficient gardening accessible to a wider audience.

Built With

Share this project:

Updates