Skip to main content

Google ADK Adapter

Use this adapter when your application runs on Google ADK and the framework already owns model and tool lifecycle.

Integration shape

Google ADK is best integrated through callbacks or plugins.

This is the key difference from direct SDK wrapping:

  • model calls are gated through runner lifecycle hooks
  • tool calls are gated through tool lifecycle hooks
  • final usage is committed only when the final model response is available

Why this shape works

Google ADK already exposes the lifecycle boundaries you need:

  • before model execution
  • after model execution
  • model error handling
  • before tool execution
  • after tool execution
  • tool error handling

That makes callback-based gating the cleanest option.

Runtime rules

  • authorize before each model or billable tool call
  • commit model usage only on the final model response
  • cancel on model or tool failure before settlement
  • keep lease state scoped to invocation and tool call identity

Artifact roles

  • vluna_adapter.*
    • Core helper functions and lifecycle primitives.
    • Copy and adapt this if you need to customize naming, request context, or commit behavior.
  • vluna_plugin.*
    • The main Google ADK integration template.
    • Copy this when you want to attach Vluna through runner callbacks with minimal upstream-agent changes.
  • example.*
    • Demo entrypoint showing how to wire the plugin into an app or upstream sample.
  • README.md
    • Framework-specific setup notes for running the sample flow.

Downloadable artifacts

Python:

TypeScript:

Upstream sample workflow

The adapter examples are designed around copying Vluna files into an upstream ADK sample and running the sample through the gated entrypoint.

This is useful when you want to keep the upstream agent code largely unchanged.