Your fleet is ready for the stratosphere. Today you will containerize your Antigravity agents, push them to Cloud Run, and set up monitoring so you know if an agent unexpectedly lands.
# Dockerfile for a floating agent
FROM python:3.12-slim
# Install antigravity and dependencies
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# The agent runs as a long-lived process
CMD ["python", "agent.py"]
# requirements.txt
# google-antigravity==2.1.4
# firebase-admin==6.5.0
# google-cloud-logging==3.10.1# deploy.yml — GitHub Actions deployment
name: Deploy Agent Fleet
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- uses: google-github-actions/deploy-cloudrun@v2
with:
service: antigravity-agent
image: gcr.io/${{ vars.GCP_PROJECT }}/antigravity-agent:${{ github.sha }}
region: us-central1
env_vars: |
FIREBASE_PROJECT=${{ vars.FIREBASE_PROJECT }}
AGENT_ALTITUDE=9.5# Monitoring — alert when agent altitude drops unexpectedly
from google.cloud import monitoring_v3
def create_altitude_alert(project_id: str):
client = monitoring_v3.AlertPolicyServiceClient()
# Alert if altitude drops below 5m for > 2 minutes
policy = monitoring_v3.AlertPolicy(
display_name='Agent Altitude Drop',
conditions=[{
'display_name': 'Low altitude',
'condition_threshold': {
'filter': 'metric.type="custom.googleapis.com/agent/altitude"',
'comparison': monitoring_v3.ComparisonType.COMPARISON_LT,
'threshold_value': 5.0,
'duration': {'seconds': 120},
},
}],
notification_channels=['projects/{}/notificationChannels/{}'.format(
project_id, 'YOUR_CHANNEL_ID')],
)
client.create_alert_policy(name=f'projects/{project_id}', alert_policy=policy)