A2ZSkillsBrowse courses

Domain 1 · 27% of scored content

Agentic Architecture & Orchestration

The largest domain on the exam, and the one that decides most of your score. It is about the control flow you write around the model: when a loop is the right shape, when to split work across agents, how context crosses the boundary between them, and where a prompt is not a strong enough guarantee. Nearly every question here rewards the same instinct — put the deterministic thing in code and leave the judgement to the model.

Two diagrams. Left: the agentic loop as a four-step cycle — gather context, take action, verify work, then decide whether to iterate — turning around a shared goal. Right: an orchestrator on the main thread dispatching three subagents in parallel, each with its own context window, whose results merge back into one synthesised answer.Open full size
The loop on the left is the control flow you write. The delegation on the right is what you reach for when one context window is not enough.
1.1

Design and implement agentic loops for autonomous task execution

An agentic loop is control flow you write, not something the API runs for you. You send a request, the model responds, and you inspect stop_reason to decide what happens next. When stop_reason is "tool_use" you execute the tools it asked for, append the results to the conversation, and send again. When it is "end_turn" the model has finished and you present its answer.

The division of labour is the point: the model proposes which tool to call, your code executes it and decides whether to loop. Because tool results are appended to conversation history, every iteration hands the model everything it has learned so far to reason over. That history is the loop's only memory — the Messages API is stateless, so anything you do not send back is gone.

The distinction the exam presses on is model-driven decision-making versus a pre-configured decision tree. In an agentic loop Claude reasons about the next action from context; in a fixed pipeline you have already decided the sequence. Reach for the loop when the path is genuinely open-ended, not to dress up a workflow you could have written as three function calls.

Know

  • The loop lifecycle: send a request, inspect stop_reason, execute requested tools, return results for the next iteration
  • stop_reason has two values that matter here — "tool_use" means keep going, "end_turn" means stop
  • Tool results are appended to conversation history so the model can reason about the next action
  • Model-driven decision-making differs from a pre-configured decision tree or a fixed tool sequence

Be able to

  • Branch loop control flow on stop_reason: continue on "tool_use", terminate on "end_turn"
  • Append each tool result to the conversation before the next request so new information enters the model's reasoning
  • Keep an iteration cap as a runaway safety net only, with end_turn as the real completion signal

Anti-patterns

  • Parsing natural language for phrases like "I have finished" to decide the loop is done
  • Using an arbitrary iteration cap as the primary stopping mechanism
  • Treating the presence of assistant text content as a completion indicator — the model frequently narrates before calling a tool
1.2

Orchestrate multi-agent systems with coordinator-subagent patterns

The reference architecture is hub-and-spoke. One coordinator owns task decomposition, delegation, result aggregation, and the decision about which subagents to invoke at all. Every message between subagents goes through it. That routing is not bureaucracy — it is what gives you a single place for observability, consistent error handling, and controlled information flow.

Subagents run with isolated context. They do not inherit the coordinator's conversation history, and they do not share memory with each other between invocations. Anything a subagent needs to know has to be in the prompt you send it.

The failure mode the exam highlights is not a broken subagent — it is a coordinator that decomposed the task too narrowly. If every subagent succeeds at its assignment and the final report still misses half the topic, look at what they were assigned, not at how they performed.

Know

  • Hub-and-spoke: the coordinator manages all inter-subagent communication, error handling and information routing
  • Subagents operate with isolated context and do not inherit the coordinator's conversation history
  • The coordinator's job is decomposition, delegation, aggregation, and choosing which subagents to invoke for a given query
  • Overly narrow decomposition produces incomplete coverage even when every subagent succeeds

Be able to

  • Design coordinators that analyse query requirements and dynamically select subagents rather than always running the full pipeline
  • Partition scope across subagents to minimise duplication — distinct subtopics or distinct source types per agent
  • Build iterative refinement loops: evaluate synthesis output for gaps, re-delegate with targeted queries, re-synthesise until coverage is sufficient
  • Route all subagent communication through the coordinator

Anti-patterns

  • Blaming downstream agents for gaps that decomposition created upstream
  • Letting subagents talk to each other directly, which costs you observability and consistent error handling
  • Running every subagent on every query regardless of what the query needs
1.3

Configure subagent invocation, context passing, and spawning

Subagents are spawned with the Task tool, which means a coordinator that cannot invoke subagents is usually a coordinator whose allowedTools is missing "Task". Each subagent type is described by an AgentDefinition: a description, a system prompt, and the tools it is allowed to use.

Context does not travel by itself. If the synthesis subagent needs the web search results and the document analysis output, those findings go in its prompt — complete, not summarised into vagueness. Use structured formats that keep content separate from metadata, so source URLs, document names and page numbers survive the handoff and attribution is still possible downstream.

Parallelism comes from emitting multiple Task tool calls in a single coordinator response. Spreading them across separate turns runs them sequentially. And when you write the coordinator's prompt, specify research goals and quality criteria rather than step-by-step procedure — subagents adapt better to an objective than to a script.

Know

  • The Task tool spawns subagents; allowedTools must include "Task" for a coordinator to invoke them
  • Subagent context must be provided explicitly in the prompt — there is no automatic inheritance or shared memory
  • AgentDefinition carries the description, system prompt and tool restrictions for each subagent type
  • fork_session creates independent branches from a shared analysis baseline for exploring divergent approaches

Be able to

  • Include complete findings from prior agents directly in the next subagent's prompt
  • Use structured data formats that separate content from metadata so source attribution survives handoffs
  • Spawn parallel subagents by emitting multiple Task tool calls in one coordinator response
  • Write coordinator prompts that state goals and quality criteria rather than procedural steps

Anti-patterns

  • Assuming a subagent can see what the coordinator saw
  • Emitting Task calls across separate turns and wondering why nothing runs in parallel
  • Compressing findings before passing them on, which strips the detail the next agent needs
1.4

Implement multi-step workflows with enforcement and handoff patterns

There are two ways to make a workflow happen in the right order: tell the model, or make it structurally impossible to do otherwise. Prompt instructions have a non-zero failure rate. That is tolerable for style preferences and unacceptable when identity verification must precede a financial operation.

Programmatic prerequisites are the answer where compliance must be deterministic. Block process_refund until get_customer has returned a verified customer ID, and the 12% of cases where the model skipped ahead stop existing rather than becoming rarer.

The other half of this objective is the handoff. When you escalate mid-process, the human picking it up has no access to the conversation transcript. A structured summary — customer ID, root cause, refund amount, recommended action — is what makes the escalation useful rather than a restart.

Know

  • Programmatic enforcement (hooks, prerequisite gates) gives guarantees; prompt-based guidance gives probabilities
  • Deterministic compliance is required when errors have financial or legal consequences
  • Structured handoff protocols carry customer details, root cause analysis and recommended actions

Be able to

  • Implement prerequisites that block downstream tool calls until upstream steps have completed
  • Decompose multi-concern requests into distinct items, investigate each in parallel against shared context, then synthesise one unified resolution
  • Compile structured handoff summaries for human agents who cannot see the transcript

Anti-patterns

  • Strengthening the system prompt as the fix for a compliance failure with financial consequences
  • Adding few-shot examples to enforce an ordering that must be guaranteed
  • Escalating with a conversation dump instead of a structured summary
1.5

Apply Agent SDK hooks for tool call interception and data normalization

Hooks let you intervene on either side of a tool call. A PostToolUse hook intercepts the result before the model ever sees it, which is where data normalisation belongs: when one MCP tool returns Unix timestamps, another ISO 8601, and a third numeric status codes, normalise them in the hook rather than asking the model to cope.

Interception on the outgoing side enforces policy. A hook that blocks refunds above $500 and redirects to human escalation cannot be talked out of it by a persuasive customer or a model having an off day.

The choice between a hook and a prompt instruction is the same judgement as in 1.4, expressed in the SDK: hooks for deterministic guarantees, prompts for probabilistic compliance. Business rules belong in hooks.

Know

  • PostToolUse hooks intercept tool results for transformation before the model processes them
  • Outgoing interception hooks enforce compliance rules on tool calls the model wants to make
  • Hooks give deterministic guarantees; prompt instructions give probabilistic compliance

Be able to

  • Normalise heterogeneous formats from different MCP tools in a PostToolUse hook — timestamps, status codes, date representations
  • Block policy-violating actions in an interception hook and redirect to an alternative workflow such as escalation
  • Choose hooks over prompt-based enforcement whenever a business rule requires guaranteed compliance

Anti-patterns

  • Asking the model to remember a threshold that a hook could enforce
  • Normalising data in the system prompt with an explanation of each format instead of in a hook
  • Treating hooks as an optimisation rather than as the correctness mechanism
1.6

Design task decomposition strategies for complex workflows

Two shapes, two situations. Prompt chaining — a fixed sequential pipeline — suits predictable multi-aspect work where you know the steps in advance: analyse each file individually, then run a cross-file integration pass. Dynamic decomposition suits open-ended investigation, where each step's findings determine the next subtask.

Splitting a large review into per-file passes plus a separate integration pass is the canonical fixed decomposition. It exists to fight attention dilution: a single pass over fourteen files produces detailed feedback on some, superficial comments on others, and contradictory verdicts on identical code.

For an open-ended task like "add comprehensive tests to a legacy codebase", the plan cannot be written up front. Map the structure first, identify high-impact areas, then build a prioritised plan that adapts as dependencies surface.

Know

  • Fixed sequential pipelines (prompt chaining) versus dynamic adaptive decomposition based on intermediate findings
  • Prompt chaining breaks reviews into sequential steps: per-file local analysis, then a cross-file integration pass
  • Adaptive investigation plans generate subtasks from what is discovered at each step

Be able to

  • Match the pattern to the workflow: prompt chaining for predictable multi-aspect reviews, dynamic decomposition for open-ended investigation
  • Split large code reviews into per-file local passes plus a separate cross-file integration pass
  • Decompose open-ended tasks by mapping structure first, then identifying high-impact areas, then prioritising adaptively

Anti-patterns

  • Reaching for a bigger context window when the problem is attention dilution, not capacity
  • Pushing the work back on developers — "submit smaller PRs" — instead of fixing the review architecture
  • Requiring consensus across repeated identical passes, which suppresses real findings caught intermittently
1.7

Manage session state, resumption, and forking

Named session resumption with --resume <session-name> continues a specific prior conversation, which is how a multi-day investigation stays one investigation. fork_session does something different: it branches from a shared analysis baseline so you can explore two approaches — two testing strategies, two refactors — without either polluting the other.

Resumption has a sharp edge. If the files you analysed have changed since, the session is carrying stale tool results, and the model will reason confidently from them. Tell it what changed so it can re-analyse the specific files rather than re-exploring everything.

When prior tool results are stale enough, resumption is the wrong tool. Starting a new session and injecting a structured summary of what you learned is more reliable than resuming into contradictions.

Know

  • --resume <session-name> continues a specific named prior conversation
  • fork_session creates independent branches from a shared baseline for divergent exploration
  • A resumed session must be told about changes to previously analysed files
  • Starting fresh with a structured summary beats resuming when prior tool results are stale

Be able to

  • Use named sessions with --resume to continue investigations across working sessions
  • Use fork_session to compare approaches from one shared codebase analysis
  • Choose resumption when prior context is mostly valid, and a fresh session with an injected summary when it is not
  • Inform a resumed session about specific file changes for targeted re-analysis

Anti-patterns

  • Resuming a session after significant code changes without saying what moved
  • Forcing a full re-exploration when a targeted note about three changed files would do
  • Treating resumption as always cheaper than a fresh session with a good summary