Skip to main content
TL;DR: For content protection, wrap Dome as ADK model callbacks with generate_adk_input_callback and generate_adk_output_callback. For full Agent security (identity, tool permissions, audit), pass your ADK Agent to secure_agent().
Google ADK Agents expose before_model_callback and after_model_callback hooks that run immediately before and after the model is invoked. Dome plugs into both. You have two levels of protection.

Choosing a Protection Level

Add Dome input and output Guardrails as ADK callbacks. Install the ADK dependency first (pip install google-adk).
Both factories accept optional blocked_message (a custom message returned when content is blocked) and additional_callback (another callback to chain after Dome):

Deployment

To deploy an ADK Agent protected with Dome, follow ADK’s Cloud Run deployment guide via the gcloud CLI and add vijil-dome to your Agent’s requirements.txt. Use a container large enough for Dome’s models: we recommend --cpu=4 --memory=8Gi.
Deploying directly via the ADK CLI is not supported, because it does not let you set requirements or increase the container image size. The default 1 CPU / 512 MB container is insufficient for Dome’s default configuration. Use 4 CPUs and 8 GiB memory.
Dome uses the annoy package (the embeddings extra) for a fast embeddings store. annoy is not currently compatible with Google ADK on Cloud Run. Use the default in-memory option if you need embeddings-based Detectors. Most default configurations do not require it.
For a full walkthrough of guarding and deploying a multi-agent ADK setup, see the Vijil blog post.

Next Steps

Trust Runtime

Identity, tool permissions, and attestation

Configure Guardrails

Choose which Guards run
Last modified on July 16, 2026