adk-architecture

Explain ADK node execution, event-driven state reconstruction, and checkpoint resume semantics.

21.1k|3.8k|Updated Apr 1, 2025
One-click install
npx skills add https://github.com/google/adk-python --skill adk-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adk-architecture
Source: https://github.com/google/adk-python/tree/main/.agents/skills/adk-architecture
Command: npx skills add https://github.com/google/adk-python --skill adk-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

ADK developers need a reliable mental model of how the runtime executes nodes inside workflows, how events drive state reconstruction, and how resumption, routing, and LLM context orchestration work across checkpoints and branches.

Core Features & Use Cases

  • Node contract clarity: Explain how BaseNode.run() normalizes yields into Event objects, including routing (ctx.route), outputs (ctx.output), interrupts (long_running_tool_ids), and state deltas (ctx.state).
  • Execution flow and responsibilities: Describe how Runner, Workflow, and NodeRunner split responsibilities to avoid deadlocks and to correctly manage concurrency, dynamic scheduling, and persistence/streaming.
  • Checkpointing and resume semantics: Provide an actionable guide for HITL lifecycles, run_id reuse, rerun_on_resume behaviors (Workflow vs leaf nodes), and how partial resume_inputs affect control flow.
  • LLM context orchestration from events: Cover how the framework constructs an orchestrated LLM view from immutable events, including task delegation translation, branch isolation, and history trimming/compaction to prevent context pollution.

Quick Start

Ask the assistant: "Explain how ADK resumes a workflow after an interrupt, focusing on event flow, context reconstruction, and the difference between ctx.output, ctx.route, and ctx.interrupt_ids."

Frequently Asked Questions about adk-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does workflow orchestration handle checkpoint resume after an interrupt?

Workflow orchestration handles checkpoint resume by reconstructing state from persisted events and applying rerun_on_resume semantics to determine whether Workflow nodes or leaf nodes re-execute based on partial resume_inputs.

How do I implement BaseNode contracts for workflow execution?

Implement BaseNode contracts by normalizing yields from the run method into Event objects, explicitly defining routing, outputs, interrupts, and state deltas through the execution context.

What is the difference between Runner, Workflow, and NodeRunner in runtime execution?

Runtime execution splits responsibilities to prevent deadlocks: Runner manages overall execution, Workflow handles dynamic scheduling and routing, and NodeRunner executes individual nodes while managing concurrency and streaming.

How does event-driven LLM context orchestration prevent context pollution?

Event-driven LLM context orchestration prevents context pollution by constructing an immutable event view, applying branch isolation, task delegation translation, and history trimming or compaction.

Why does my workflow deadlock during dynamic node scheduling?

Workflow deadlocks during dynamic node scheduling occur when execution responsibilities are incorrectly split between Runner, Workflow, and NodeRunner, failing to properly manage concurrency and event streaming.

Does ADK support human-in-the-loop lifecycles with run_id reuse?

ADK supports human-in-the-loop lifecycles by persisting events as checkpoints, allowing run_id reuse for resuming execution and managing rerun_on_resume behaviors across workflow branches.