Skip to main content

Google ADK

Connect a Google Agent Development Kit (ADK) agent to Leadovaro using streamable HTTP transport. Reference implementations are available in Python (Claude), TypeScript (Gemini), and Go (Gemini).

Architecture​

User Message
|
v
Runner --> LlmAgent --> LLM (Claude / Gemini)
| |
| v
| MCPToolset --(StreamableHTTP)--> Leadovaro MCP Hub
| | |
v v v
Session Tool Discovery Guardrails / Audit / Revocation
+ Invocation
ComponentPurpose
LlmAgentWraps an LLM with instructions and tools
MCPToolsetConnects to Leadovaro's MCP Hub, discovers and invokes tools
RunnerOrchestrates agent execution and streams response events
SessionServiceManages conversation state

Prerequisites​

Get Your Credentials

How to generate a Leadovaro token and configure toolkit URL parameters

Environment Variables​

All implementations require:

LEADOVARO_URL=/_sites/app.leadovaro.com/hub/mcp?profile=your-toolkit
LEADOVARO_TOKEN=your-leadovaro-token

Plus an LLM API key depending on the language — see each tab below.

Requirements: Python 3.10+, uv (recommended) or pip, an Anthropic API key

Installation​

pip install google-adk python-dotenv

Additional env var​

ANTHROPIC_API_KEY=your-anthropic-key

Connecting to Leadovaro​

ADK has native Anthropic model support via google.adk.models.anthropic_llm.Claude — no LiteLlm dependency needed. Register Claude with the model registry and reference the model by string:

import os
from dotenv import load_dotenv
from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams
from google.adk.models.anthropic_llm import Claude
from google.adk.models.registry import LLMRegistry

load_dotenv()

# Register Claude for native Anthropic model support
LLMRegistry.register(Claude)

root_agent = Agent(
model="claude-sonnet-4-6",
name="leadovaro_assistant",
instruction="You are a helpful assistant with access to external tools through Leadovaro.",
tools=[
McpToolset(
connection_params=StreamableHTTPConnectionParams(
url=os.environ["LEADOVARO_URL"],
headers={"Authorization": f"Bearer {os.environ['LEADOVARO_TOKEN']}"},
),
)
],
)

Running the Agent​

Option A: ADK web console

ADK ships with a built-in development UI:

uv run adk web

Open http://localhost:8000 and select leadovaro_agent from the dropdown.

Option B: Programmatic runner

import asyncio
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types

async def main():
session_service = InMemorySessionService()
runner = Runner(
agent=root_agent,
app_name="my-app",
session_service=session_service,
)
await session_service.create_session(
app_name="my-app", user_id="user-1", session_id="session-1"
)

message = types.Content(
role="user",
parts=[types.Part(text="What events do I have today?")],
)
async for event in runner.run_async(
user_id="user-1", session_id="session-1", new_message=message
):
if event.is_final_response():
for part in event.content.parts:
if part.text:
print(part.text)

asyncio.run(main())
note

Use types.Part(text=...) — not types.Part.from_text(...). The from_text class method was removed in recent versions of the Google Gen AI SDK.

Production Configuration​

Lock to a specific toolkit using the profile URL parameter:

LEADOVARO_URL=/_sites/app.leadovaro.com/hub/mcp?profile=your-production-toolkit

Reference Implementation​

google-adk-reference-implementation-leadovaro

Complete implementations in Python, TypeScript, and Go with deployment guides

Next Steps​