All skills
google avatar

/adk-architecture

@f7a1cd4
by googlegoogle/adk-python22k stars
4,084

Explains how the ADK runtime fits together: the node and graph execution model, Context and Event flow, checkpoint and resume, tracing, and the rules governing the public API surface. Use when answering "how does X work" about ADK internals, tracing where an event or a piece of state comes from, deciding where a new capability belongs, reviewing a change to BaseNode, Workflow, Runner, Agent, Event or Context, working out why a node re-ran or stayed waiting after a resume, or judging whether a change breaks the public API. Don't use for assembling an agent from existing pieces (use adk-agent-builder), diagnosing one failing run or test (use adk-debug), or formatting and naming conventions (use adk-style).

Use this Skill: https://skilld.dev/gh/google/adk-python/adk-architecture

This session only. Nothing lands on disk.

referencesinterface-agent.md

≈506 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Agent

Agent is a type alias for LlmAgent (Agent: TypeAlias = LlmAgent), the model-backed agent most users instantiate. It is not the same thing as BaseAgent, which is the abstract base every agent derives from.

BaseAgent extends BaseNode, so an agent is a node: it can stand alone under a Runner or sit inside a Workflow graph.

Key fields

  • name — unique identifier within the agent tree. Validated: must be a valid Python identifier, and "user" is rejected because it is reserved for end-user input.
  • description — capability description the model uses when choosing which sub-agent to delegate to.
  • sub_agents — child agents. Names must be unique across the tree; each child's parent_agent is wired up automatically.
  • before_agent_callback / after_agent_callback — intercept the agent lifecycle.

Entrance methods

Method Use
run_async(parent_context) Text conversation. Yields Events. Runs the before/after callbacks, the error callback, and invocation instrumentation around _run_async_impl.
run_live(parent_context) Video/audio conversation. Marked @final — override _run_live_impl instead.
run(ctx=..., node_input=...) Inherited from BaseNode, @final. This is what a Workflow calls when the agent is a graph node; it routes into _run_impl, which for BaseAgent delegates to run_async.

Which one you call depends on the caller, not on age: a Workflow calls run(), direct text callers use run_async(). Nothing in the source marks run_async deprecated, and it remains the path every agent's real logic runs through.

Other methods

  • clone(...) — copy the agent, detached from its parent.
  • find_agent(name) / find_sub_agent(name) — search the agent tree.
  • root_agent — walk up to the top of the tree.
  • from_config(config, config_abs_path) — build an agent from a config object. Both @deprecated and @experimental; do not build on it.

Source: SKILL.md on GitHub

No alerts7d3 checks · Risk SAFE
  • Gen Agent Trust Hub7d

    This skill consists of comprehensive architectural documentation for the Agent Development Kit (ADK). It provides technical guidance on the framework's node execution model, context scoping, and observability patterns. No security considerations were identified as the content is purely informational and follows standard developer documentation practices.

  • Socket7d

    No alerts

  • Snyk7d

    Risk: LOW · No issues

Signed by skilld at f7a1cd4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week

README badge

README badge for google/adk-python/adk-architecture