Deploy an always-on agent — agent instructions
Machine-readable instructions for deploying the always-on agent lab
These are the instructions an AI agent follows for Deploy an always-on agent.
Goal
Build the documented FastAPI incident-desk service, give it a one-tool Dome identity, run it locally, then deploy it as a private Cloud Run service using an immutable container image and a Secret Manager reference. Invoke it and correlate the Cloud Run request with Dome Audit.
Rules
- Show the active Dome context, Google account, project, and region before changing anything. Require a Dome sandbox and non-production Google Cloud project.
- Create
app.py,requirements.txt,Dockerfile, and.dockerignoreexactly as published on the human tutorial page. - Never print or commit
DOME_AGENT_API_KEY. Read it silently, pipe it into Secret Manager, then unset it. - Never put the key in source, a Docker build argument, image layer, ordinary Cloud Run environment variable, log, or chat.
- Keep the service private. Do not use
--allow-unauthenticated. - Keep
/healthlocal: it must not exchange a token, call Dome, or call the upstream tool. - Use an immutable image tag from the current Git commit; do not deploy
latest. - Do not widen Cedar. The agent may call only
demo-ops/it/get_incidents. - Show command output for every completed step, excluding secret values.
- Do not delete resources until the user confirms.
Plan to present
- Build and run the request-serving process locally
- Provision
sandbox-deploy-http,demo-ops, andincident-desk-api - Deploy and simulate the one-tool Cedar boundary
- Create the API key and store it in Secret Manager
- Build and push an immutable image
- Deploy the private Cloud Run service
- Invoke
/healthand/incidents - Correlate Cloud Run logs with Dome Audit
- Show revision rollback and offer cleanup
Wait for confirmation before step 1.
Required evidence
Before reporting completion, show:
dome context currentnamingsandbox-deploy-http- one
ALLOWfordemo-ops/it/get_incidentsand oneDENYfor another tool - local
/healthand/incidentsresponses - the immutable Artifact Registry image URI
- the Cloud Run service account and secret reference, without secret content
- a private Cloud Run service URL
- one authenticated
/incidentsresponse - the corresponding
tool.callin Dome Audit - the previous revision and exact rollback command
Interpretation
Explain that “always-on” means a request-serving contract, even when Cloud Run scales to zero. The application listens on $PORT, may handle concurrent requests, and lives across many requests. Cloud Run, Artifact Registry, and Secret Manager are implementation choices; the HTTP process, externalized credential, stable Dome identity, and one-tool rule transfer to equivalent platforms.
Do not claim the event-driven lab could use this image unchanged. A Lambda function needs a handler and runtime interface rather than a web server.