8000 GitHub - Kjdragan/google-adk-tutorial
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Kjdragan/google-adk-tutorial

Repository files navigation

Google Agent Development Kit (ADK) Python Tutorial

This repository contains a comprehensive tutorial for the Google Agent Development Kit (ADK) for Python, a framework for building and running AI Agents. The tutorial is structured as a series of chapters that guide you through the core concepts and components of the ADK.

What is the ADK?

The adk-python project provides a framework for building and running Agents. Think of an Agent as a specialized assistant that can perform tasks, optionally using a Large Language Model (LLM) to reason and decide actions. A Runner executes these Agents, managing the conversation Session and user interaction. Agents can use Tools (like calculators, search engines, or even other Agents) to gain new capabilities.

Repository Structure

flowchart TD
    A0["Agent"]
    A1["Runner"]
    A2["Session"]
    A3["Tool"]
    A4["Invocation Context"]
    A5["LLM Interaction"]
    A6["Event"]
    A7["LLM Flow"]
    A8["Artifact Service"]
    A9["Authentication"]
    A10["Code Executor"]
    A11["Evaluation"]
    A1 -- "Executes" --> A0
    A1 -- "Manages" --> A2
    A1 -- "Creates for Run" --> A4
    A0 -- "Uses" --> A3
    A0 -- "Uses Logic" --> A7
    A0 -- "Uses" --> A10
    A2 -- "Stores Sequence Of" --> A6
    A3 -- "Receives Context Via" --> A4
    A3 -- "Uses For Access" --> A9
    A4 -- "Holds Current" --> A0
    A4 -- "References" --> A2
    A4 -- "Provides Access To" --> A8
    A7 -- "Uses For Model Comm" --> A5
    A11 -- "Tests Performance Of" --> A0
Loading

Tutorial Chapters

  1. Agent - Your Specialized AI Worker

    • Introduction to the fundamental building block of the ADK
    • Creating your first LLM-powered Agent
  2. Runner - The Agent's Manager

    • How to execute Agents and manage interactions
    • Using InMemoryRunner to test your Agents
  3. Session - The Conversation Memory

    • Managing conversation history and state
    • Working with different session types
  4. Tool - Extending Agent Capabilities

    • Adding specialized functions to your Agents
    • Creating and registering custom tools
  5. LLM Flow - Controlling Agent Logic

    • Understanding the flow of LLM-based decision making
    • Customizing how your Agent processes information
  6. LLM Interaction - Talking to Language Models

    • How Agents communicate with LLMs
    • Configuring model parameters and handling responses
  7. Invocation Context - The Agent's Environment

    • Understanding the runtime context for Agent execution
    • Accessing resources and services during execution
  8. Event - Tracking What Happens

    • How the ADK records Agent actions and responses
    • Working with different event types
  9. Code Executor - Running Code Safely

    • Enabling Agents to execute code
    • Managing security and sandboxing
  10. Artifact Service - Working with Files

    • How Agents can read and write files
    • Managing file artifacts in your applications
  11. Authentication - Secure Access to Services

    • Providing Agents with secure access to external services
    • Managing credentials and authentication
  12. Evaluation - Checking Your Agent's Homework

    • Testing and evaluating Agent performance
    • Creating test cases and measuring results

Getting Started

To get started with the tutorial:

  1. Clone the adk-python repository
  2. These are documents only, no environment needed.
  3. Start with Chapter 1: Agent and work through the chapters sequentially

Prerequisites

  • Python 3.10 or higher
  • Basic understanding of Python programming
  • Google Cloud account (for using Vertex AI and Gemini models)

Additional Resources


How This Tutorial Was Created

This tutorial was created using AI Codebase Knowledge Builder, an AI-powered tool that analyzes GitHub repositories and transforms complex code into beginner-friendly tutorials with clear visualizations. The tool crawls codebases to identify core abstractions and how they interact, making it easier to understand the architecture and functionality of complex software projects.

The AI Codebase Knowledge Builder was developed using Pocket Flow, a minimalist 100-line LLM framework that enables the creation of powerful AI agents and workflows. Pocket Flow follows the principles of Agentic Coding, where humans design and AI agents implement, resulting in a 10x productivity boost for developers.

Key Features of the Tools Used:

  • AI Codebase Knowledge Builder: Automatically generates comprehensive tutorials from code repositories, creating structured learning paths with visualizations and explanations.

  • Pocket Flow: A lightweight (100 lines), zero-dependency LLM framework that is a MUST for proving code based structure to your vibe coding!!

Credits

All credit for these amazing tools goes to Zachary Huang:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0