Inspiration As conservation groups and climate researchers increasingly rely on autonomous AI agents to process IoT sensor data, monitor wildlife, and analyze climate models, a critical risk emerges: unsupervised AI. When an environmental agent silently leaks sensitive GPS coordinates of endangered species, burns through a non-profit's compute budget, or hallucinates bad climate data, nobody notices until the mission is compromised. I wanted to build the missing layer: an autonomous control plane whose entire job is watching these fleets, catching failures in real time, and handling the full incident-response loop with the strict governance that environmental operations require.

What it does Aegis is an autonomous supervisor agent that watches a fleet of production environmental AI agents and runs a complete incident-response loop on every failure:

Detect → Diagnose → Decide → Govern → Remediate → Report

Detect: A detector service classifies incoming fleet events (PII leaks like poaching-risk locations, tool failures, budget overruns) and files incidents in Firestore.

Diagnose: Gemini 3.5 Flash Lite (via Vertex AI) performs structured root-cause diagnosis with severity scoring.

Decide: A deterministic policy engine maps diagnosis to action, ensuring critical conservation decisions aren't left to LLM vibes.

Govern: High-impact actions pass a human-in-the-loop approval gate (AEGIS_AUTO_APPROVE), landing in an append-only Firestore audit trail.

Remediate: Aegis quarantines the offending agent to protect the data ecosystem.

Report: It writes a postmortem, and a reporting chatbot answers live stakeholder questions about incident metrics straight from Firestore.

How we built it Google ADK is the core orchestrator: an LlmAgent with typed tools that calls get_open_incidents → diagnose → decide_action → remediate → write_postmortem in a continuous loop.

Gemini 3.5 Flash Lite via Vertex AI powers structured root-cause diagnosis and the interactive reporting chatbot.

Cloud Run hosts three distinct microservices: the detector, supervisor (API), and dashboard.

Firestore holds incident state, the active quarantine list, and the immutable audit log.

Pub/Sub carries asynchronous fleet telemetry with a dead-letter topic for poison messages; Secret Manager securely handles enterprise credentials.

The system boasts 58/58 passing unit tests (pytest tests/ -v), ensuring the deterministic policy engine is rock-solid.

Challenges we ran into Auth reality check: The original architecture relied on a legacy Gemini API key, which could no longer be generated. The fix improved the enterprise security posture: migrating the diagnoser to Vertex AI utilizing strict service-account authentication.

Keeping the agent honest: It is tempting to let the LLM decide everything. I had to strictly separate concerns: using Gemini for judgment (diagnosis) but deterministic code for authority (policy execution and quarantine).

End-to-end timing: A real detect-to-remediate loop involves Pub/Sub latency, cold starts, and LLM reasoning. Choreographing a reliable, low-latency loop suitable for real-time environmental monitoring took careful engineering.

Accomplishments that we're proud of A genuinely autonomous, asynchronous control loop running entirely on real Google Cloud infrastructure.

The strict governance implementation: combining a one-variable human-in-the-loop gate with an append-only audit trail.

Building an agent that doesn't just chat, but reasons, plans, and invokes tools asynchronously to protect other software systems.

Shipping a complex, multi-service architecture (Detector, Supervisor, Dashboard) entirely solo.

What we learned How Google ADK's typed tool-calling transforms an LLM from a text generator into a reliable operator.

The exact boundary where model judgment ends and deterministic policy must take over to ensure system safety.

Practical Vertex AI service-account authentication from Cloud Run.

That observability and auditability aren't features you bolt on—for agents supervising agents, they are the entire product.

What's next for Aegis — AI Governor for Conservation Fleets Multi-fleet federation: One Aegis instance supervising several distinct conservation fleets across different global habitats and GCP regions.

Richer remediation playbooks: Expanding beyond quarantine to include automatic rollbacks, traffic shifting, and strict API budget throttling for non-profits.

Deeper Gemini Enterprise integration: An agent registry where new environmental monitoring agents are auto-enrolled for supervision upon deployment.

Proactive Anomaly Detection: Catching latency drift or cost anomalies in IoT processing fleets before hard failures occur.

Built With

Share this project:

Updates

Submission history