Blog Archive
Production Python for ADK Projects: uv, ruff, and mypy Setups That Scale
A pragmatic toolchain for ADK codebases — uv for fast environments, ruff for linting and formatting, mypy for typing agents and tools — with configs tuned for agent projects.
Google ADK Package Anatomy: Modules, Imports, and What Lives Where
A guided tour of the google-adk package layout — runners, agents, sessions, tools, events, flows, and apps — so you always know which module owns what.
Headless and Background Agents in ADK: Async Queues and Trigger Runtimes
Running ADK agents without a user in the loop — trigger endpoints, ambient agents, concurrency and retry knobs, idempotent handlers, and queueing patterns for background work.
The InvocationContext Lifecycle and Thread Safety in ADK
What InvocationContext actually owns, when it is created and torn down, how the narrower context types relate to it, and the concurrency rules that keep sessions consistent.
Agent Exceptions and Graceful Fallback Strategies in ADK
Where exceptions actually surface in an ADK run — tools, callbacks, model calls — and how to design fallbacks that degrade quality deliberately instead of crashing the conversation.
Global Timeouts and Execution Deadlines in ADK Agents
How to bound agent runtime end to end — RunConfig call limits, asyncio timeouts around the runner, ambient-agent trigger deadlines, and layered watchdogs that fail predictably.
Dependency Injection in ADK: Supplying Services and Adapters to Agents
A practical guide to wiring services, model adapters, and tool dependencies into Google ADK — from constructor injection and the App class to scoped per-request services.
Managing Multi-Tenant ADK Instances: Isolating App Names and User Scopes
How ADK's (app_name, user_id, session_id) triple becomes a real tenancy boundary — scoping sessions, state, artifacts, and services so one tenant can never read another's data.
Extending the Runner Pipeline with Custom Middlewares and Hooks
Extend the ADK Runner pipeline with agent callbacks and BasePlugin hooks: return-value semantics, precedence rules, error hooks, and registering plugins on the App object.
Customizing Agent Output Serialization: From Markdown to Raw JSON
Force structured agent output with output_schema and output_key, capture parsed values in session state, and reformat raw LLM text with after_model_callback and --jsonl.
Handling Streaming Chunks and Partial Responses in ADK Runners
Partial events, token chunks, and final responses in ADK: how the Runner treats partial=True, how to accumulate text from run_async, and when state deltas get committed.
The Event Object Explained: Parts, Actions, State Delta, and Metadata
A field-by-field tour of google.adk.events.Event: content parts, EventActions with state and artifact deltas, control signals, metadata, and is_final_response().