adkx - Extensions for Google ADK
Production-ready extensions and experimental features for Google's Agent Development Kit
This package provides production-ready extensions and utilities built on top of Google ADK. It also serves as a testing ground for experimental features that may introduce breaking changes to ADK 1.x. Successful features may be upstreamed to the official ADK.
Status
๐ง Early Development - APIs are subject to change
Features
Multi-Model Support
- Gemini Models - Enhanced Gemini integration with streaming support
- OpenAI-Compatible Providers - Unified interface for:
- OpenAI (GPT-4o, GPT-4 Turbo)
- Local Ollama (Qwen, Llama, etc.)
- Ollama on Google Cloud Run
Advanced Tool System
- FunctionTool - Convert Python functions to ADK tools with automatic schema generation
- Multi-Modal Responses - Tools can return images, files, and structured data (ADR-0002)
Developer Experience
- Type Safety - Full type hints and Pydantic models throughout
- Async First - Built for async/await workflows
- Streaming - Efficient streaming for all supported models
Installation
pip install adkxQuick Start
Simple Weather Agent
from adkx.agents.agent import Agent
from adkx.tools.function_tool import FunctionTool, ToolResult
async def get_weather(location: str) -> ToolResult:
"""Get current weather for a location."""
# Your weather API logic here
return ToolResult(details=[f"Weather in {location}: Sunny, 72ยฐF"])
agent = Agent(
model="gemini-2.0-flash-exp",
name="WeatherBot",
description="A helpful weather assistant",
tools=[FunctionTool(get_weather)],
)Multi-Modal Image Generation
from google.genai import types
from adkx.tools.function_tool import FunctionTool, ToolResult
async def create_image(prompt: str) -> ToolResult:
"""Generate an image from a text description."""
# Generate image using Gemini
response = await client.aio.models.generate_content(
model="gemini-2.5-flash-image",
contents=prompt,
config=types.GenerateContentConfig(response_modalities=["IMAGE"]),
)
image_data = response.candidates[0].content.parts[0].inline_data.data
return ToolResult(
details=[
f"Generated image for: {prompt}",
types.Blob(data=image_data, mime_type="image/jpeg"),
]
)Using OpenAI-Compatible Models
from adkx.agents.agent import Agent
from adkx.models.openai_compatible_providers import OpenAI, Ollama
# OpenAI
agent = Agent(model=OpenAI(model="gpt-4o"), tools=[...])
# Local Ollama
agent = Agent(model=Ollama(model="qwen3:8b"), tools=[...])Samples
Complete working examples are available in the samples/ directory:
- weather_agent - Basic tool usage with function calling
- search_agent - Google Search integration
- image_agent - Multi-modal responses with image generation
- weather_agent_openai - Using OpenAI models
- weather_agent_ollama - Using local Ollama
Documentation
- Architecture Decisions - ADRs documenting key design choices
- Research - Technical analysis and comparisons
- Contributing Guide - Development setup and guidelines
- AGENTS.md - Python best practices and patterns for AI-assisted coding
Model Compatibility
| Provider | Models | Streaming | Function Calling |
|---|---|---|---|
| Gemini | 2.0 Flash, 2.5 Flash, Pro | โ | โ |
| OpenAI | GPT-4o, GPT-4 Turbo, GPT-4o mini | โ | โ |
| Ollama (Local) | Qwen, Llama, Mistral, DeepSeek | โ | โ |
| Ollama (Cloud) | Same as local, hosted on GCP | โ | โ |
Development
# Clone repository
git clone https://github.com/Jacksunwei/adkx-python.git
cd adkx-python
# Setup environment
uv venv --python python3.11 .venv
source .venv/bin/activate
# Install dependencies
uv sync --all-extras
# Install pre-commit hooks
pre-commit install
# Run tests
pytest tests/
# Format code
./autoformat.shContributing
Contributions are welcome! Please see CONTRIBUTING.md for:
- Development setup
- Code style requirements
- Testing guidelines
- PR submission process
Feedback
- ๐ฌ GitHub Discussions - Questions and ideas
- ๐ GitHub Issues - Bug reports
- ๐ง Direct feedback: jacksunwei@gmail.com
License
Apache 2.0 - See LICENSE
On this page
Languages
Python99.0%Shell1.0%
Apache License 2.0
Created November 16, 2025
Updated November 24, 2025