Augments LabsAugments ADK

Concepts

Every concept in this ADK, what it does, and β€” critically β€” what it is not. Nearby concepts that get confused live side-by-side here so the distinctions are explicit.

This page is a glossary plus a series of compare-and-contrast tables. Architecture pages go deeper on individual mechanisms; this page is the orientation map.

Agent vs Runner

AspectAgentRunner
What it isConfiguration (data).Execution (behaviour).
Has methods likeas_tool(), clone()arun(), arun_graph(), arun_swarm(), streamed variants
HoldsName, instructions, tools, handoffs, guardrails.Loop state, budgets, telemetry, checkpointer wiring.
IdentityStateless. Two Agents with the same config are equal.Stateful while a run is in flight.

Rule: there is no agent.arun(). Every execution path goes through the Runner. An Agent instance is reused across many runs.

Guardrails vs Middleware vs Hooks vs Sandbox

All four intercept agent behaviour, but at different stages and for different purposes. Confusing them is the most common architectural mistake.

ConceptWhere it sitsWhat it seesWhat it doesExample
GuardrailBefore stage 3 (input) / after stage 3 (output)The prompt or the final replyValidates; can short-circuit with a refusal. Pure (no LLM call).PII scrubber, jailbreak heuristic, output relevance check.
MiddlewareWraps each LLM call inside the loopThe wire request and responseTransforms wire payloads; provider-local.Prompt-cache header injection, request signing, custom retry.
HookLifecycle callbacks throughout the runLifecycle eventsObserves; can mutate run state via the callback signature.on_step, on_handoff, on_tool_call, audit emission.
SandboxWraps each tool executionTool arguments and effectsIsolates the blast radius of the call (filesystem, network).Docker, K8s, hosted bridges (E2B/Modal/...).

Rule of thumb: if you want to reject an input β€” guardrail. If you want to modify the wire payload β€” middleware. If you want to observe what happened β€” hook. If you want to contain a tool's side-effects β€” sandbox.

Tool kinds β€” Function vs Hosted vs MCP

KindSourceDefined in your code?Provider-specific?
FunctionToolWraps a Python callable.Yes.No.
Hosted toolProvider runs it (web search, code exec, file search).No β€” opt-in by config.Yes (provider-native).
MCP toolAn external MCP server advertises it.No β€” discovered at runtime.No (MCP is the protocol).

Rule: function tools are the default. Hosted tools and MCP tools extend the surface; they don't replace it.

Multi-agent patterns β€” Handoffs vs Swarms vs Graphs

The three composition axes. All three coordinate multiple agents, but along different shapes.

PatternShapeTerminationWhen
HandoffDirected routing (A β†’ B β†’ ...)A leaf agent emits a final reply.One agent decides "who handles this next".
SwarmCycle (members iterate)swarm_done tool / max_turns / predicate.Several agents refine an answer together.
GraphState machine (nodes + edges)Reach a terminal node.Long workflow with branching + HITL + checkpoints.

See Handoffs & Swarms and Graphs.

Memory layers β€” Episodic vs Semantic vs Sessions vs Context

Four words that all sound like "memory". They are not the same.

LayerLifetimeShapeUsed for
ContextOne run.Free-form developer object (RunContext.context).Pass per-run state to tools and hooks.
SessionsAcross runs for the same identity.Session (SQLite-backed by default)."Remember the user's previous turns."
Episodic memoryAcross runs, agent-controlled.MemoryItem records.Facts learned from past conversations.
Semantic memoryAcross runs, vector-indexed.VectorStore records + embeddings."What did we discuss about X?" retrieval.

Rule: context is per-run developer state; everything else is across-run persistence. Episodic memory is what the agent has experienced; semantic memory is what the agent can retrieve by similarity.

Cost mechanisms β€” Estimator vs Ledger vs Router vs Budget

MechanismWhen it runsWhat it does
CostEstimatorBefore an LLM call.Predicts token cost.
CostLedgerAfter each LLM call.Appends a CostEntry. Implementations in budgets/.
LLMRouterBefore an LLM call.Picks the model β€” CheapestFirstRouter, LatencyFirstRouter, or your own.
BudgetConfigThroughout the run.Hard ceiling; the Runner short-circuits when exhausted.

Rule: estimator predicts, ledger records, router selects, budget enforces. Four separable concerns; they compose freely.

Observability β€” Tracing vs Evals vs Logging vs Verbose

LayerPurposeOutput
LoggingGeneric Python logging per module.Logs to stderr or wherever you configure.
VerboseHuman-readable per-step rendering ([verbose] extra).Rich panels in the terminal.
TracingOpenInference / OpenTelemetry spans.OTel collector β†’ Arize / Phoenix / Langfuse / OTLP.
EvalsEmpirical correctness measurement.Benchmarks live in a separate project.

Rule: logging is for developers debugging; verbose is for humans watching; tracing is for ops; evals are for correctness. They are additive, not alternatives.

Persistence β€” Checkpointers vs Sessions vs Memory

These three persist different things and live in different modules.

PersistenceWhat it storesModule
CheckpointerGraph / swarm in-flight state (resumable runs).graphs/checkpointers/, swarms/checkpointers/.
SessionConversation history for an identity.session/.
MemoryLong-lived facts (episodic + semantic).memory/.

Rule: if a run was interrupted and needs to resume, a checkpointer restores it. If a user returns later and you want continuity, a session loads their history. If the agent wants to recall facts across users / runs, memory retrieves them.

Skills vs Tools β€” Packages vs Primitives

A skill is a bundle β€” instructions + tools + governance β€” composed onto an Agent. A tool is a primitive. A skill might add five tools at once, plus instruction snippets, plus an allow-list of which other tools the LLM can call.

AspectSkillTool
GranularityBundle of related capabilities.Single callable.
InstructionsYes β€” appended to the agent.No.
GovernanceCan restrict tool use.Itself governed.
CompositionMultiple skills per agent.Multiple tools per agent.

Rule: reach for a skill when you need to add a capability stack (e.g. "research"); reach for a tool when you need to expose a single function.

A2A vs MCP β€” Process-level vs Tool-level

Both extend the ADK across process boundaries, but at different layers.

ProtocolWhat's exchangedBoundaryDirection
MCPTool calls advertised by a server.ADK β†’ external server.ADK consumes tools.
A2AAgent-to-agent invocations.ADK ↔ ADK (or compatible).ADK delegates to another ADK process.

Rule: MCP is for tool surfaces. A2A is for agent surfaces.

Durable execution β€” Temporal vs in-process

ModeWhere state livesRecoveryWhen
In-processPython objects in memory + checkpointer.Resume from last checkpoint if the checkpointer was wired.Most workflows.
TemporalTemporal server.Workflow history replay.Long-running / multi-day workflows / cross-process resume.

Rule: in-process + checkpointer covers most cases. Temporal is for workflows that must survive deploys and need replay semantics.

Type layers β€” Layer 1 / Layer 2 / Layer 3 (recap)

See Type layers for the full treatment.

LayerDirectionOwnerWhere it appears
1InFrameworkLLMInputContentItem and friends.
2WireProvider (local)ChatCompletion* TypedDicts.
3OutFrameworkRunItem (history).

Rule: developers see Layer 1 and Layer 3. Layer 2 stays inside the provider module.

LLM ABC vs provider config classes (recap)

See LLM ABC.

LLM is the abstract base class. Each provider subclasses it (LiteLLMModel, AnthropicModel, OpenAIResponsesModel, OpenAIChatCompletionsModel, GeminiModel) and pairs with a config: LiteLLMConfig, AnthropicConfig, OpenAIResponsesConfig, OpenAIChatCompletionsConfig, GeminiConfig. All configs subclass LLMConfig β€” provider-agnostic fields stay there.

RunItem variants (recap)

See Type layers Layer 3 table for the full list. The variants you'll most often pattern-match against:

  • UserItem / SystemItem β€” input messages.
  • MessageOutputItem β€” assistant reply.
  • ToolCallItem / ToolCallOutputItem β€” tool call + result pair.
  • HandoffCallItem / HandoffOutputItem β€” handoff transition pair.
  • ReasoningItem β€” provider-emitted reasoning.
  • CompactionItem β€” a summary that replaced earlier turns.
  • MCPListToolsItem / MCPApprovalRequestItem / MCPApprovalResponseItem β€” MCP exchange artefacts.

Halting / Rice / NFL β€” the math limits (recap)

See Foundations.

Three theorems shape every design choice:

  • Halting β†’ bound everything (max_turns, budgets, retries).
  • Rice β†’ measure, don't prove (evals, not formal verification).
  • NFL β†’ specialise, then compose (handoffs, swarms, graphs, skills).

Index of every named concept

For quick lookup. Each link goes to the architecture page or guide that covers it in depth.