From adk-deployment
Use this skill to deploy an ADK 2.0 agent to Google Cloud Run as a containerized service. Triggers on: "deploy ADK to Cloud Run", "ADK Cloud Run", "containerize ADK agent", "ADK Dockerfile", "ADK serverless deploy", "gcloud run deploy ADK", "ADK production deploy". Generates a Dockerfile, FastAPI server wrapper, deployment commands, and IAM/auth recommendations for production Cloud Run.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adk-deployment:cloud-run-deployerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Containerize and deploy an ADK 2.0 agent to Cloud Run.
Containerize and deploy an ADK 2.0 agent to Cloud Run.
agent_service/
├── agent.py # has root_agent
├── server.py # FastAPI wrapper
├── requirements.txt
├── Dockerfile
└── .gcloudignore
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
ENV PORT=8080
ENV PYTHONUNBUFFERED=1
CMD exec uvicorn server:app --host 0.0.0.0 --port $PORT
google-adk[extensions] >= 2.0.0
fastapi
uvicorn[standard]
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from google.adk.runners import Runner
from google.adk.sessions import VertexAiSessionService
from agent import root_agent
import os
app = FastAPI()
session_service = VertexAiSessionService(
project=os.environ["GOOGLE_CLOUD_PROJECT"],
location=os.environ["GOOGLE_CLOUD_LOCATION"],
)
runner = Runner(agent=root_agent, session_service=session_service)
class ChatRequest(BaseModel):
user_id: str
session_id: str | None = None
message: str
@app.post("/chat")
async def chat(req: ChatRequest):
if req.session_id:
session = await session_service.get_session(req.session_id)
else:
session = await session_service.create_session(
app_name="my_agent", user_id=req.user_id
)
response = await runner.run_async(session=session, input=req.message)
return {"session_id": session.id, "response": response.text}
@app.get("/health")
def health():
return {"status": "ok"}
PROJECT=my-project
REGION=us-central1
SERVICE=my-adk-agent
gcloud run deploy $SERVICE \
--source . \
--region $REGION \
--platform managed \
--allow-unauthenticated \
--set-env-vars "GOOGLE_GENAI_USE_VERTEXAI=true,GOOGLE_CLOUD_PROJECT=$PROJECT,GOOGLE_CLOUD_LOCATION=$REGION" \
--memory 1Gi \
--cpu 1 \
--min-instances 0 \
--max-instances 10 \
--concurrency 20
For private services, drop --allow-unauthenticated and use IAM-bound invokers.
Cloud Run automatically uses the runtime service account. Grant it:
roles/aiplatform.user (Vertex AI / Gemini)roles/aiplatform.sessionUser (Vertex sessions)SA=$(gcloud run services describe $SERVICE --region $REGION --format='value(spec.template.spec.serviceAccountName)')
gcloud projects add-iam-policy-binding $PROJECT --member="serviceAccount:$SA" --role="roles/aiplatform.user"
__pycache__/
.pytest_cache/
*.pyc
.env
.venv/
tests/
curl https://<service>/health returns {"status": "ok"}/chat returns a valid response--min-instances 1 for hot)gke-deployer for higher-control Kubernetes deploymentvertex-agent-engine-deployer for managed agent runtimeProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub healthcare-ai-consulting-llc/adk-2-toolkit --plugin adk-deployment