Working with Google ADK

Instrument Google ADK pipelines with LangDB—capture nested agent flows, token usage, and latency metrics using a single init() call.

LangDB’s Google ADK integration provides end-to-end tracing for your ADK agent pipelines.

Installation

Enable end-to-end tracing for your Google ADK agents by installing the pylangdb client with the ADK feature flag:

pip install pylangdb[adk]

Quick Start

Set your environment variables before initializing running the script:

export LANGDB_API_KEY="<your_langdb_api_key>"
export LANGDB_PROJECT_ID="<your_langdb_project_id>"

Initialize LangDB before creating or running any ADK agents:

from pylangdb.adk import init
# Initialise LangDB
init()

# Then proceed with your normal ADK setup:
from google.adk.agents import Agent
# ...define and run agents...

Once initialized, LangDB automatically discovers all agents and sub-agents (including nested folders), wraps their key methods at runtime, and links sessions for full end-to-end tracing across your workflow as well.

Last updated

Was this helpful?