How avkus/agent-development-kit-crash-course works
Project Type and Purpose
• This is not a single application but a learning toolkit: a set of 12 hands-on examples demonstrating how to build LLM-powered agents with Google’s ADK.
• Each example folder (1-basic-agent through 12-loop-agent) encapsulates a different architectural pattern or feature set (simple response, tools, state, multi-agent orchestration, etc.).
File Structure
• Top-level:
– README.md, requirements.txt, GEMINI_MODELS.md
– 12 example directories, each with its own README and a module directory containing agent.py, .env.example, and sometimes subagent packages or utility scripts.
• Patterns:
– Single-Agent (folders 1–4): a lone agent.py demonstrating core ADK usage.
– Stateful (5–6): session management, persistent store (e.g., utils.py, memory_agent).
– Multi-Agent (7–8): a root “manager” agent orchestrating specialized subagents.
– Callbacks (9): injection points before/after tool or model calls.
– Sequential / Parallel / Loop (10–12): pipeline chaining, concurrent subagent execution, iterative refinement loops.
Extract Insights from the README
• The README confirms each folder is a self-contained example illustrating a specific ADK feature.
• Dependencies: Python, virtualenv, Google Cloud API (GOOGLE_API_KEY), the ADK library itself, Pydantic for structured outputs, LiteLLM for model abstraction, plus optional tools and storage modules.
Main Components
a. Developer Environment
– Virtual environment with Python & ADK libraries
– .env file storing GOOGLE_API_KEY
b. ADK Core Framework
– Agent base classes, session & state management APIs, callback hooks, tool registration mechanisms
c. Example Agent Modules (1–12)
– Each folder is a “plug-in” that instantiates one or more Agent classes
– Subcomponents:
• *Subagents* (in multi-agent, parallel, loop examples)
• *Tools* (in tool agent, callback examples)
• *Storage layer* (persistent-storage example)
• *Schemas* (structured-outputs example)
d. External Services
– Google AI Platform via ADK (models, embeddings)
– Optional custom tool endpoints or local storage (filesystem or database)
Relationships & Interactions
– Agents invoke ADK framework APIs → ADK framework calls Google AI services
– In multi-agent cases, the manager agent delegates tasks to subagents (sequentially, in parallel, or in a loop)
– Callback examples intercept model or tool calls before/after execution
– Stateful examples read/write session data or persistent storage between turns
Architectural Patterns & Design Principles
– Plug-in Modularity: each example folder is self-contained, illustrating a single pattern
– Orchestration vs. Delegation: manager agents vs. standalone/simple agents
– Concurrency: parallel example uses asynchronous/subprocess calls to gather metrics
– Pipelines & Loops: sequential chaining vs. iterative refinement
– Separation of Concerns: clear boundaries between agent logic, tool wrappers, state managers, and external service clients