Agents created using Google ADK have before_model_callback and after_model_callback functions that are executed right before and after the model in the agent is invoked. Following ADK best practices, Dome’s input and output Guardrails can be added into the agent via these callbacks.
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 file. When deploying, ensure you use a container size that is sufficiently large. We recommend --cpu=4 --memory=8Gi
Deploying directly via the ADK CLI is not supported as there is no way yet to provide explicit requirements or adjust the container image size via the ADK CLI. The default container size of 1 CPU and 512 MB memory is insufficient for Dome’s default configuration. We recommend 4 CPUs and 8Gi memory.
Dome uses the annoy package for a fast embeddings store. Unfortunately, annoy is not currently compatible with agents built using Google ADK + Cloud Run. Use the default in-memory option if embeddings-based Detectors need to be used. annoy can be installed via the optional embeddings extra, so for most default configurations of Dome, this should not matter.
For a more comprehensive walkthrough of how to Guard a multi-agent ADK setup with Dome, and deploy it, check out this blog post.