CertPrep
Domain 1 · Lesson 1.3 · 8 min read

Choosing and Evolving the Architecture

Exam skillArchitecture Selection at Scale

Evaluating production cost, reliability, and quality data to decide whether to evolve a running system between workflow and agentic patterns, and selecting the agent harness, framework, and reusable-pattern standards a team should adopt.

Use production cost, reliability and quality data to decide where a running system should be a workflow and where an agent, pick the harness that gives the control a workload needs, and set reusable-pattern standards that cut duplication without hiding prompts.

What you need to know

At the Professional level, the architecture question is rarely "what should we build?" It is "the system is running; given what production data shows, should it change?" The exam gives you numbers (success rates, cost per task, latency, escalations by segment) and asks for the change those numbers justify.

Read the data by segment

Production traffic is rarely uniform. A support agent may resolve 91% of tickets overall while most of them follow four fixed paths. On those paths, an agent adds variance in cost and latency for no gain; on the varied remainder, it earns its cost.

What the data showsWhat it justifies
Most traffic follows a few known pathsWorkflows for those paths; the agent keeps the long tail
A fixed chain is accurate and predictableKeep it; do not convert it to an agent
Failures are machine-detectable (schema errors)An evaluator-optimizer loop with a bounded number of corrections
A router misroutes requests that need two handlersAn orchestrator path for multi-intent requests
A costly design wins only on one query typeRoute that type to it; send the rest to the cheaper design
Quick questions wait on a full agent loopOne call with the one or two tools they need

Compare designs on outcomes

When two designs run side by side, decide on outcome measures:

  • Cost per successful outcome, including retries and human corrections;
  • Escalation or correction rate by segment;
  • Tail latency against the target.

Tool-call counts and daily token totals measure activity, not quality, and can favor a design that is cheap per call but expensive per finished task.

Choosing the harness

HarnessGives youChoose it when
Hand-written Messages API loopFull control of every stepYou need custom interception, unusual tool dispatch, or minimal dependencies
SDK tool runnerThe loop handled for youSimple tool loops with no need to step inside
Agent SDKClaude Code's loop, tools, hooks and permissions inside your appAgents that need hooks, permissions and sessions in your own environment
Claude Managed AgentsHosted loop, sandbox per session, event historyLong runs with bash and files, a team that does not want to operate containers
Claude Code headlessThe full CLI in a pipelineEngineering tasks in CI

Two constraints override convenience:

  1. Compliance eligibility. If an obligation such as a business associate agreement or zero data retention applies, use a surface and runtime covered by it. A hosted feature that is not covered is ruled out, whatever the engineering saving.
  2. Platform availability. Features can reach the first-party API before cloud platforms. If a platform is mandated by a cloud agreement, design for what it supports now.

Production readiness of a prototype loop

Before a prototype carries real traffic, it needs:

  • tracing of each model and tool call with token, cost and latency attributes;
  • per-request turn and token limits and bounded retries enforced in the harness;
  • typed error handling at the tool boundary.

Reusable-pattern standards

When many teams build on Claude, duplication and inconsistency become the operational problem: different logging, rewritten tool wrappers, drifting copies of the same procedure. Good standards:

  • A supported default harness with shared tracing and error handling that new agents start from.
  • Shared tool and MCP definitions that teams import.
  • Skills for shared procedures, with an owner and a version, loaded only when a task needs them, distributed through a central registry or marketplace.

Requirements for adopting any third-party framework as a standard: engineers can see and log the exact requests sent to Claude, and upgrades are pinned and pass the evaluation suite before rollout.

In the exam

Architecture-selection items give production evidence and a proposed change. Segment the evidence, find where the current pattern fails or overspends, and choose the narrowest change that addresses it. Check compliance and platform constraints before accepting a harness. Distractors convert everything, add agents for modularity, move to the largest model, or ban working tools without a migration plan.

Check your understanding

Question 1

78% of an agent's tickets follow four fixed paths with sixfold cost variance. What change is best?

Show answer

Answer: C. Known paths gain predictable cost and latency as workflows; the agent keeps the cases that need judgment.

Question 2

A health system needs zero data retention for patient data. The team proposes a hosted agent runtime that is not covered. What should it decide?

Show answer

Answer: A. Eligibility is decided by the obligation, not by convenience. De-identifying names or limiting the network does not change the data handling terms.

Question 3

Which two measures best compare a workflow and an agent on live contract-review traffic?

Show answer

Answer: B. Outcome measures, cost per success and failure rate by segment, decide between designs. Activity and wording are not quality.

Apply it: Evolve Tidewater's assistant from its traffic data

Exercise · about 30 minCase: Tidewater Analytics

Tidewater's assistant, Tide, runs every request through the full agent loop with all four tools loaded. A month of traces shows: 55% of requests are single metric lookups ("what was churn last month?") answered with one query_metrics call; 30% are document questions answered with search_docs; 15% are multi-step requests that create and share reports. p95 latency is 11 seconds against a target of 8.

  1. Segment the traffic and choose a pattern for each segment.
  2. Decide how requests are routed to the right pattern, and what happens when the router is unsure.
  3. Choose the harness for the multi-step segment and justify it.
  4. Name the two measures you will compare before and after the change.
Check your work
Show model answer

1. Segments and patterns

SegmentSharePattern
Single metric lookups55%One call with query_metrics only (augmented LLM)
Document questions30%One call with search_docs, citations on
Report creation and sharing15%The existing agent with all four tools

2. Routing. A small, fast classification step labels each request; it is evaluated on 500 labeled requests before launch. When its confidence is low, the request goes to the agent, which can handle any type at higher cost. Misroutes are sampled weekly.

3. Harness. The report segment stays on the team's Agent SDK loop, because sharing a report is a consequential action that needs a hook to check tenant permissions before share_report runs. A tool runner cannot intercept that call.

4. Measures. p95 latency per segment against the 8-second target, and cost per successful answer per segment (including retries and follow-up questions), compared over two weeks before and after.

Key termsAgentic loopClaude Agent SDKIteration

Sources