adk-architecture

An explanation of how the ADK (Agent Development Kit) runtime executes agents as nodes in a graph and passes information through contexts, events, sessions, and traces.

In plain words
What is it for?
Use it to study node execution, workflow scheduling, event flow, checkpoints, tracing, public APIs, and agent subclasses.
Why use it?
It makes it easier to understand where results and state come from when an agent runs or resumes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/google/adk-python/adk-architecture
Any agent
npx skills add google/adk-python --skill adk-architecture
Clone the repo
git clone --depth 1 https://github.com/google/adk-python

Made for: Claude Code, Codex.

Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,124 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00157 $0.01124
Opus 5 $0.00078 $0.00562
Sonnet 5 $0.00031 $0.00225
Haiku 4.5 $0.00016 $0.00112

Measured yesterday against content hash 10f510ec9911, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adk-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/adk-architecture/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ADK Architecture

The runtime is a graph of nodes. BaseNode is the unit of execution. Workflow is a node that schedules other nodes along declared edges. NodeRunner executes exactly one node. Runner owns the invocation and the session. Agents are nodes too — BaseAgent extends BaseNode.

A node communicates with its parent through a per-execution Context, and with the session through Events it yields. Those are two separate channels: ctx carries the result upward, events carry persistence and streaming.

Read the source before relying on any signature here. These notes drift; the code does not. Paths below are relative to src/google/adk/.

Pick a reference

Question Reference
What must a node implement? What may it yield? Which config fields exist? BaseNode
How does the graph schedule nodes, dedup dynamic children, propagate interrupts? Workflow
How does a caller start an invocation? Runner
What is Agent, and which methods do I call on it? Agent
I am subclassing an agent — what do I override? BaseAgent
What is on an Event, and what may I assume about its lifetime? Event
What does a node read and write on ctx? Context
Who creates the child Context, stamps events, retries, catches errors? NodeRunner
Why are Runner, NodeRunner and Workflow three separate things? Runner roles
How does a human-in-the-loop pause and resume work for one node? Checkpoint and resume
How does a whole workflow survive a pause, and what does is_resumable change? Workflow resumability
How are spans created, and what attributes do they carry? Observability
Why does the model not see the raw event log? LLM context orchestration
Is this change a breaking change? Where does a new export belong? API principles

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 76 lines · 157 tokens per session scan A 10f510ec9911

Subscribe to this mod's changes

adk-architecture is a skill published in the GitHub repository google/adk-python (21,331 stars, last pushed 2d ago), licensed Apache-2.0. It adds 157 tokens to every session and 1,124 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.