LevelUpWith

Explore / AI Engineering

Production Agents on Claude: Design, Build, Run

Design, build and operate Claude agents that hold up in production: choose between workflows and agents, use the Claude Agent SDK and Managed Agents well, and control tools, context, risk and cost. You finish by defending a complete agent design against expert challenge.

Read lesson 1 free →

Levels 1 and 2 are free to read, no account needed. Levels 3 and 4 are free with a free account, and so are 20 answers from the AI tutor.

Three-dimensional cover artwork for “Production Agents on Claude: Design, Build, Run”

Expert · 64 levels · 4 free · Created Oct 2026 · Professionally curated by levelupwith.com

What's inside

  1. Level 1: Orientation: An Independent Course on a Moving TargetFree
    Sets the ground rules: this course is independent of Anthropic and reproduces none of its course or documentation text, and because Claude's agent surfaces change monthly you learn a repeatable way to verify any feature, name, limit or beta flag before relying on it.
    • State that the course is independent of Anthropic, and tell apart the four ways to build on Claude: the Client SDK with your own tool loop, the Claude Code CLI, the Claude Agent SDK and Managed Agents
    • Verify a claim about a feature, option name or version requirement against Anthropic's current documentation and the SDK changelogs, instead of trusting memory or a blog post
    • Label each capability you plan to depend on as stable, beta or unconfirmed, and record the date you checked it
  2. Level 2: The Augmented LLM: The Building BlockFree
    Reframes what you already know from the Claude API (one model call plus tools, retrieval and memory) as the single unit every workflow and agent is assembled from.
    • Describe an augmented LLM as a model call extended with tools, retrieval and memory, and map each of the three to code you have already written
    • Decide whether a problem is solved by one well-equipped call before reaching for anything multi-step
    • Trace a failure in a single augmented call to the prompt, the tool definition or the retrieved context
  3. Level 3: Workflow or Agent: Who Controls the Path
    Draws the line between workflows, where your code fixes the sequence of steps, and agents, where the model chooses its next step, and gives you a decision procedure for picking the simplest one that works.
    • Classify a system as a workflow or an agent by asking whether code or the model decides what happens next
    • Weigh predictability, cost, latency and debuggability against flexibility for a given task, and justify the choice in a short design note
    • Recognise the signals that a task needs an agent (an open-ended number of steps, a path you cannot hard-code) and the signals that it does not
  4. Level 4: Prompt Chaining with Gates
    Builds the simplest workflow: a fixed sequence of model calls where each step consumes the previous output and programmatic gates stop bad intermediate results from flowing downstream.
    • Split a task into sequential calls, each with one clear job and a defined hand-off format
    • Insert code-level gate checks between steps so a failed step halts or reroutes the chain instead of compounding
    • Judge when a chain's extra latency buys enough accuracy to be worth it, and when one call is enough
  5. Level 5: Routing: Classify, Then Dispatch
    Teaches the routing pattern: a classification step sends each input to a specialised prompt, tool set or model, so that one handler is not forced to serve every case badly.
    • Implement a router that classifies an input and dispatches it to a dedicated downstream handler
    • Choose between a model-based and a rule-based classifier, and design a fallback route for inputs that fit no category
    • Measure routing accuracy separately from handler quality so you know which one to fix
  6. Level 6: Parallelisation: Sectioning and Voting
    Covers running model calls concurrently, either by splitting independent subtasks (sectioning) or by running the same task several times and combining the answers (voting).
    • Tell sectioning from voting and pick the right one for a given task
    • Fan out concurrent calls and write the aggregation step, including what to do when one branch fails or times out
    • Estimate the cost and rate-limit impact of a fan-out before you ship it
  7. Level 7: Orchestrator and Workers
    Introduces the pattern where a central model call decides at runtime how to split a task, delegates the pieces to worker calls and synthesises their results, for when the subtasks cannot be known in advance.
    • Explain how orchestrator and workers differs from parallelisation: the subtasks are chosen by the model at runtime, not fixed in code
    • Write a worker brief that carries everything the worker needs, because the worker sees none of the orchestrator's conversation
    • Spot the common failure modes (over-splitting, duplicated work, lossy synthesis) in a transcript
  8. Level 8: Evaluator and Optimiser Loops
    Teaches the generate, critique and revise loop, where one call produces output and another grades it against explicit criteria until it passes or a cap is reached.
    • Build a generator and evaluator pair with written acceptance criteria and a hard cap on iterations
    • Decide whether a task suits the pattern by checking that the criteria are clear and that feedback measurably improves the output
    • Prevent the loop from oscillating or rubber-stamping by making the evaluator's feedback specific and its pass condition checkable
  9. Level 9: Anatomy of the Agent Loop
    Dissects the loop every agent runs (the model evaluates, requests tools, your harness executes them and feeds the results back, repeat) by hand-writing a minimal version on the Messages API you already know.
    • Write a minimal agent loop on the Claude API that keeps calling the model until a response contains no tool calls
    • Define a turn as one tool-use round trip and trace how prompts, tool inputs and tool results accumulate in context across turns
    • Point to each place in the loop where a harness can step in: before a tool runs, after it returns and when the loop ends
  10. Level 10: Stop Conditions and Runaway Loops
    Focuses on how a loop ends: natural completion, turn caps, spend caps, errors, refusals and output-token limits. Covers why every production agent needs explicit limits and a plan for each kind of exit.
    • List the ways an agent loop can terminate and tell a finished task from one that merely stopped
    • Add turn and budget limits to a loop, and explain why a spend cap checked after each response can overshoot by roughly one response's cost
    • Design the handling for each exit, whether to resume with a higher limit, retry, escalate to a person or fail, so that a capped run is never treated as a success
  11. Level 11: The Claude Agent SDK: What You Get
    Introduces the Claude Agent SDK as Claude Code's agent loop, tools and context management packaged as a Python and TypeScript library that runs in a process you operate, and gets a first agent running.
    • Explain what the SDK is and how it differs from writing the tool loop yourself on the Client SDK, whose own tool runner is currently documented as beta
    • Install the Python or TypeScript package, authenticate with an API key and run a first query() call end to end
    • Name the capabilities the SDK brings (built-in tools, permissions, hooks, sessions, subagents, MCP, skills and plugins) and check the changelog for what has changed in your version
  12. Level 12: Reading the Message Stream and the Result
    Teaches you to consume what the SDK yields while the loop runs (system, assistant, user, stream and result messages) and to branch correctly on the result subtype rather than assuming success.
    • Handle the core message types and extract text blocks, tool calls and the final result in Python or TypeScript
    • Branch on the result subtypes (success, max turns, max budget, error during execution, structured-output retries exhausted) and read the final text only on success
    • Capture cost, usage, turn count and session ID from every result, and wrap a single-shot query in error handling because it raises after yielding an error result
  13. Level 13: Built-in Tools and Shaping the Tool Surface
    Surveys the tools the SDK ships with (file operations, search, shell, web, tool search and orchestration tools) and how to decide which of them a given agent should actually have.
    • Describe what each category of built-in tool does and which of them change state rather than only read it
    • Explain why read-only tools can run concurrently while state-changing tools run one at a time, and what that means for latency
    • Choose a minimal tool surface for a specific agent and justify each tool you include
  14. Level 14: Permission Rules and Evaluation Order
    Explains the fixed order in which the SDK decides whether a tool call runs (hooks, deny rules, ask rules, permission mode, allow rules, then your callback) and the surprising consequences of that order.
    • Recite the evaluation order and predict the outcome of a tool call given a set of rules and a mode
    • Explain why an allow list pre-approves tools without restricting the others, and why removing a tool by its bare name in the deny list is the way to put it out of reach
    • Write scoped allow and deny rules for shell commands and file paths, and name the limits of pattern-matching a shell command as written
  15. Level 15: Permission Modes and Approval Callbacks
    Covers the permission modes (default, dontAsk, acceptEdits, plan, auto and bypassPermissions) and the runtime approval callback, so you can match the level of oversight to where the agent runs.
    • Pick a mode for an interactive app, a headless service and an isolated CI container, and defend each choice
    • Implement an approval callback for calls that nothing earlier resolved, knowing that auto-approved calls never reach it
    • Set the mode explicitly instead of relying on the default, which has changed between SDK versions, and switch modes mid-session as trust builds
  16. Level 16: Hooks I: Intercepting Tool Calls Before They Run
    Introduces hooks as callbacks in your own process and concentrates on the pre-tool-use hook: matching tools, then allowing, denying, asking, deferring or rewriting the input before anything executes.
    • Register a pre-tool-use hook with a matcher and return a deny decision with a reason the model can act on
    • Rewrite a tool's input in a hook, for example redirecting a file path, and say how that interacts with the permission decision you return
    • Explain why checks that must run on every call belong in a hook and not in the approval callback, and how the strictest decision wins when several hooks disagree
  17. Level 17: Hooks II: Results, Lifecycle and Failure Behaviour
    Extends hooks past the pre-tool gate to tool results, stops, subagent events, compaction and notifications, including the gaps between the Python and TypeScript SDKs and what happens when a hook times out.
    • Use post-tool hooks to audit, add context to or replace a tool's output before the model sees it
    • Choose between a blocking hook and an asynchronous side-effect hook, and state what an asynchronous hook cannot do
    • Check which hook events your SDK language supports, and design for a hook timing out so that a slow callback neither hangs the agent nor silently opens a gate
  18. Level 18: Sessions: Continue, Resume and Fork
    Covers how the SDK persists conversation history as sessions and how to continue the latest one, resume a specific one by ID, or fork to explore an alternative, including what sessions do not capture.
    • Capture a session ID and choose correctly between continue, resume and fork for a given application shape
    • Explain that a session stores the conversation, not the filesystem, so a fork's file edits are real and shared, and say when file checkpointing is the tool to check instead
    • Plan resumption across machines or serverless hosts by using a session store, moving the transcript file, or passing captured results into a fresh session
  19. Level 19: System Prompts, Project Instructions and Settings
    Shows how an SDK agent gets its standing instructions (the system prompt you configure plus project instruction files and settings loaded from disk) and why durable rules belong there rather than in the first prompt.
    • Configure the agent's system prompt and control which settings sources are loaded, verifying the current option names in the SDK reference
    • Put persistent rules in project instruction files so they survive automatic compaction, which can drop instructions given early in a conversation
    • Reason about how system prompt choices affect prompt-cache reuse and per-request context cost
    • Author an Agent Skill as a packaged set of instructions and resources, make it available to an SDK agent, explain how the agent discovers and loads it on demand, and decide when a capability belongs i
  20. Level 20: Subagents in the SDK
    Introduces the SDK's subagent mechanism: defining specialised agents that the main agent spawns with a fresh context, scoped tools and their own prompt, and that return only their final response.
    • Define a subagent with its own description, prompt, tool set and effort level, and have the main agent delegate to it
    • Explain what a subagent inherits and what it does not: it gets no parent conversation history, but it does load project-level context, and only its final response returns to the parent
    • Account for the operational details: permission-mode inheritance, subagent spend counting toward the budget cap, and tracking subagents through start and stop hooks
  21. Level 21: Writing Your Own Loop on the Messages API
    Build the smallest honest agent loop directly on the Messages API to see exactly which jobs the Agent SDK has been doing for you.
    • Write a loop that sends messages, executes requested tool calls, returns tool results and exits on the correct stop reasons
    • List the responsibilities a harness owns beyond the loop: tool execution, permissions, context management, session state and caching
    • Explain where the client SDK's beta tool runner sits between a hand-written loop and the Agent SDK, and why its status needs checking before you depend on it
  22. Level 22: Hardening a Custom Harness
    Turn a toy loop into something that survives production by adding budgets, retries, cancellation and safe handling of parallel tool calls.
    • Add turn, token and wall-clock budgets so a run always ends with a clear reason
    • Handle API errors, tool timeouts and several tool calls in one turn without corrupting the message history
    • Persist loop state so a crashed or cancelled run can be resumed or audited instead of restarted blind
  23. Level 23: SDK or Custom Harness: Making the Call
    Weigh the Agent SDK against a harness you own using concrete criteria rather than preference, and record the decision so it can be revisited.
    • Compare the two options on control, runtime and language constraints, upgrade exposure, maintenance cost and time to first working agent
    • Identify the signals that justify owning the loop, and the signals that say you are rebuilding the SDK badly
    • Write a short decision record that names what would make you switch later, including a move to a hosted harness
  24. Level 24: Managed Agents: The Hosted Harness Model
    Understand what Claude Managed Agents is, how its four concepts (agent, environment, session, events) fit together, and what its beta status means for a production commitment.
    • Describe the roles of agent, environment, session and events, and who runs the loop compared with the Agent SDK and the Messages API
    • State the current beta status and beta header requirement, and name the features listed as research preview (such as MCP tunnels) as things to re-verify
    • Identify constraints that follow from server-side state, such as data retention eligibility, before choosing Managed Agents for a workload
  25. Level 25: Defining a Managed Agent
    Create a reusable agent definition (model, system prompt, tools, MCP servers and skills) that many sessions reference by ID.
    • Create an agent through the API or the ant CLI and reference it from sessions
    • Decide what belongs in the agent definition and what belongs in a session's first message
    • Manage agent definitions as reviewed, version-controlled configuration, and check the current docs for how updates affect existing sessions
  26. Level 26: Managed Agent Tools: Toolset, Custom and MCP
    Configure the built-in agent toolset, add custom tools that your application executes, and connect MCP servers, giving each agent only what it needs.
    • Enable the agent toolset and switch individual tools on or off with a default config plus per-tool overrides
    • Define a custom tool and explain why your code, not the hosted harness, runs it and returns the result
    • Choose between a built-in tool, a custom tool and an MCP server for a given capability, and restrict the web tools to approved domains
  27. Level 27: Permission Policies in Managed Agents
    Control whether server-executed tools run automatically, pause for confirmation or are evaluated per call, and wire up the confirmation round trip.
    • Apply the always-allow, always-ask and auto policies per tool, and explain why the built-in toolset and MCP toolsets have different defaults
    • Handle a session that pauses needing action by sending a tool confirmation that allows or denies the call
    • Design a policy map for an agent that keeps read-only work fast while gating tools with side effects
  28. Level 28: Environments and the Session Lifecycle
    Configure where sessions run and manage a session from creation through idle, resumption and deletion as a long-lived, stateful resource.
    • Create an environment and start a session that binds an agent to it for a specific task
    • Explain what a session persists server-side (conversation history, sandbox state and outputs) and what that means for cost and data handling
    • Decide when to continue an existing session, when to start a fresh one, and when to delete sessions and uploaded files
  29. Level 29: Events and Streaming: Driving a Session
    Run a session through its event stream: send user events, consume agent and session events over SSE, answer custom tool calls, and steer or interrupt mid-run.
    • Open the stream before sending events and explain the race this avoids
    • Build a consumer that reacts to agent, session and span events, recovers after a dropped connection using the persisted event history, and returns results for custom tool calls
    • Steer or interrupt a running session, and tell an idle session that has finished from one that is waiting on you
  30. Level 30: Anthropic-Hosted or Self-Hosted Sandboxes
    Choose where tool execution happens by comparing Anthropic's cloud sandboxes with a self-hosted environment served by your own worker.
    • Explain the self-hosted split: orchestration stays with Anthropic while your environment worker claims queued sessions and runs tool calls locally
    • Compare the two on network reach, file and repository mounting, lifecycle ownership and what data still flows to Anthropic's control plane
    • Pick a deployment for a compliance or private-network scenario, noting current limits such as supported session resources and that MCP tunnels are a separate, more limited preview
  31. Level 31: Tool Design I: Names, Descriptions and Schemas
    Design the interface an agent sees so it picks the right tool and fills the arguments correctly on the first try.
    • Write tool descriptions that say what the tool does, when to use it, when not to, and what each parameter changes
    • Consolidate overlapping operations and namespace tool names so selection stays unambiguous as the catalogue grows
    • Shape input schemas with enums, constraints and sensible defaults that make invalid calls hard to express
  32. Level 32: Tool Design II: Responses and Errors That Steer
    Design what a tool returns, on success and on failure, so each result moves the agent forward without flooding its context.
    • Return high-signal results with stable, meaningful identifiers, plus pagination or filtering in place of raw dumps
    • Write error results that tell the agent what went wrong and what to try next, separating retryable from terminal failures
    • Make tools with side effects idempotent or safely repeatable so an agent retry cannot double-apply an action
  33. Level 33: Distributing Tools with MCP Servers
    Package tools as an MCP server that several agents and teams can share, and handle the versioning, authentication and trust questions that sharing creates.
    • Decide when a tool should stay in-process and when it earns its own MCP server
    • Publish a server with scoped credentials and a versioning approach that does not break existing agents when tools change
    • Explain why a newly added or changed tool on a shared server is a supply-chain risk, and how allowlists and ask-by-default policies contain it
  34. Level 34: Approval Patterns for Tool Calls
    Choose and implement an approval pattern (pre-approved, ask every time, ask once, or propose then commit) matched to each tool's blast radius.
    • Classify tools by reversibility and impact, and assign each an approval pattern
    • Split a risky action into a dry-run or plan tool and a separate commit tool so that reviewers approve a concrete diff
    • Implement the same approval design with SDK permission callbacks or hooks and with Managed Agents policies, and note where they behave differently
  35. Level 35: Structured Output: Validate, Repair, Retry
    Get machine-readable results out of an agent reliably by combining schema-constrained output with validation and a bounded repair loop.
    • Choose between schema-constrained output where your platform offers it, a final 'submit result' tool, and parsing free text, with the trade-offs of each
    • Validate output against a schema plus business rules, and feed precise validation errors back to the model for repair
    • Cap retries and define the fallback (escalate, partial result or fail closed) so bad output never flows silently downstream
  36. Level 36: Task Decomposition for Agents
    Break a large goal into units of work with clear boundaries, inputs and done-criteria before deciding how many agents are involved.
    • Decompose a task by dependency and by separability of context, identifying what can run in parallel and what must be sequential
    • Write a unit-of-work spec with objective, inputs, output format, constraints and a verifiable completion test
    • Spot decompositions that are too fine or too coupled, and predict the coordination cost they will create
  37. Level 37: Coordinator and Subagent Architectures
    Design a multi-agent system in which a coordinator plans and delegates to specialised subagents, with explicit ownership of tools, models and budgets.
    • Lay out a coordinator and subagent topology and state what each agent decides, owns and is forbidden from doing
    • Assign tools, model tier and turn or token budgets per subagent according to its role rather than copying the coordinator's setup
    • Decide between fixed, predefined subagents and dynamically spawned ones for a given workload, and bound fan-out so cost stays predictable
  38. Level 38: Context Passing: Briefing a Subagent
    Write the delegation brief that is the only thing a subagent knows, passing enough context for it to succeed without leaking the coordinator's whole history.
    • Write a self-contained brief covering the goal, known facts, constraints, the tools to prefer and the exact output expected
    • Choose between inlining context, passing references to files or artefacts, and letting the subagent rediscover information, and justify the choice on cost and accuracy
    • Diagnose failures caused by under-briefing or over-briefing from a subagent's trace
  39. Level 39: Handoffs and Result Contracts
    Define what comes back from a subagent and how control and state transfer between agents so that nothing is lost or silently invented at the boundary.
    • Specify a result contract with status, findings, evidence, open questions and a self-reported confidence, in place of free prose
    • Distinguish delegation, where control returns to the coordinator, from a true handoff, where another agent takes ownership, and state what must travel with each
    • Keep large outputs out of the coordinator's context by returning summaries with pointers to stored artefacts
  40. Level 40: Error Propagation Across Agents
    Make failures in a multi-agent system visible, classified and contained, so that one subagent's bad result or crash does not become the coordinator's confident wrong answer.
    • Classify subagent outcomes as success, partial, failed, timed out or refused, and define the coordinator's response to each
    • Stop cascading failures with per-subagent budgets, bounded retries and checks on results before they are merged
    • Report partial completion honestly in the final output, stating what was not done and why
  41. Level 41: When One Agent Beats Many
    Learn to judge whether a multi-agent design earns its extra tokens, latency and failure modes, or whether a single well-equipped agent would do the job better.
    • Estimate the token, latency and coordination cost of a multi-agent design against a single-agent baseline for the same task
    • Name the task properties that justify splitting work (breadth, independence, context pressure) and the ones that argue against it (tight coupling, shared state)
    • Collapse an over-engineered coordinator-and-workers design into one agent and state what is gained and lost
  42. Level 42: The Context Window as a Budget
    Treat the context window as a finite, shared budget and measure what an agent run actually spends it on before choosing any technique to manage it.
    • Break a long agent transcript into system prompt, tool definitions, tool results, reasoning and conversation, and find the biggest consumers
    • Explain why answer quality can degrade as context fills, well before the hard limit is reached
    • Set a per-run context budget and decide which signals should trigger intervention
  43. Level 43: Compaction: Summarising Without Forgetting
    Learn how compaction replaces older history with a summary, how the Agent SDK and the Claude API expose it, and how to control what survives.
    • Describe what triggers compaction in a long-running session and what is typically lost afterwards
    • Write compaction instructions that preserve decisions, open tasks, file paths and constraints
    • Check the current Anthropic docs for the availability and beta status of compaction features before relying on them
  44. Level 44: Pruning and Shaping Tool Output
    Cut the largest source of context bloat by clearing stale tool results and by making tools return less in the first place.
    • Configure or implement clearing of old tool results while keeping the most recent ones, and explain the effect on prompt caching
    • Redesign a verbose tool to return paginated, filtered or reference-style output instead of raw dumps
    • Decide when to prune, when to compact and when to offload results to files the agent can re-read
  45. Level 45: Context Isolation by Design
    Use separate context windows deliberately so that noisy exploration, untrusted content and unrelated subtasks never pollute the main agent's working context.
    • Decide which work belongs in an isolated context and what condensed result should come back from it
    • Use fresh sessions or forks to stop a failed approach contaminating later reasoning
    • Explain the trade-off between isolation and the loss of shared detail, with a concrete example
  46. Level 46: Memory That Outlives the Session
    Design persistent memory for agents (project instruction files, file-based memory tools and Managed Agents memory stores) and decide what deserves to be remembered.
    • Distinguish in-context state, session history and persistent memory, and choose the right home for a given fact
    • Design a memory layout with rules for what to write, when to update and when to delete
    • Compare the SDK's file-based memory, the API memory tool and Managed Agents memory stores, verifying which are currently in beta
  47. Level 47: Provenance: Knowing Where Context Came From
    Track the origin, age and trust level of everything in an agent's context and memory so that claims can be audited and stale or poisoned entries can be removed.
    • Attach source, timestamp and trust metadata to tool results and memory entries
    • Make an agent cite the source behind each factual claim in its final output
    • Trace a wrong answer back to the context item that caused it and correct or expire that item
  48. Level 48: Threat Modelling an Agent
    Open the safety phase by mapping what an agent can touch, who can influence it and what the worst realistic outcome is, before choosing any control.
    • Draw an agent's trust boundaries: inputs, tools, credentials, data stores and outbound channels
    • Rank actions by blast radius and reversibility to decide where controls are needed
    • Explain why prompt instructions alone are not a security control and where deterministic enforcement must sit
  49. Level 49: Placing Human Checkpoints in a Workflow
    Decide where a human belongs in an agent's task flow (plan review, mid-run checkpoint or final sign-off) so that oversight is meaningful rather than a reflex click.
    • Choose between plan approval, checkpoint review and output review for a given task and risk level
    • Design a review request that gives the human enough context to decide in seconds
    • Handle asynchronous review: pausing, persisting state, timeouts and resuming the session safely
  50. Level 50: Escalation and Confidence Signals
    Build agents that know when to stop and hand off, using observable signals instead of trusting the model's self-reported confidence.
    • Define escalation triggers from observable evidence such as repeated tool failures, conflicting sources, policy matches and budget exhaustion
    • Explain why self-reported confidence is poorly calibrated and what to use in its place
    • Write a handoff package that lets a human continue the task without re-reading the whole trace
  51. Level 51: Prompt Injection: How Agents Get Hijacked
    Understand direct and indirect prompt injection as they apply to tool-using agents, and why access to private data, untrusted content and outbound channels together is dangerous.
    • Trace an indirect injection from a web page, document or tool result through to an unintended action
    • Identify every place untrusted text enters a given agent's context, including MCP servers and memory
    • Explain why no model or filter currently makes injection impossible
  52. Level 52: Layered Defences Against Injection
    Assemble defence in depth so that a successful injection has little to exploit: separate untrusted content, constrain what follows it and check actions before they run.
    • Quarantine untrusted content in an isolated, tool-poor subagent that returns only structured, validated data
    • Add pre-tool-call checks that block exfiltration patterns such as unexpected outbound requests carrying sensitive data
    • Build an injection test set and measure how often attacks succeed against each layer
  53. Level 53: Least Privilege: Tools, Credentials and Scopes
    Give each agent and subagent only the tools, permissions and credentials its task needs, and keep secrets out of the model's reach.
    • Write per-agent tool allowlists and permission rules that are read-only by default
    • Issue short-lived, narrowly scoped credentials and inject them outside the model's context
    • Audit an existing agent configuration and remove capabilities it does not use
  54. Level 54: Sandboxing and Network Egress Control
    Contain what an agent's code execution can reach using OS-level sandboxes, containers and network allowlists that hold even if the model is fully compromised.
    • Explain how permission rules and OS-level sandboxing differ and why production agents need both
    • Configure filesystem and network restrictions for an SDK agent or a Managed Agents environment, checking current docs for exact options
    • Design an egress allowlist that permits the task while closing the obvious exfiltration routes
  55. Level 55: Hard Controls on Destructive Actions
    Put deterministic gates in front of irreversible operations (deletes, payments, deploys, outbound messages) so that no model output alone can trigger them.
    • Write a pre-tool-use hook or permission policy that denies or requires approval for destructive commands
    • Redesign destructive tools around dry runs, soft deletes, idempotency keys and undo paths
    • Add rate limits, spend caps and a kill switch that stop a runaway agent mid-session
  56. Level 56: Building a Task Suite
    Start evaluation by turning real usage and real failures into a versioned set of tasks with clear success criteria and reproducible starting environments.
    • Write evaluation tasks with unambiguous success criteria and a resettable environment
    • Source tasks from production failures, edge cases and adversarial inputs, not only happy paths
    • Split the suite into capability and regression sets and explain what each tells you
  57. Level 57: Reading Traces to Find Root Causes
    Capture full agent transcripts (every model turn, tool call and result) and read them systematically to find why a run failed, not just that it failed.
    • Record a complete trace of an agent run, including subagent activity and hook decisions
    • Classify failures into categories such as wrong tool, bad arguments, lost context, early stop and looping
    • Turn a diagnosed trace into a targeted fix and a new regression task
  58. Level 58: Graders: Code, Model and Human
    Choose and build graders that score agent outcomes and transcripts reliably, and calibrate model-based graders against human judgement.
    • Write code-based graders that check end state rather than the exact path the agent took
    • Write a model-graded rubric and measure its agreement with human labels before trusting it
    • Decide when to grade the outcome, when to grade the transcript and when human review is unavoidable
  59. Level 59: Evals Under Non-Determinism: Trials and Gates
    Run evaluations as an engineering discipline: repeat trials to handle variance, compare versions honestly and gate releases on results.
    • Run several trials per task and report pass rates with enough runs to tell signal from noise
    • Compare two prompt, tool or model versions on the same suite and decide whether a difference is real
    • Wire the regression suite into CI with thresholds that block a release
  60. Level 60: Production Observability for Agents
    Instrument live agents with traces, metrics and logs so you can see what they are doing, detect degradation and debug incidents without guessing.
    • Export spans for model calls, tool calls and subagents to an OpenTelemetry-compatible backend, checking current SDK support
    • Define operational signals worth alerting on: tool error rate, turns per task, escalation rate and stop reasons
    • Feed sampled production sessions back into the evaluation suite while redacting sensitive data
  61. Level 61: LangGraph, Strands and PydanticAI: A Comparison
    Compares how LangGraph, Strands Agents and PydanticAI model the loop, state, tools and human approval against the Claude Agent SDK and Managed Agents, for comparison only and with every feature claim checked against each project's current documentation.
    • Map each framework's core abstraction (explicit state graph, model-driven loop, typed agent with validated outputs) onto the course's concepts of loop, tools, sessions, hooks and subagents
    • Judge when a framework's strengths, such as explicit graph control, model portability or type-safe outputs, outweigh the cost of leaving the Claude-native harness, and when they do not
    • Verify a framework's current features and version against its own documentation before relying on them, and flag what is unconfirmed
  62. Level 62: Capstone I: Writing the Agent Design Document
    Turns a realistic production brief into a complete agent design document that records one explicit decision, with reasons, for each layer taught in the course.
    • Derive requirements, success criteria and risk limits from a brief, and decide whether it calls for a workflow, a single agent or a multi-agent system
    • Specify the architecture end to end: harness choice (Agent SDK, custom loop or Managed Agents), tools and MCP servers, permissions and hooks, context and memory strategy, human approval points, and the evaluation and observability plan
    • Record each major decision with the alternatives rejected, the trade-off accepted and the evidence that would make you change it
  63. Level 63: Capstone II: Defending the Design Under Review
    Stress-tests the capstone design as a senior review board would, with failure scenarios, security challenges and cost pressure, and revises it where the defence does not hold.
    • Walk the design through adversarial scenarios (prompt injection through tool output, a runaway loop, a failed subagent, a destructive action, a cost spike) and show which control catches each one
    • Answer a reviewer's hard questions with numbers and evidence: expected cost and latency per task, eval pass thresholds, blast radius of the worst credible failure, and a rollback plan
    • Separate the weaknesses that need a redesign from the residual risks you can accept, and write up the accepted ones with their monitoring and escalation path
  64. Level 64: Final Challenge: Production Agents End to End Exam
    A comprehensive review of the whole course that tests judgement on mixed scenarios, from choosing a pattern and a harness through tools, multi-agent design, context, guardrails, evaluation and operations.
    • Choose and justify the right pattern, harness and deployment model for unfamiliar scenarios, drawing on every phase of the course
    • Diagnose faulty agent designs and traces by naming the root cause, whether in the loop and stop conditions, tool design, context handling, permissions or evaluation, and prescribe the fix
    • Show a repeatable habit of checking current Claude features, limits and beta status against Anthropic's own pages before committing to a design

Access

Levels 1 and 2 are free to read, no account needed. Levels 3 and 4 are free with a free account, and so are 20 answers from the AI tutor. Every level, the podcast edition and the AI tutor come with All Access at £4.99/month or any Creator plan — see pricing.

Read lesson 1 free →

More like this