Skip to content

The 7 ADK agents: roles, tools and A2A communication

Each agent has a single responsibility. None receive data directly from another — all search for and read the artifacts left by previous agents in the file system.


Role: IDP designer — makes all stack decisions.

{
"task": "Build IDP for Python FastAPI apps",
"deploy_mode": "local"
}
  • Analyze the task requirements
  • Select the complete technology stack
  • Justify each decision with context
  • Generate the architecture spec as the first artifact
RequirementLocal stackCloud stack
DeploymentDocker ComposeTerraform + Cloud Run
DatabasePostgreSQL containerCloud SQL
MonitoringGrafana + PrometheusGrafana Cloud
Secrets.env fileSecret Manager
CI/CDBash scripts + JenkinsGitHub Actions / GitLab CI
# platform-config.yaml
version: "1.0"
deployment:
mode: local
orchestration: docker-compose
database:
type: postgresql
version: "15"
monitoring:
metrics: prometheus
visualization: grafana
security:
scanner: trivy
cicd:
build: docker
test: pytest
deploy: docker-compose

Role: Resource provisioner — converts decisions into infrastructure code.

platform-config.yaml generated by the Architect.

  • Read the Architect’s configuration
  • Generate Docker Compose with all services, healthchecks, networks and volumes
  • Ensure dependent services have correct depends_on
  • Validate generated configurations before writing them
# docker-compose/app-stack.yml
version: '3.8'
services:
app:
build: ./demo-app
ports: ["8000:8000"]
environment:
DATABASE_URL: postgresql://user:pass@postgres:5432/db
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:15
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: db
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user"]
redis:
image: redis:alpine
prometheus:
image: prom/prometheus:latest
grafana:
image: grafana/grafana:latest

Role: Guardian — can block the pipeline if it detects critical issues.

docker-compose/app-stack.yml + Dockerfiles generated by Infrastructure.

  • Scan Docker images with Trivy
  • Detect hardcoded secrets in configurations
  • Verify that exposed ports are correct
  • Apply security policies by severity
SeverityAction
CRITICALBlocks deploy — the pipeline does not continue
HIGHBlocks deploy (configurable)
MEDIUMWarning — logged in the report
LOWInfo — logged in the report
{
"status": "passed",
"scan_results": {
"dockerfile": {
"issues": [],
"score": 95
},
"image_scan": {
"critical": 0,
"high": 0,
"medium": 2,
"low": 15
},
"secrets_detected": false
},
"recommendations": [
"Consider upgrading postgres to 15.2"
],
"blocked": false
}

Role: Deployment automation — generates scripts adapted to the stack.

platform-config.yaml + approved validation from Security Agent.

  • Generate build, test and deploy scripts adapted to the detected stack
  • Create the Jenkinsfile for the complete pipeline
  • Integrate security scanning within the pipeline
  • Configure rollback procedures
#!/bin/bash
# cicd/deploy.sh
set -e
echo "Building Docker image..."
docker build -t app:latest ./demo-app
echo "Running tests..."
docker run --rm app:latest pytest tests/ -v
echo "Security scan..."
trivy image --severity CRITICAL,HIGH app:latest
echo "Deploying..."
docker-compose -f docker-compose/app-stack.yml up -d
echo "✓ App: http://localhost:8000"
echo "✓ Grafana: http://localhost:3000"

Role: Complete monitoring configuration with Prometheus and Grafana.

platform-config.yaml

  • Configure Prometheus with scrape configs for the generated app
  • Create application metrics dashboard
  • Create system metrics dashboard
  • Configure basic alerting rules
DashboardMetrics
app-metrics.jsonAPI Latency (p50/p95/p99), Error Rate by endpoint, Request Throughput
system-metrics.jsonCPU usage, Memory usage, Disk I/O, Network in/out
# prometheus.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'fastapi-app'
static_configs:
- targets: ['app:8000']
metrics_path: '/metrics'

Role: Developer tools — executable CLI tool adapted to the project.

All outputs from previous agents — reads the complete stack to generate coherent commands.

  • Generate executable CLI tool with project-specific commands
  • Commands adapt to the detected stack — they’re not generic
#!/bin/bash
# cli-tool/idp
case "$1" in
init)
echo "Initializing new project..."
;;
build)
docker build -t app:latest .
;;
test)
docker run --rm app:latest pytest
;;
deploy)
docker-compose -f docker-compose/app-stack.yml up -d
;;
status)
docker-compose ps
;;
logs)
docker-compose logs -f
;;
*)
echo "Usage: idp {init|build|test|deploy|status|logs}"
;;
esac

Role: Self-service web portal — the most complex artifact in the system (~45s).

The complete IDP configuration generated by the 6 previous agents.

  • Generate complete web portal with FastAPI backend
  • Dashboard with running services connected to Docker API in real time
  • Template catalog for creating new services
  • Form to create services with 1 click
  • Embedded Grafana integration for metrics visualization
portal/
├── main.py — FastAPI app
├── routes/
│ ├── dashboard.py — Service status (Docker API)
│ ├── catalog.py — Template catalog
│ └── services.py — Service CRUD
├── templates/
│ ├── base.html — Layout with TailwindCSS
│ ├── dashboard.html — Main dashboard
│ ├── catalog.html — Available templates
│ └── create_service.html — Create service form
├── services/
│ ├── docker_manager.py — Docker API client
│ └── template_manager.py — Project generator
├── static/
│ └── js/htmx.min.js
├── requirements.txt
└── Dockerfile
LayerTechnologyReason
BackendFastAPIREST API + automatic documentation
TemplatesJinja2Server-side HTML, no build step
InteractivityHTMXPartial updates without complex JS
StylesTailwindCSSProfessional UI generated directly
Real-time dataDocker SDKReal service status, not a mock