cloud-run-agents
Skill2 starsChanged 28 days agoApache-2.0View on GitHub
Packages, deploys, and scales autonomous Antigravity and Gemini agents on Google Cloud Run services and Cloud Run Jobs with Eventarc triggers and GPU scheduling.
- Pipes a download into a shell
- Reads credentials
- Deletes or force-pushes
- Installs packages
In this repository108 other files it gives its agents.
- AGENTS.mdAGENTS.md
- everything-gemini-maintainerSkill
- adversarial-fuzz-generatorSkill
- agent-evalsSkill
- ai-first-engineeringSkill
- alloydb-omni-vectorSkill
- apache-kafka-streamsSkill
- api-craftsmanSkill
- architecture-designerSkill
- argon-3d-game-engineSkill
- argon-3d-scene-architectSkill
- argon-procedural-asset-generatorSkill
- argon-visual-critique-loopSkill
- argo-workflowsSkill
- autonomous-incident-healerSkill
- axum-web-serviceSkill
- bigquery-vector-searchSkill
- browser-qa-testerSkill
- chromadb-vector-storeSkill
- cilium-ebpf-networkingSkill
- clickhouse-analyticsSkill
- cloud-deploy-canarySkill
- cloudflare-r2-object-storageSkill
- cloudflare-workersSkill
- context-cachingSkill
- context-distillation-compressorSkill
- context-warmerSkill
- continuous-learningSkill
- cost-oracle-finopsSkill
- cross-repo-swarm-syncSkill
- cve-remediation-orchestratorSkill
- database-architectSkill
- dataproc-spark-analyticsSkill
- dbt-transformationSkill
- debezium-cdcSkill
- devops-pipelineSkill
- distributed-rate-limitingSkill
- docker-compose-orchestratorSkill
- duckdb-local-olapSkill
- dynamic-thinking-allocationSkill
- ebpf-microvm-sandboxSkill
- ebpf-sandbox-enforcerSkill
- elephant-goldfish-modelSkill
- envoy-ai-gatewaySkill
- ephemeral-swarm-orchestratorSkill
- fastapi-productionSkill
- fullstack-nextjsSkill
- game-audio-synthesizerSkill
- game-studioSkill
- gemini-function-callingSkill
- gemini-groundingSkill
- gemini-live-audio-transcriberSkill
- gemini-live-multimodalSkill
- gemini-live-screen-visionSkill
- gemini-multimodalSkill
- genetic-prompt-cross-pollinatorSkill
- git-craftsmanSkill
- github-opsSkill
- google-axSkill
- google-flow-orchestratorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 104
When running test-time recursive optimization (Propose-Probe-Compose) that exceeds standard HTTP request limits, package the run into a …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cloud Run Autonomous Agents
Packages, containerizes, and deploys autonomous Google Antigravity & Gemini agents on Google Cloud Run. Covers HTTP agent services, batch-oriented Cloud Run Jobs for recursive Harness² probing, Eventarc event triggers, and NVIDIA L4 GPU acceleration.
1. Architecture: Cloud Run Agent Execution Models
Google Cloud Run
┌─────────────────────────────────────────────────────────────────────────────┐
│ 1. CLOUD RUN SERVICE (Interactive / Webhook Agents) │
│ • Real-time Gemini Live WebSocket / HTTP streaming │
│ • Automatic scale-to-zero when idle │
│ • Up to 60-minute request timeout with WebSockets enabled │
├─────────────────────────────────────────────────────────────────────────────┤
│ 2. CLOUD RUN JOBS (Batch / Recursive Probing Agents) │
│ • Long-running Harness² Propose-Probe-Compose workflows (up to 24 hours) │
│ • Parallel array task execution for multi-candidate testing │
│ • Zero HTTP gateway overhead; triggered via Cloud Scheduler / Workflows │
├─────────────────────────────────────────────────────────────────────────────┤
│ 3. CLOUD RUN WITH GPU (NVIDIA L4 / T4) │
│ • Co-locates agent logic with local verification models (vLLM / Triton) │
│ • Direct hardware acceleration for code analysis & AST parsing │
└─────────────────────────────────────────────────────────────────────────────┘2. Agent Container Specification (Dockerfile)
Production multi-stage Dockerfile bundling the agent runtime, Node CLI, and Python SDK:
# syntax=docker/dockerfile:1
FROM python:3.11-slim AS base
ENV PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive \
PORT=8080
WORKDIR /app
# Install system dependencies & Node.js for CLI tools
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
ca-certificates \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install everything-gemini CLI globally
RUN npm install -g everything-gemini
# Copy Python requirements & install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy agent definitions and source code
COPY . .
# Run as non-root user for enterprise container security
RUN useradd -m -u 10001 agentuser && chown -R agentuser:agentuser /app
USER 10001
EXPOSE 8080
ENTRYPOINT ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8080"]3. Cloud Run Service Deployment (gcloud)
Deploy an interactive agent service with Workload Identity and automated secret injection:
gcloud run deploy antigravity-agent-service \
--image="gcr.io/my_project/antigravity-agent:v2.2.0" \
--region="us-central1" \
--platform="managed" \
--service-account="agent-runner@my_project.iam.gserviceaccount.com" \
--cpu=4 \
--memory=8Gi \
--concurrency=10 \
--timeout=3600 \
--min-instances=0 \
--max-instances=20 \
--set-env-vars="GEMINI_MODEL=gemini-2.0-flash,MAX_USD_BUDGET=15.00" \
--set-secrets="GEMINI_API_KEY=gemini-api-key:latest" \
--vpc-egress=private-ranges-only \
--ingress=internal-and-cloud-load-balancing4. Cloud Run Jobs for Harness² Recursive Probing
When running test-time recursive optimization (Propose-Probe-Compose) that exceeds standard HTTP request limits, package the run into a Cloud Run Job:
# 1. Create Cloud Run Job with 3 parallel task instances
gcloud run jobs create harness2-probe-runner \
--image="gcr.io/my_project/harness2-runner:v2.2.0" \
--region="us-central1" \
--tasks=3 \
--max-retries=1 \
--task-timeout=7200s \
--cpu=8 \
--memory=16Gi \
--command="everything-gemini" \
--args="harness2,run,--bench,local,--max-usd,25,--snapshot,--json"
# 2. Trigger asynchronous execution of the probe job
gcloud run jobs execute harness2-probe-runner --region="us-central1" --wait5. Eventarc Trigger Binding (Event-Driven Agent Workflow)
Automatically invoke agents whenever new code repositories or error traces land in Cloud Storage:
gcloud eventarc triggers create trace-ingestion-trigger \
--location="us-central1" \
--destination-run-service="antigravity-agent-service" \
--destination-run-region="us-central1" \
--destination-run-path="/webhooks/trace-ingest" \
--event-filters="type=google.cloud.storage.object.v1.finalized" \
--event-filters="bucket=production-failure-traces" \
--service-account="eventarc-invoker@my_project.iam.gserviceaccount.com"6. NVIDIA L4 GPU Configuration
Accelerate on-container verification models or local embedding calculations:
gcloud beta run deploy local-verifier-agent \
--image="gcr.io/my_project/verifier-agent-l4:latest" \
--region="us-central1" \
--cpu=8 \
--memory=32Gi \
--gpu=1 \
--gpu-type=nvidia-l4 \
--no-cpu-throttling \
--timeout=18007. Enterprise Production Checklist
| Category | Requirement | Verification Method |
| IAM Security | Dedicated service account with least-privilege Vertex AI roles | roles/aiplatform.user only; no Owner/Editor permissions |
| Secret Management | Mount API keys directly from Google Secret Manager | Use --set-secrets; never bake keys into Docker layers |
| Budget Enforcement | Enforce --set-env-vars="MAX_USD_BUDGET=..." bound to budget-guard | Verification in PreToolUse hook |
| Graceful Shutdown | Handle SIGTERM within 10s to flush ephemeral logs to Cloud Storage | Python signal.signal(signal.SIGTERM, handler) |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

