triage-web
Built
The screens people use
A Next.js app for the screens people use. A small server layer maintains the sign-in session and forwards calls to triage-api.
Why: It is the part of the product clients use.
DesignRunning on Google Cloud
05 of 05 · 2 min readSix services on Cloud Run around one database, a queue and a separate service for writes. The demo database is one self-managed VM without high availability.
People sign in with Google. triage-api checks the ID token and the person's role on every request.
Google sign-in through Firebase Auth
triage-api checks the ID token on every request
The screens people use: a Next.js app with a thin server layer that keeps the sign-in session and passes calls on to triage-api.
A Next.js app with a thin server layer
Keeps the sign-in session
Passes calls on to triage-api
Our FastAPI app wraps the ADK App and Runner, checks sign-in and roles, and accepts approvals. Cloud Tasks queues each run and calls triage-api to execute it. Runs do not need an open browser. The sweeper puts runs that lost their worker back in the queue.
FastAPI around the ADK App and Runner
Cloud Tasks queues each run and calls it back
Cloud Scheduler calls the sweeper every minute
All saved data lives in one AlloyDB Omni instance on a Compute Engine VM, reached over Direct VPC egress. Each run's profile picks a model per role. Keys for OpenAI, Anthropic and OpenRouter come from Secret Manager.
AlloyDB Omni on one Compute Engine VM, daily snapshots
Vertex AI (Gemini, open models), OpenAI, Anthropic, OpenRouter
API keys in Secret Manager
The demo shop sends nothing itself. Its errors reach Cloud Logging; a Cloud Monitoring 5xx alert policy publishes to a Pub/Sub topic, and a push subscription calls triage-api with an OIDC token.
storefront-api logs to Cloud Logging
A Cloud Monitoring 5xx alert publishes to Pub/Sub
Pub/Sub pushes it to triage-api, signed (OIDC)
action-runner holds the GitHub and storefront write credentials and calls no model; triage-api asks it to act only on an approved plan. Slack gets one-way notices; a failed post is not retried.
triage-api calls action-runner, IAM-authenticated
action-runner: mitigations on the shop, pull requests on GitHub
Slack: one-way notices, at most once
An export job writes recorded runs to a Cloud Storage bucket. The public replay site, triage-archive-web, reads them through the IAM-only triage-archive API, independently of the database VM. A nightly job stops the staging environment, and ops alerts email failures.
An export job writes recorded runs to Cloud Storage
triage-archive-web (public) calls the read-only triage-archive API
A nightly job stops staging; this site is on Firebase Hosting
Steps appear in order. Evidence, review and outcomes remain visible.
Evidence / agent workWaiting for a personFailingRecovered
THE TRADEOFF
Services scale down to zero instances and redeploy from code. A queue and saved state keep each run independent of any instance.
More moving parts and a database VM to run. Managed AlloyDB is the production target, not built here.
The alternative: one container with a local database. Cheaper, but a restart loses the run.
ONE RESULT
The whole staging stack deploys from code and stops on demand.
limitCost savings are not measured: the cited records contain no billing data. Terraform drift of gcloud client metadata remained after the restart steps. A fresh project needs two applies; the timed fresh-project stand-up is deferred with Plan 39.
WHAT THIS DOES NOT CLAIM
MORE DETAIL
SERVICES
A person signs in on triage-web, which calls triage-api. Cloud Tasks runs each investigation on triage-api, the run state lives in the database, and approved writes go through action-runner.
triage-web
Built
A Next.js app for the screens people use. A small server layer maintains the sign-in session and forwards calls to triage-api.
Why: It is the part of the product clients use.
triage-api
Built
Our FastAPI app wraps the ADK App and Runner. It checks sign-in and roles, manages runs from start to finish, streams events, accepts approvals, and receives alerts and CI webhooks. Its agents read logs, code, recent changes and the knowledge base.
Why: One place decides what a run may do. ADK's own HTTP endpoints are not mounted, so clients never talk to ADK directly.
action-runner
Built
A small private service that makes every write: pull requests through a GitHub App, and approved mitigations through storefront-api's admin API. It owns the write_operations rows. Only IAM-authenticated calls from triage-api and the operator can reach it.
Why: Write credentials stay separate: the process that talks to models holds no GitHub or mitigation write credentials. Each service has its own database role (see Security).
storefront-api
Built
A realistic shop API with a fault switch and an admin API for reversible mitigations from an allowed list. It runs as one instance, so its logged connection-pool figures are accurate. Its code lives in its own repository.
Why: It makes real incidents and real logs on cue, and an approved mitigation can really restore service. An operator switches its faults; the agents read its logs and code, and approved mitigations reach it through action-runner.
MANAGED GOOGLE SERVICES
Each service does one job. The database stores the investigation's decision record; these services do not.
The run queue. It calls triage-api's private execute endpoint.
Calls the sweeper, which re-enqueues runs that lost their executor.
Google sign-in. triage-api checks the ID token on every request.
Gemini and open models such as Qwen. OpenAI, Anthropic and OpenRouter models are called with API keys from Secret Manager.
Database passwords and API keys. No service-account JSON keys.
Agent analytics rows, with prompt and response content logged after redaction.
DATA
Everything persistent lives in one AlloyDB Omni instance on a Compute Engine VM. Omni is Google's downloadable, PostgreSQL-compatible build of AlloyDB. One transactional store keeps a decision next to the evidence and approvals behind it.
ADK's own session tables, through DatabaseSessionService
Built
ADK creates and owns them. Our migrations never touch them.
runs (with the executor lease), run_events, approvals, audit_log, budget_ledger, workflow_versions
Built
run_events is the sanitized view of events that the UI reads.
storefront_state
Built
Active faults and mitigations, read by every storefront instance.
write_operations
Built
action-runner owns the records that prevent repeated action effects.
kb_documents, kb_chunks, knowledge_loads
Built
Search is exact vector search plus full-text. There is no ScaNN index in v1. Embeddings are made in triage-api and only the vectors are stored.
model_calls
Built
Model, tokens, response time and estimated cost per attempt, including fallbacks and repairs.
eval_runs, eval_results, run_questions
Built
Run questions are kept apart from the run's ADK session.
Omni's free licence covers developing, testing, prototyping and demonstrating. That is why this environment is a demonstration, and why the rule at the end of the next section exists.
FROM THIS DEMO TO YOUR PRODUCTION
This demo runs on self-managed AlloyDB Omni. The recommended target is managed AlloyDB for PostgreSQL, the same engine with high availability, backups and IAM built in. It is a target, not a ready deployment.
| Aspect | This demo | Your production |
|---|---|---|
| Identity and access | triage-api cannot be called without Google credentials (checked on staging). People sign in with Firebase, and roles live in the database. triage-api and action-runner each log in to the database with their own restricted role, and a separate account runs migrations. The Cloud SQL connector and IAM database login do not exist on Omni. | Managed AlloyDB has IAM built in, so each service could use IAM database login instead of a password. |
| Where data goes | All state is in one Omni database on a VM with a private IP only. Cloud Run reaches it through Direct VPC egress, and a firewall allows port 5432 only from those subnets. Incident text is redacted before it reaches ADK. Tool output is redacted before a model sees it. Model calls go to Vertex AI, OpenAI and OpenRouter, each per the run's profile. Analytics rows go to BigQuery with redacted content. | The same layout on managed AlloyDB. For data-residency needs, Omni also runs on-premises or on another cloud. |
| Who operates what | We operate it: we start the VM for client sessions, stop it afterwards, and patch the operating system and Omni ourselves. | Managed AlloyDB for PostgreSQL: the same engine, with high availability, backups and IAM built in. |
| Backups | Daily persistent-disk snapshots, kept 7 days. A restore from snapshot was observed on staging in Phase 0. Nothing else: the demo holds only demo data, the VM rebuilds from Terraform, and the seeded data is re-created from the app. | Built into managed AlloyDB. |
| Availability | No high availability. That is acceptable for client sessions and rehearsals. While the VM is stopped the whole app is offline by design and the UI shows "Environment offline". Paused runs survive a stop and start because the disk persists. | Managed AlloyDB with high availability. This is a recommendation, not an experiment. The code is expected to be unchanged because it uses only features both editions share; that is not verified. |
| Model cost | Estimated per attempt from a versioned price table; on staging, about $0.03 to $0.16 per run | The same estimate, reconciled against the billing export and provider invoices. |
| Infrastructure cost | VM, Cloud Run and Cloud Tasks; stopped between sessions | Not estimated here. |
A pilot that processes a client's real data is not "demonstrating". Real client data needs managed AlloyDB or a paid Omni subscription.
Production target: managed AlloyDB for PostgreSQL.
WHY ADK ON CLOUD RUN?
ADK runs the agents; the application adds lasting runs, one approval tied to the plan and a separate writer. Where another option is stronger: “Agent Runtime is fully managed and abstracts away the underlying infrastructure, so you focus on agent logic instead of operations.” Source · checked 2026-10-02
THE THREE COLUMNS
Three ways to run an agent like this one on Google Cloud. Each is a column in the matrix below.
COLUMN 1
ADK 2.x on Agent Engine, now named Agent Runtime.
COLUMN 2
ADK 2.x on Cloud Run, with a database session service.
COLUMN 3
Open-source LangGraph on Cloud Run, with a Postgres checkpointer.
The LangGraph column is open-source LangGraph on Cloud Run. LangChain's managed platform (LangSmith Cloud) is a different deployment, so it appears only as a row note in the matrix.
THE MATRIX
Every cell is what the vendor's own documentation says, with a link to the page and the date it was checked. Each row's notes link to this build's claims.
| Need | ADK on Agent Runtime | ADK on Cloud Run | LangGraph on Cloud Run | This build |
|---|---|---|---|---|
| 01A run outlives the request and the instance. | Partial Long-running query jobs run asynchronously for up to seven days; StreamQuery requests are capped at 10 minutes. Mid-job instance loss is not described. Source · checked 2026-10-02 | Partial Request-based billing allocates CPU during request processing; instance-based billing allocates it for the instance lifecycle. Idle instances can be shut down at any time. Source · checked 2026-10-02 | Partial Request-based billing allocates CPU during request processing; instance-based billing allocates it for the instance lifecycle. Idle instances can be shut down at any time. Source · checked 2026-10-02 | 3 Proven If the worker dies mid-run, the run resumes and skips finished steps. |
Row notes (3) and this build's claimsThis build Cloud Run: a request timeout can be extended up to 60 minutes; the default is 5 minutes. Source · checked 2026-10-02 Cloud Run: jobs run tasks to completion and do not serve requests; task timeout extends up to 168 hours. Source · checked 2026-10-02 LangSmith Cloud: fully managed infrastructure for stateful, long-running agents with persistent state and background execution. Source · checked 2026-10-02 The LangGraph column is open-source LangGraph on Cloud Run. LangChain's managed platform (the LangSmith Cloud note above) is a different deployment, so it appears only here, as a row note. | ||||
| 02A pause for human approval lasting hours or days. | Partial RequestInput pauses a node and the reply becomes its output. The page does not state how long a pause can last or its storage needs. Source · checked 2026-10-02 | Partial RequestInput pauses a node and the reply becomes its output. The page does not state how long a pause can last or its storage needs. Source · checked 2026-10-02 | Framework interrupt() saves state through a checkpointer and the graph waits indefinitely until resumed with Command(resume=...). Source · checked 2026-10-02 | 3 Proven A paused run resumes correctly after the service restarts, in tests. |
Row notes (2) and this build's claimsThis build Agent Runtime: Agent Platform Sessions keep events for a configurable TTL, with a default of 365 days. Source · checked 2026-10-02 ADK: DatabaseSessionService stores session data in a database, and the data survives application restarts. Source · checked 2026-10-02 | ||||
| 03Recovery when a worker dies mid-run. | Partial ADK provides resume by invocation id; Agent Runtime pages don't describe it. Detecting the failure and triggering the resume are not described. Source · checked 2026-10-02 | Partial ADK provides resume by invocation id with ResumabilityConfig. Detecting the failure and triggering the resume are not described. Source · checked 2026-10-02 | Partial Sync durability writes each checkpoint before the next step; async risks an unwritten checkpoint on a crash. Detecting a crash is not described. Source · checked 2026-10-02 | 4 Proven If the worker dies mid-run, the run resumes and skips finished steps. |
Row notes (2) and this build's claimsThis build
LangGraph: when a node fails mid-super-step, pending checkpoint writes from nodes that completed are stored. Source · checked 2026-10-02 LangGraph: a SIGTERM drain saves a resumable checkpoint at a superstep boundary, and a drained run resumes with the same thread id. Source · checked 2026-10-02 | ||||
| 04Deploying new code while runs are paused. | Partial ADK's resume page says a stopped workflow must not be modified before resuming; adding or removing agents is not supported. No version-migration guidance was found. Source · checked 2026-10-02 | Partial ADK's resume page says a stopped workflow must not be modified before resuming; adding or removing agents is not supported. No version-migration guidance was found. Source · checked 2026-10-02 | Partial Edge changes between kept nodes are safe. Renaming or removing a node a thread is paused at or about to enter breaks its resume. Source · checked 2026-10-02 | 3 Proven On Cloud Run, a paused run finished after the service moved to a new revision. |
Row notes (4) and this build's claimsThis build Cloud Run: revisions can be rolled back, deployed gradually and given split traffic; requests being processed continue to completion. Source · checked 2026-10-02 LangGraph: the latest graph runs on every thread, including threads resuming from a checkpoint; runs are not pinned to their original code. Source · checked 2026-10-02 Agent Runtime: updating versioned fields creates an immutable revision, and traffic can be split by percentage or sent to the latest revision. Source · checked 2026-10-02 ADK: the resume page describes agent workflows, supported from ADK Python 1.16, and does not mention graph workflows or ADK 2.0. Source · checked 2026-10-02 | ||||
| 05Approval bound to the exact proposal and a verified identity. | Partial ADK RequestInput pauses a workflow node for human input and passes the reply on. Approver identity and a recheck before the action are not described. Source · checked 2026-10-02 | Partial ADK RequestInput pauses a workflow node for human input and passes the reply on. Approver identity and a recheck before the action are not described. Source · checked 2026-10-02 | Partial Human-in-the-loop middleware pauses a tool call for approve, edit, reject or respond decisions. Approver identity and a recheck before the action are not described. Source · checked 2026-10-02 | 3 Proven An approval only counts for the exact proposal it was given for. |
Row notes (3) and this build's claimsThis build ADK: tool confirmation lists DatabaseSessionService and VertexAiSessionService as not supported, and is marked Experimental. Source · checked 2026-10-02 Agent Runtime: logs show both the user's and the agent's identity when an agent acts on a user's behalf. Source · checked 2026-10-02 Cloud Run: services are private by default and callable by principals with roles such as Cloud Run Invoker. Source · checked 2026-10-02 | ||||
| 06The model's process holds no write credentials. | Partial Agent identity is a per-agent, least-privilege identity with certificate-bound credentials. A separate write-credential service outside the agent is not described. Source · checked 2026-10-02 | Your team ADK tools act with the agent's own identity, such as a service account, or the controlling user's through OAuth. No separate write service is described. Source · checked 2026-10-02 | Your team The guardrails page describes no credential handling for tools and no separate write service. Source · checked 2026-10-02 | 2 Proven Only a separate service holds GitHub and shop write credentials; the AI-facing API does not. |
Row notes (1) and this build's claimsThis build Agent Runtime: Agent Gateway blocks connections by default unless an explicit IAM policy grants access. Source · checked 2026-10-02 | ||||
| 07External writes not repeated when a response is lost. | Partial ADK resume reinstates results of tools that returned and re-runs the failed one. Tools may run more than once; ADK says to prevent duplicate runs. Source · checked 2026-10-02 | Partial ADK resume reinstates results of tools that returned and re-runs the failed one. Tools may run more than once; ADK says to prevent duplicate runs. Source · checked 2026-10-02 | Partial Completed task results load from the checkpoint on resume. A task that started but did not finish may run again, so make side effects idempotent. Source · checked 2026-10-02 | 1 Proven If a write's reply is lost, the retry reconciles instead of repeating it. |
This build's claims | ||||
| 08Spend caps per run. | Partial RunConfig max_llm_calls caps LLM calls per run (default 500). The RunConfig reference lists no token or cost limit. Source · checked 2026-10-02 | Partial RunConfig max_llm_calls caps LLM calls per run (default 500). The RunConfig reference lists no token or cost limit. Source · checked 2026-10-02 | Partial Model call limit middleware caps model calls per run or per thread, ending gracefully or raising an error. Its parameters are call counts. Source · checked 2026-10-02 | 3 Proven In tests, concurrent budget reservations stayed within the run's cap. |
| 09An audit trail. | Partial Agent Platform Data Access audit logs include session creates and event appends but are disabled by default. Approver-level records were not found. Source · checked 2026-10-02 | Partial Cloud Run writes Admin Activity, Data Access and System Event audit logs for service and job operations. No documented per-run approval record was found. Source · checked 2026-10-02 | Partial Cloud Run writes Admin Activity, Data Access and System Event audit logs for service and job operations. No documented per-run approval record was found. Source · checked 2026-10-02 | 3 Proven · 1 In build · Phase 5 Each run leaves an audit trail from start to finish. |
Row notes (3) and this build's claimsThis build ADK: SessionService handles creating, retrieving, updating (appending Events, modifying State) and deleting sessions. Source · checked 2026-10-02 LangGraph: a checkpointer saves a snapshot of graph state at each super-step. Source · checked 2026-10-02 Agent Runtime: Agent Gateway logs gateway allow and deny decisions. Source · checked 2026-10-02 | ||||
| 10Redaction before data reaches models and storage. | Partial Agent Gateway applies Model Armor templates to agent prompts and responses and can redact or block content that violates them. Stored-data redaction is not described. Source · checked 2026-10-02 | Partial Model Armor plugin screens user input and model output for sensitive data and blocks flagged content, showing replacement text. Stored-data redaction is not described. Source · checked 2026-10-02 | Partial PIIMiddleware redacts, masks, hashes or blocks email, card, IP, MAC, URL or custom-regex matches in input, output or tool results. Storage paths are not described. Source · checked 2026-10-02 | 3 Proven Four planted secret types never reached stored run data or model requests. |
Row notes (2) and this build's claimsThis build ADK: the BigQuery Agent Analytics plugin has a content_formatter parameter for custom masking or formatting per event. Source · checked 2026-10-02 ADK: the BigQuery Agent Analytics plugin redacts state keys prefixed with temp: in logged state. Source · checked 2026-10-02 | ||||
| 11Several model providers, with fallback. | Framework ADK supports Gemini, Claude, Agent Platform-hosted models, and LiteLLM, Ollama and vLLM connectors. Model routing includes automatic failover on error. Source · checked 2026-10-02 | Framework ADK supports Gemini, Claude, Agent Platform-hosted models, and LiteLLM, Ollama and vLLM connectors. Model routing includes automatic failover on error. Source · checked 2026-10-02 | Framework Model fallback middleware tries alternative models when the primary model fails, with provider redundancy across OpenAI, Anthropic and others. Source · checked 2026-10-02 | 2 Proven Gemini, OpenAI and an open model each passed a role test. |
This build's claims | ||||
| 12Tracing and analytics. | Platform Setting GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY enables agent traces, logs and metrics. Traces open in Cloud Trace and the console. Source · checked 2026-10-02 | Framework ADK emits OpenTelemetry spans for agent invocation, workflow execution, tool execution and model calls, exportable to Cloud Trace or an OTLP endpoint. Source · checked 2026-10-02 | Framework LangChain and LangGraph apps have a built-in integration that sends OpenTelemetry traces to LangSmith when LANGSMITH_OTEL_ENABLED is set. Source · checked 2026-10-02 | 2 Proven · 1 In build · Phase 5 An analytics row's trace id opens the matching trace in Cloud Trace. |
Row notes (1) and this build's claimsThis build ADK: the BigQuery Agent Analytics plugin trace_id is an OpenTelemetry trace ID, so rows join to Cloud Trace traces. Source · checked 2026-10-02 | ||||
| 13What you operate and patch. | Platform Agent Runtime is a fully-managed runtime that abstracts away the underlying infrastructure, so you focus on agent logic instead of operations. Source · checked 2026-10-02 | Partial Google maintains and patches buildpack base images weekly; the page does not mention application dependencies. Instances are stateless, so state goes in external storage. Source · checked 2026-10-02 | Partial Google maintains and patches buildpack base images weekly; the page does not mention application dependencies. Instances are stateless, so state goes in external storage. Source · checked 2026-10-02 | 2 Proven · 1 In build · Phase 6 The whole staging stack deploys from code and can be stopped to save cost. |
This build's claims | ||||
| 14Where state lives (data residency). | Platform Data residency at rest is supported across Agent Runtime, evaluation, sessions and Memory Bank, alongside VPC Service Controls and CMEK. Source · checked 2026-10-02 | Your team DatabaseSessionService stores sessions in a relational database such as PostgreSQL, MySQL, MariaDB or SQLite that you manage yourself. Source · checked 2026-10-02 | Your team PostgresSaver stores checkpoints in a Postgres database reached through a connection string that you supply. Source · checked 2026-10-02 | 2 Proven The agent framework's session storage works on AlloyDB Omni. |
Row notes (1) and this build's claimsThis build Cloud Run: each resource resides in a region, and customer data associated with it is stored in the selected region. Source · checked 2026-10-02 | ||||
| 15Infrastructure cost model. | Platform Agent Runtime bills vCPU-hours and GiB-hours of allocated compute and memory, rounded to the nearest second. Idle time between prompts is not billed. Source · checked 2026-10-02 | Platform Request-based billing charges for request processing, start and shutdown. Instance-based billing charges for the entire instance lifecycle. Source · checked 2026-10-02 | Platform Request-based billing charges for request processing, start and shutdown. Instance-based billing charges for the entire instance lifecycle. Source · checked 2026-10-02 | 2 Proven · 1 In build · Phase 6 The whole staging stack deploys from code and can be stopped to save cost. |
This build's claims | ||||
"No documented support found" means the pages we read say nothing, not that the feature is impossible.
IN THE VENDORS' WORDS
Things a baseline does that this build does not, in the vendors' own words.
Agent Runtime is fully managed and abstracts away the underlying infrastructure, so you focus on agent logic instead of operations.
Source · checked 2026-10-02VPC Service Controls, CMEK and data residency at rest are supported across Agent Runtime, evaluation, sessions and Memory Bank.
Source · checked 2026-10-02LangGraph checkpoints support time travel: replay from a prior checkpoint, or fork it with update_state and continue from the branch.
Source · checked 2026-10-02After an ADK agent is deployed to Agent Platform, session management is handled automatically by the managed service.
Source · checked 2026-10-02Agent Runtime long-running query jobs run asynchronously for up to seven days, and their status and results can be fetched later.
Source · checked 2026-10-02Agent Gateway blocks agent connections by default unless an explicit IAM policy grants access, and can attach Model Armor screening.
Source · checked 2026-10-02LIMITS
The limits of today's build, all of them. The phases are on the milestone line.