Leanpub Header

Skip to main content

Hands-On AI Agents with Google ADK

Build, orchestrate, and deploy production-ready multi-agent systems using Python and Google Cloud

This book is 100% completeLast updated on 2026-07-13

Build AI agents that do real work with the Google Agent Development Kit (ADK), Python, and Google Cloud. Through complete, runnable examples, you'll learn how to build, orchestrate, and deploy production-ready multi-agent systems with practical skills you can apply from day one.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

This book takes you from your very first AI agent to production-grade multi-agent systems using the Google Agent Development Kit (ADK). Every chapter is a hands-on walkthrough with complete, runnable Python code. You will learn the core abstractions that power ADK, how to wire tools into agents, manage memory and context, orchestrate multi-agent workflows, stream real-time responses, integrate retrieval-augmented generation, and deploy your agents securely on Google Cloud. No filler, no quizzes, no theory without implementation. Just practical knowledge you can use from day one.

Author

About the Author

Steve T. Publications

Steve T. Publications is a specialized book publishing company dedicated to delivering high-quality technical resources for IT professionals, students, educators, and technology enthusiasts. Our mission is to make complex technology concepts accessible through well-structured, practical, and industry-relevant publications.

We focus on publishing books across a wide range of information technology disciplines, including software development, cloud computing, cybersecurity, artificial intelligence, data science, networking, DevOps, databases, and enterprise technologies. Every publication is designed to bridge the gap between theory and real-world application, helping readers build the skills needed to succeed in today's rapidly evolving digital landscape.

At Steve T. Publications, we collaborate with experienced industry experts, educators, and technology professionals to produce accurate, up-to-date, and engaging content. We are committed to maintaining the highest editorial standards while empowering learners and professionals with trusted technical knowledge.

Whether you're beginning your IT journey, preparing for professional certifications, or advancing your expertise in emerging technologies, Steve T. Publications is your trusted source for authoritative and practical technical books.

Contents

Table of Contents

Build, orchestrate, and deploy production-ready multi-agent systems using Python and Google Cloud

Introduction

  1. What This Book Covers
  2. Who Should Read This Book
  3. How to Use This Book
  4. What You Will Be Able to Do After Reading

Chapter 1: Understanding AI Agents

  1. What Are AI Agents
  2. The Agent Architecture Pattern
  3. Why Frameworks Matter for Agents
  4. Introducing Google ADK
  5. ADK at a Glance

Chapter 2: Getting Started with Google ADK

  1. Prerequisites and Environment Setup
  2. Installing ADK and Dependencies
  3. Getting a Google API Key
  4. Your First Agent
  5. Adding a Tool
  6. Running Agents Locally
  7. Project Structure and Organization
  8. Common Pitfalls in Setup

Chapter 3: Core ADK Concepts

  1. The Agent Class
  2. The Runner
  3. Sessions and Session Services
  4. State Management
  5. Events and the Event Loop

Chapter 4: Building with Tools

  1. What Are Tools and How Agents Use Them
  2. Function Tools
  3. Tool Context
  4. Built-in Tools
  5. Custom Tool Design Patterns
  6. Toolsets: Grouping and Dynamic Provisioning
  7. Common Pitfalls with Tools

Chapter 5: Memory and Context Management

  1. Short-Term vs Long-Term Memory
  2. Memory Services
  3. Using Memory in Agents
  4. Context Caching
  5. Context Compression and Compaction
  6. Artifacts
  7. Common Pitfalls with Memory and Context

Chapter 6: Prompt Engineering for Agents

  1. The Instruction Field
  2. Referencing Tools in Instructions
  3. Handling Tool Return Values
  4. Multi-Turn Conversation Design
  5. Model Selection and Configuration
  6. Common Pitfalls with Instructions

Chapter 7: Workflows and Orchestration

  1. Template Workflows
  2. Agent Routing
  3. Graph-Based Workflows (ADK 2.0)
  4. Human-in-the-Loop Patterns
  5. Dynamic Workflows
  6. Common Pitfalls with Workflows

Chapter 8: Multi-Agent Systems

  1. Agent Team Architecture
  2. Agents as Tools
  3. Collaborative Workflows with Shared State
  4. A2A Protocol (Agent-to-Agent)
  5. Real-World Multi-Agent Patterns
  6. Common Pitfalls with Multi-Agent Systems

Chapter 9: Streaming and Asynchronous Execution

  1. Understanding Events
  2. Streaming Responses
  3. The Event Loop Deep Dive
  4. Gemini Live API Toolkit
  5. Streaming Tools
  6. Common Pitfalls with Streaming

Chapter 10: Retrieval-Augmented Generation (RAG)

  1. RAG Fundamentals for Agents
  2. Vertex AI Search Integration
  3. Building a RAG Tool from Scratch
  4. Agentic RAG Patterns
  5. Common Pitfalls with RAG

Chapter 11: MCP and External API Integration

  1. Model Context Protocol (MCP) Overview
  2. Connecting to Existing MCP Servers
  3. Building an MCP Server with ADK
  4. OpenAPI Tools
  5. Authentication for External APIs
  6. Common Pitfalls with External Integration

Chapter 12: Structured Outputs and Validation

  1. Output Schemas with Pydantic
  2. The output_key Parameter
  3. Validating LLM Outputs
  4. JSON Mode and Structured Function Returns
  5. Error Handling Patterns for Structured Data
  6. Common Pitfalls with Structured Outputs

Chapter 13: Callbacks and Plugins

  1. Callback Types
  2. Callback Patterns
  3. Plugin Architecture
  4. Callbacks vs Plugins: When to Use Each
  5. Common Pitfalls with Callbacks and Plugins

Chapter 14: Testing and Evaluation

  1. Unit Testing Agent Components
  2. Integration Testing with Runners
  3. Golden Datasets and Evaluation Frameworks
  4. Custom Evaluation Metrics
  5. User Simulation Testing
  6. Common Pitfalls with Testing

Chapter 15: Observability and Debugging

  1. Built-in Logging
  2. Distributed Tracing with OpenTelemetry
  3. Metrics Collection
  4. Third-Party Observability Platforms
  5. Debugging Common Issues
  6. Common Pitfalls with Observability

Chapter 16: Deployment

  1. Deployment Options Compared
  2. Deploying to Cloud Run
  3. Deploying to GKE
  4. Agent Runtime on Google Cloud
  5. Environment Configuration
  6. Common Pitfalls with Deployment

Chapter 17: Security and Safety

  1. Content Safety Filters
  2. Guardrails with Callbacks
  3. Authentication Patterns
  4. Prompt Injection Defense
  5. Common Pitfalls with Security

Chapter 18: Production Best Practices

  1. Performance Optimization
  2. Cost Management
  3. Error Handling and Resilience
  4. Scaling Patterns
  5. Monitoring and Alerting in Production
  6. Migration from 1.x to 2.0
  7. Common Pitfalls in Production

Conclusion

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub