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.

referencesapi-principles.md

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

API Principles

Guidelines for designing and maintaining the ADK public API surface.

Public API Surface

The public API surface of ADK includes:

  • All public classes, methods, and functions in the google.adk namespace.
  • The names, required parameters, and expected behavior of all built-in Tools.
  • The structure and schema of persisted data (Sessions, Memory, Evaluation datasets).
  • The JSON request/response format of the ADK API server.
  • The command-line interface (CLI) commands, arguments, and flags.
  • The expected file structure for agent definitions (e.g., agent.py convention loaded by CLI).

Design Principles

1. Stability and Backward Compatibility

  • ADK adheres to Semantic Versioning 2.0.0.
  • Any change that forces a developer to alter their existing code to upgrade is a breaking change and necessitates a MAJOR version bump.
  • Avoid breaking changes whenever possible by using optional parameters and deprecation cycles.

2. Self-Containment

  • Each package should be as self-contained as possible to reduce coupling.
  • Within the ADK framework, importing from a package's __init__.py is not allowed. Import from the specific module directly.

3. Explicit Exports

  • The public API of a package must be explicitly exported in __init__.py.
  • Only public names should be imported into __init__.py. This keeps __init__.py minimal and prevents accidental exposure of internal implementation details.

4. Intuitive Naming

  • Public method and class names should be concise and intuitive.
  • Private method names can be longer and more self-explanatory to reduce the need for comments.
Examples

Public Naming

  • Good: Runner.run(), Session.get_events()
  • Bad: Runner.orchestrate_agent_invocation_loop(), Session.retrieve_all_events_from_storage()

Private Naming

  • Good: _prepare_context_for_llm(), _should_trim_history()
  • Bad: _prep(), _trim()

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