Google ADK
Wrap a Google ADK agent in a TapPass session. Every tool invocation emits a structured audit event with correlation IDs. Every server-side governance decision surfaces as a typed exception.
Install
Section titled “Install”pip install 'tappass[google-adk]'Govern an ADK agent
Section titled “Govern an ADK agent”from tappass.integrations.google_adk import guard_adk_agent
with guard_adk_agent(agent, tappass_url="https://tappass.example.com", api_key="tp_...") as session: response = session.run("Summarise recent GDPR rulings") print(session.id, session.audit_url)Async variant
Section titled “Async variant”from tappass.integrations.google_adk import guard_adk_agent_async
async with guard_adk_agent_async(agent, tappass_url=..., api_key="tp_...") as session: response = await session.arun("Summarise recent GDPR rulings")Handling governance decisions
Section titled “Handling governance decisions”from tappass import GovernanceDecision, PolicyBlockError
try: with guard_adk_agent(agent, tappass_url=..., api_key="tp_...") as session: session.run("Show all customer data")except PolicyBlockError as e: print(f"Blocked by {e.blocked_by}: {e.reason}") print(f"See {e.audit_url}")except GovernanceDecision as e: print(f"Governance: {e}")EU data residency
Section titled “EU data residency”Use a Vertex AI backend with europe-west4 region — see the Google Gemini provider page. The guard_adk_agent wrapper is region-agnostic; routing is controlled by the ADK agent’s model config.
Migrating from 0.5
Section titled “Migrating from 0.5”The 0.5 govern_adk(tp) global patch is replaced by guard_adk_agent context managers for explicit session scope and typed decisions. See the migration guide.