LabBeginner~10 min

Govern Google ADK Workflow

Supported in BHANUJPython 3.12+Google ADK 2.9.0Agents RuntimeWORKFLOW_STEP

Capture provider-neutral runtime evidence from a deterministic Google ADK workflow and inspect every execution step in Agents Runtime.

Execution evidence SUCCEEDED
validate_claim2 events
load_policy2 events
check_coverage2 events
check_policy2 events

16 WORKFLOW_STEP events · 0 TOOL_CALL events

Overview

Observe the run. Keep Google ADK in control.

This lab runs a Google ADK Workflow with local fixture data and an in-memory session. It makes the same insurance-claim decision every time. Google ADK owns execution and the decision; BHANUJ receives one-way evidence.

You will learn

How an ADK FunctionNode maps to a WORKFLOW_STEP event pair.

You will build

An eight-stage ADK workflow correlated to one runtime execution.

Architecture

A local workflow with no model call.

Execution plane

Google ADK

Runs FunctionNode stages and produces the decision.

Evidence plane

BHANUJ Agents Runtime

Records ordered execution evidence.

STARTvalidate_claimload_policycheck_coveragecheck_policycalculate_payoutrecord_decisionnotify_customercomplete_claimEND

Each node sends paired STARTED and COMPLETED evidence with event_type=WORKFLOW_STEP and source_kind=google_adk.node.

Prerequisites

What you need.

  • Python 3.12 or later and pip.
  • Git to clone or fork the public labs repository.
  • The BHANUJ OSS repository only when you want to send runtime evidence.

Run locally

Run the standalone ADK workflow first.

The lab pins google-adk==2.9.0, but does not call a model or require Google Cloud credentials.

terminal
git clone https://github.com/Bhanuj-AI/labs.git
cd labs/agent-frameworks/google/govern-google-adk-workflow
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
terminal
python app.py
expected output
Claim: CLM-001
Policy active: true
Damage verified: true
Decision: APPROVED

Enable evidence

Connect the same workflow to BHANUJ.

Start the OSS API in development mode, then set the three guide-side connection variables and run the unchanged application.

terminal · AI Governance OSS
cd /path/to/ai-governance-oss
AI_GOVERNANCE_AUTH_MODE=development \
  uv run uvicorn ai_governance.api.app:app --reload
terminal · lab repository
export AI_GOVERNANCE_BASE_URL=http://localhost:8000
export AI_GOVERNANCE_ORGANIZATION_ID=org_default
export AI_GOVERNANCE_PROJECT_ID=project_default
python app.py
expected governed output
Claim: CLM-001
Policy active: true
Damage verified: true
Decision: APPROVED
BHANUJ execution ID: <execution-id>
Failure isolation: evidence delivery is fail-open. An unavailable BHANUJ API never changes the ADK node result, exception, state, routing, or decision. It also never fabricates a successful completion.

Inspect the execution

Use one execution ID to find the whole run.

The CLI prints the BHANUJ execution ID if the API accepts the execution start. Open Agents Runtime and find that exact ID to view this 16-event timeline.

Agents Runtime timeline SUCCEEDED
  1. 1validate_claim · Step StartedWORKFLOW_STEP
  2. 2validate_claim · Step CompletedWORKFLOW_STEP
  3. 3load_policy · Step StartedWORKFLOW_STEP
  4. 4load_policy · Step CompletedWORKFLOW_STEP
  5. 5check_coverage · Step StartedWORKFLOW_STEP
  6. 6check_coverage · Step CompletedWORKFLOW_STEP
  7. 7check_policy · Step StartedWORKFLOW_STEP
  8. 8check_policy · Step CompletedWORKFLOW_STEP
  9. 9calculate_payout · Step StartedWORKFLOW_STEP
  10. 10calculate_payout · Step CompletedWORKFLOW_STEP
  11. 11record_decision · Step StartedWORKFLOW_STEP
  12. 12record_decision · Step CompletedWORKFLOW_STEP
  13. 13notify_customer · Step StartedWORKFLOW_STEP
  14. 14notify_customer · Step CompletedWORKFLOW_STEP
  15. 15complete_claim · Step StartedWORKFLOW_STEP
  16. 16complete_claim · Step CompletedWORKFLOW_STEP

There are eight logical workflow steps, 16 lifecycle events, and zero TOOL_CALL events. Tool calls remain reserved for actual external tool invocations.

Ready to run it?

Fork the lab, run it locally, then enable runtime evidence when the BHANUJ API is available.

References

Google ADK Workflows