Agentic Engineering · 24/24

THE COMPLETE AGENTIC ENGINEERING CHEAT SHEET

One sitting. One reference. The whole curriculum.


PART 0 — THE MATHEMATICAL PRELUDE

Probability and Evaluation

ConceptFormula / RuleUse
Hoeffding$\Pr(\bar X-\mu
BernsteinPr⁡≤2e−nt2/(2σ2+2Mt/3)\Pr\le 2e^{-nt^2/(2\sigma^2+2Mt/3)}Sharper near p=0p=0 or 11 — agent evaluation’s regime
McDiarmid$\Pr(f-\mathbb{E}f
Paired bootstrapResample (xiA,xiB)(x_i^A,x_i^B) jointlyΔ\Delta confidence interval; exploits within-task covariance
Powern≥(z1−α/2+z1−β)2[p1(1−p1)+p2(1−p2)]/Δ2n\ge(z_{1-\alpha/2}+z_{1-\beta})^2[p_1(1-p_1)+p_2(1-p_2)]/\Delta^2~4,100 per arm for 3 points at 60%
HolmStep-down, α/(m−j+1)\alpha/(m-j+1)FWER control when false positives are costly
Benjamini–HochbergLargest kk with p(k)≤kα/mp_{(k)}\le k\alpha/mFDR control for screening

POMDPs and RL

ConceptFormulaUse
POMDP(S,A,T,O,Z,R,γ)(\mathcal{S},\mathcal{A},\mathcal{T},\mathcal{O},\mathcal{Z},R,\gamma)Formal agent object
Beliefbt(s)=Pr⁡(st=s∣ht)b_t(s)=\Pr(s_t=s\mid h_t)Context is a lossy, non-Bayesian surrogate
Context as observationct=ϕ(ht)c_t=\phi(h_t); Zϕ(c∣s,a)=∑h:ϕ(h)=cPr⁡(h∣s,a)\mathcal{Z}_\phi(c\mid s,a)=\sum_{h:\phi(h)=c}\Pr(h\mid s,a)Harness defines the POMDP
Load-bearing theoremJ(π;MH1)≠J(π;MH2)J(\pi;\mathcal{M}_{H_1})\neq J(\pi;\mathcal{M}_{H_2})Harness-controlled comparison is mandatory
Policy gradient∇J=E[∑∇log⁡πθ Aπ]\nabla J=\mathbb{E}[\sum\nabla\log\pi_\theta\,A^\pi]RL foundation
GRPOA^i=(ri−rˉ)/std(r)\hat A_i=(r_i-\bar r)/\mathrm{std}(r)Default for verifiable agentic RL; small-GG bias
Entropy collapse$dH/dt\approx-\eta,\mathrm{Var}(\hat A)\mathbb{E}[\nabla\log\pi
KL regularisation$\mathbb{E}[R]-\beta D_{\mathrm{KL}}(\pi_\theta\pi_{\mathrm{ref}})$

Information Theory

ConceptFormulaUse
DPIX→Y→Z⇒I(X;Z)≤I(X;Y)X\to Y\to Z\Rightarrow I(X;Z)\le I(X;Y)Compaction cannot create information
Tool-cost boundE[tokens]≥H(T,A∣C)+ℓ(s)\mathbb{E}[\text{tokens}]\ge H(T,A\mid C)+\ell(s)Interface efficiency’s lower bound
Interface inefficiencyη=(E[tok]−(H+ℓ))/(H+ℓ)\eta=(\mathbb{E}[\text{tok}]-(H+\ell))/(H+\ell)Tool surface’s diagnostic

Verification (The Core)

ConceptFormulaUse
TPR / FPRPr⁡(V=1∣C=1)\Pr(V=1\mid C=1), Pr⁡(V=1∣C=0)\Pr(V=1\mid C=0)Verifier’s operating point
PrecisionTPR⋅π/(TPR⋅π+FPR(1−π))\mathrm{TPR}\cdot\pi/(\mathrm{TPR}\cdot\pi+\mathrm{FPR}(1-\pi))Base-rate dependent; 99%/1% is a coin flip at π=0.01\pi=0.01
Autonomy threshold(1−TPR)πCf<Ch(1-\mathrm{TPR})\pi C_f<C_hAutonomous release is rational iff missed-failure cost < review cost
Cost per correct task(Cg+Cv+CfFPR(1−π))/(TPRπ)(C_g+C_v+C_f\mathrm{FPR}(1-\pi))/(\mathrm{TPR}\pi)Optimise over the ROC
SPRTAccept if Λn≥log⁡1−βα\Lambda_n\ge\log\frac{1-\beta}{\alpha}; reject if ≤log⁡β1−α\le\log\frac{\beta}{1-\alpha}Optimal sequential verification
Sensitivity orderFPR is most sensitive (typically), then TPRCalibration priority

Control and Systems

ConceptFormulaUse
Guide vs sensorFeedforward (prevent) vs feedback (detect)Internal model principle: harness detects only what it models
Stabilityη<2/(L(1+2d))\eta<2/(L(1+2d)); steady-state ∼ησ2/(2n)\sim\eta\sigma^2/(2n)Harness evolution loop’s stability
Little’s lawL=λWL=\lambda WThroughput ceiling
KingmanE[Wq]≈ρ1−ρca2+cs22E[S]\mathbb{E}[W_q]\approx\frac{\rho}{1-\rho}\frac{c_a^2+c_s^2}{2}\mathbb{E}[S]Agent tail latency is structurally worse
Prefix cachingC=hCcached+(1−h)Cprefill+CgenC=hC_{\text{cached}}+(1-h)C_{\text{prefill}}+C_{\text{gen}}Cache-aware layout
Three-term costE[tok]ptok+E[tools]cˉtool+E[ver]cver\mathbb{E}[\text{tok}]p_{\text{tok}}+\mathbb{E}[\text{tools}]\bar c_{\text{tool}}+\mathbb{E}[\text{ver}]c_{\text{ver}}Diagnoses cost regressions

Security

ConceptRuleUse
Lethal trifectaPrivate data + untrusted content + external commsArchitecture-elimination gate
Confused deputyPrivileged agent used on adversary’s behalfCapability scoping’s target
CapabilityUnforgeable, scoped, expiring, attenuableLeast-authority mechanism
IFCLabels + flow policiesProvable-by-construction

PART I — FOUNDATIONS AND EVALUATION

Module 1: The Harness’s Four Elements

ElementFunctionNecessity
Agent loopCalls model, dispatches actions, feeds observations backIteration
Tool interfaceTyped action space + dispatcherEffect on environment
Context managementAssembly, trimming, formattingBounded, usable observation
Control mechanismsTermination, permissions, retry, boundsSafe termination and action

Key theorems:

  • Harness determines return at fixed model — the harness defines the action space, transition kernel, and observation function.
  • Finite truncation is not sufficient — the scrolled-out-action construction.
  • Context is a lossy, non-Bayesian belief surrogate — three losses: truncation, summarisation, formatting.

Workflow vs agent: workflow if the step sequence is knowable at design time (information test); agent otherwise. Value of feedback Vf=J(π∗)−J(πw)V_f=J(\pi^*)-J(\pi_w).

Architecture decision tree: (1) knowable at design time → workflow; (2) high failure cost → workflow with gates; (3) distinct large contexts → multi-agent; (4) low structure variance → single agent + router; (5) else → single agent.

Module 2: Tool Interfaces

ConceptRuleUse
Parsing pipelineExtraction → syntactic parse → schema validation → semantic validation → dispatchEach stage’s failure mode
Grammar-constrained decodingMask logits to A(q)A(q)Eliminates syntax/schema failures; grammar tax
Decision ruleConstrain iff pfcr>cg+qp_f c_r>c_g+qExpected-cost comparison
ACI thesisTool ergonomics dominate raw capability at the marginSWE-agent, tier R
Four ergonomic propertiesLow spec cost, informative feedback, consistent semantics, discoverable preconditionsDesign checklist
Coarse / fine-grained / code-executionTrade-off between description and disambiguation costCrossover complexity c∗c^*

Protocols: MCP (tools; stdio/HTTP+SSE; OAuth 2.1); A2A (agents; agent cards; card-rewriting risk); skills files (procedures; progressive disclosure; 9/11 vs 8/11 adoption).

Protocol decision: local registry → MCP → A2A → skills, biased to simplest.

Module 3: Context Engineering

ConceptRuleUse
Lost in the MiddleU-shaped attention; primacy and recencySystem prompt first, instruction last
Distractor sensitivityIrrelevant content degrades performanceInclude less, not more
Nominal vs effective contextLeff(ϵ)L_{\text{eff}}(\epsilon): the length where performance holds within toleranceThe useful budget is a fraction of the nominal
Compaction policyκ:H→C\kappa:\mathcal{H}\to\mathcal{C}Lossy projection
Projection errorε(κ)=S(κfull)−S(κ)\varepsilon(\kappa)=S(\kappa_{\text{full}})-S(\kappa)The operational loss
Oracle summaryThe upper bound: S(κoracle)S(\kappa_{\text{oracle}})Compaction inefficiency’s measure
MemGPTMain + external context, paged by modelWhen memory exceeds context
Evolving playbookAccumulated strategies (tier P)The hypothesis
Retrieval decisionJIT iff (pjit−ppre)V>cjit−cpre(p_{\text{jit}}-p_{\text{pre}})V>c_{\text{jit}}-c_{\text{pre}}Pre-load vs JIT
Cache-aware layoutStable first, volatile lastMatches U-curve AND caching

Summarisation quality trap: good summary ≠ good task outcome. Measure downstream success.

Module 4: Reasoning and Test-Time Compute

ConceptRuleUse
ReActThought → action → observationHarness configuration, not capability
ToTSearch over partial solutions; value function is the bottleneckExpensive; needs reliable value function
ReflexionReflection after failure, stored in memoryWorks when external signal makes failure legible
Self-correction without signalNot guaranteed to improve; can decrease correctnessThe central limit
Design ruleVerifier-gated loop, not free-standing refinementThe harness implication
Process vs outcome supervisionDense per-step vs sparse terminalPRM resists “right answer, wrong reasoning”
Oracle bound1−(1−p)n1-(1-p)^nBest-of-n ceiling
Verifier-limited asymptotePr⁡→πv\Pr\to\pi_vThe verifier’s precision is the bottleneck
METR time horizonTask length at 50% successError bars ~2×; domain variation 40–100×; 50% ≠ delegable

Delegable horizon trt_r: where success = rr (98%+ for critical tasks).

Module 5: Evaluation Science

ConceptRuleUse
Benchmark triple(T,V,P)(\mathcal{T},\mathcal{V},\mathcal{P})A number is a property of the triple
pass^k (iid)pkp^kBaseline
pass^k (heterogeneous)≈pk+k(k−1)2pk−2σ2\approx p^k+\frac{k(k-1)}{2}p^{k-2}\sigma^2Heterogeneity inflates
Harness confoundSignificant (αβ)ij(\alpha\beta)_{ij}Model ranking depends on harness
Variance decompositionRharness2=σ^β2/totalR^2_{\text{harness}}=\hat\sigma_\beta^2/\text{total}The load-bearing measure
Pre-registrationAnalysis plan before dataDiscipline
ContaminationBenchmark data in trainingTemporal split is the evidence
Held-out familyNon-public tasks from deployment distributionThe deployment defence
Best-of-k vs pass^k1−(1−p)k1-(1-p)^k vs pkp^k30× difference at p=0.5,k=5p=0.5,k=5
Evidence tiersA/B/C; R/S/P/CApplied to the curriculum’s own citations

Module 6: Harness Anatomy and Classification

ConceptRuleUse
ETCLOVGExecution, Tooling, Context, Lifecycle, Observability, Verification, GovernanceAnalytical taxonomy
Four necessary elements → ETCLOVGLoop→L/O/G; Tools→T/E/G; Context→C/O; Control→L/G/VMany-to-many mapping
Eleven-system studyarXiv:2609.00006, SEmpirical anatomy
90-line scaffoldMinimum-viable harnessThe addition obligation
Convergence and imitationBehaviour migrating into configThe unresolved interpretation
IrreducibleRequired for every modelPermissions, verification, audit
Capability-compensatingUnnecessary with perfect modelScaffolds to shed
Performance-tuningImproves metric without being requiredRouting, compaction thresholds
Counterfactual test“If the model were perfect, would cc be required/improve?”Classification procedure
Classification is relativeTo (model, deployment)Must state referents
Three confusionsRetry (mixed), verifier (irreducible if autonomy), scaffold (compensating)Diagnostics

Module 7: Execution Environments

ConceptRuleUse
Five adversary classesErroneous, manipulated, compromised tool, compromised model, compromised harnessThe threat model
ContainerShares kernelClass 1–2
microVM (Firecracker)Own kernelClass 3–4
gVisor-classUser-space kernelClass 3–4; compatibility cost
Five filesystem vectorsPath traversal, symlink, TOCTOU, hard link, deviceThe checklist
Canonical path checkResolve, compare components, check the fdTOCTOU-safe
Egress defaultDeny, positive allowlistThe architectural defence
Five egress bypassesDNS, IP literal, proxy, side channel, tool ingressThe checklist
ReproducibilityPinned deps, base images, deterministic builds, tool versions, spec artefactThe five components
Verifier taxonomyV1 (tests), V2 (types), V3 (property-based), V4 (differential), V5 (judge)The composition
Policy engineDeterministic pre-execution functionIrreducible component
Fail closedMinimise false allows, accept false deniesThe asymmetry
IdempotencyT(T(s,a),a)=T(s,a)T(T(s,a),a)=T(s,a)Retry safety
Retry safetySafe iff idempotent or keyedThe proposition
Loop detectionRepetition, progress, cyclingCost bound

Module 8: Long-Horizon State

ConceptRuleUse
Useful windowWuseful=min⁡(W,Leff)W_{\text{useful}}=\min(W,L_{\text{eff}})The real budget
Window countnw≈⌈Lnom/Wuseful⌉n_w\approx\lceil L_{\text{nom}}/W_{\text{useful}}\rceilLong-horizon size
HandoffH:H×P→C\mathcal{H}:\mathcal{H}\times\mathcal{P}\to\mathcal{C}Cross-window compaction
Three failure modesOmission, corruption, inconsistencyThe diagnosis
Progress fileTask, plan, completed, current, discovered, open, decisions, risks, referencesThe sufficiency condition
Initialiser vs workerExploration separable vs interleavedThe pattern choice
Delegation criterionΔisolation>Ccoord\Delta_{\text{isolation}}>C_{\text{coord}}The decision
Delegation costsSpawn, specification, result, integrationThe four
Instruction fileWhat, build/test, conventions, constraints, structureAGENTS.md
Instruction rotStale, contradictory, irrelevantCuration problem
Task graph / checklist / specDependencies vs sequential vs outcomeThe representation choice
Voyager skill libraryDiscovery → abstraction → retrievalarXiv:2305.16291, R; Minecraft-specific

Module 9: Constraints and Entropy

ConceptRuleUse
Three-part decompositionContext engineering, architectural constraints, entropy managementTier B/C hypothesis
Violation countV(X)=∑vi(X)V(X)=\sum v_i(X)Static coverage
Birth-death modelV∗=λ/μV^*=\lambda/\muStable if λ<μ\lambda<\mu
Control leversReduce λ\lambda (guides), increase μ\mu (cleanup)The two levers
GuideFeedforward, preventsLinter, allowlist
SensorFeedback, detectsTest suite, monitor
ComplementarityGuides prevent, sensors detectThe balanced design
Optimal allocationMarginal cost = marginal benefit for eachThe conditions
Internal model principleDetect only what you modelThe coverage bound
CIWhole constraint layer, clean env, merge gateGround truth
Mutation testingKilled/totalTPR on mutation distribution
Deceptive cleanlinessLow violations, low mutation scoreThe dangerous case
LegibilityAgent’s cost to find, understand, modifyNavigation, comprehension, modification
DORADeployment freq, lead time, failure rate, restore timeThe delivery metrics
Stability marginMs=2/(L(1+2d)η)M_s=2/(L(1+2d)\eta); >1>1 stableThe change’s stability
GoodhartA measure used as target is gamedThe four games; the basket defence

Module 10: Automatic Harness Optimisation

ConceptRuleUse
Search spaceStructured, discrete, too large for exhaustiveThe optimisation problem
ObjectiveNoisy, expensive, non-stationary, partially observableThe four properties
The guardrailEdit compensating and tuning, not irreducibleThe loop’s permission
AHEarXiv:2604.25850, P; 69.7%→77.0% Terminal-Bench 2Unreplicated
Three pillarsComponent, experience, decision observabilityThe trace’s requirements
The loopObserve → propose → predict → evaluate → verify → recordThe six steps
Self-declared prediction(μp,δp,metric)(\mu_p,\delta_p,\text{metric}) before evaluationOne-sided test, no post-hoc, mechanism check
Self-HarnessFailure-trace mining, minimal edits, regression validationP
Harness-ZeroDistillation into student via SFTP; the exploit’s risk
AlphaEvolve / Darwin Gödel MachineEvolutionary / self-modifyingP; the guardrail is necessary
OverfittingΔ^held<Δ^eval\hat\Delta_{\text{held}}<\hat\Delta_{\text{eval}} beyond noiseThe held-out check
Credit attributionThe prediction and the minimalityThe devices
Stabilityη<2/(L(1+2d))\eta<2/(L(1+2d))The four levers

Module 11: Observability and Cost

ConceptRuleUse
Three queriesClustering, attribution, cost per successThe schema’s derivation
Minimal trace schemaIdentification, harness state, context, model call, tool calls, decision, outcome, costEvery field’s role
OTel GenAIStandard fields; evolving (B)Interoperability
Trace hierarchyRun → step → sub-operationDrill-down
Prefix-tree clusteringThe trie’s largest subtreeFailure signature
AttributionVersion split, comparison, drill-downDiagnosis (revert is the proof)
MAST previewMulti-agent failure taxonomyarXiv:2503.13657, P
Single-agent taxonomyContext loss, retrieval, tool, verification, loop, budget, model, specificationThe label set
Retention tiersHot, warm, coldThe storage policy
Drill-downAggregate → trace → stepThe prerequisites
Error analysis at scaleAutomated classification (audited) + stratified samplingThe screen + the audit
Failure-mode distributionThe diagnostic; the shift is the leading indicatorThe progress measure
Cost diagnosisMeasure, attribute, decompose, fix, re-measureThe procedure
Latency sourcesModel, tool, queueing, orchestrationThe p95’s problem
Parallelism formsTool calls, subagents, samplesLatency vs cost
RoutingContextual banditThe criterion
Cascade(Cc+Cv)+(1−pcver)(Cs+Cv)(C_c+C_v)+(1-p_c^{\text{ver}})(C_s+C_v); escalation iff Cc<pcverCsC_c<p_c^{\text{ver}}C_sThe condition
Pareto frontierNon-dominated pairsThe deployment’s choice
Verification budgetThe cost-per-correct optimisation over ROCThe bridge
Non-determinism’s problemStatistical reproduction; distribution’s framingThe postmortem’s core
Four causesModel, harness, environment, specificationThe classification
Learning levelsSpecific fix, class’s fix, process’s fixThe depth

PART III — MODELS AND INFERENCE

Module 12: Selection

ConceptRuleUse
Total vs active parametersMemory vs computeThe MoE’s two numbers
SparsityPtotal/PactiveP_{\text{total}}/P_{\text{active}}The ratio
KV cache2nlayersnkv_headsdheadLb2n_{\text{layers}}n_{\text{kv\_heads}}d_{\text{head}}LbThe long-context cost
MLALatent-compressed cache; 5–10× savingThe long-context enabler
DSAIndexer + top-kk; O(Lk)+O(L2)O(Lk)+O(L^2)The compute estimate, not speedup
Prefill/decode asymmetryCompute-bound prefill, bandwidth-bound decodeThe latency’s two phases
Three licence classesOSI-open, custom, non-commercialThe first gate
Per-checkpoint ruleThe licence is the weights file’s, not the brand’sThe design principle
ConditionsRevenue caps, scale caps, acceptable-use, attribution, pass-through, geography, no indemnityThe verdict
The dossierLicence, BOM, reproduction, parse-failure rate, format notesThe five fields
Deletion ruleA field that cannot be filled in a week deletes the candidateThe discipline
Hardware BOMWeights + KV + activations + frameworkThe fit’s arithmetic
Reproduction ruleA vendor number is not an input until reproducedThe tier-C discipline
Parse-failure impactEffective TPR falls; cost rises by 1/(1−p)1/(1-p)Proposition 12.12.1
Four format decisionsChat template, reasoning tokens, stop tokens, tool-call serialisationThe compatibility
Four format testsTemplate, reasoning, stop, tool callThe CI
Go/no-go gatesLicence → hardware → reproduction → parse → formatThe cost’s order

Module 13: Inference Engineering

ConceptRuleUse
Continuous batchingIteration-level schedulingThe throughput’s gain
GainEffective batch vs naive’sThe heterogeneity’s penalty
Paged attentionFixed blocks + block tableMemory utilisation
Prefix cachingLongest matching prefixThe reuse
Speculative decodingDraft proposes, target verifiesE[tok]=(1−αk+1)/(1−α)\mathbb{E}[\text{tok}]=(1-\alpha^{k+1})/(1-\alpha)
SpeedupExpected tokens / combined costThe draft’s cost is the limit
DisaggregationSeparate prefill and decode poolsThe transfer’s cost
Expert parallelismAll-to-all; load balancingThe MoE’s communication
Four enginesvLLM, SGLang, TensorRT-LLM, llama.cppThe measurement, not the benchmark
Quantisation formatsFP16, FP8, FP4, GGUF K-quants, AWQ, GPTQThe memory/accuracy trade-off
Short benchmark blind spotErrors compound, format fragility, long contextThe agent’s measurement
Quantisation measurementLong-horizon tasks, paired designThe protocol
Chat templateT:T: messages → stringThe model’s expected format
Three template failuresWrong template, missing tokens, placementThe diagnostics
Reasoning formatsSeparated vs mixedThe parser’s problem
Stop tokensThe model’s EOS and the turn’s endThe truncation risk
Tool-call approachesNative template vs grammarThe two
Agent characteristicsLong prefixes, bursty arrivals, variable service, multi-turnThe capacity’s inputs
Two throughput boundsCompute and memory-bandwidthThe binding one
CapacityNGPU=⌈target/per GPU⌉N_{\text{GPU}}=\lceil\text{target}/\text{per GPU}\rceilThe plan’s number
ReplayCaptured trace against the stackThe harness’s own measurement

Module 14: Co-Adaptation and Fleets

ConceptRuleUse
Co-adaptationBetter together than with comparable alternativesThe interaction effect
Four surfacesTool schemas, reasoning formats, compaction thresholds, retry policyThe adaptation
Foreign-harness taxonomyParse, truncation, leak, overflow, over-compaction, retry loop, recovery failureThe checklist
Co-adaptation matrixAij=J^(Mi,Hj)A_{ij}=\hat J(M_i,H_j)The measurement
Adaptation costci=max⁡jAij−Ai,j∗c_i=\max_j A_{ij}-A_{i,j^*}The left-on-table
Adaptation decisionciV>Tadaptc_i V>T_{\text{adapt}}The investment
Tiered architecturePlanner, executor, verifierThe roles
Tiered costCp+n(Ce+Cv)C_p+n(C_e+C_v)The arithmetic
Success modelpp⋅pen⋅pvp_p\cdot p_e^n\cdot p_vThe compounding
Verification-gated escalationVerifier’s rejection triggers plannerThe cascade
Roles’ requirementsPlanner’s reasoning, executor’s reliability, verifier’s precisionThe assignment
Cost per correctCfleet/pfleetC_{\text{fleet}}/p_{\text{fleet}}The economics
Distillation (Harness-Zero)Teacher’s trajectories → student’s SFTP
What distilsFormat (reliably), behaviour (partially), knowledge (least)The scope
AmplificationStudent’s exploit rate ≥ demonstrations’Proposition 14.14.1
Sovereignty driversRegulation, IP, latency, costThe boundary’s decision
Three patternsFull air-gap, VPC, hybridThe deployment
3×3 factorialThree models × three harnesses × KK tasksThe Part III capstone
Variance decompositiony=μ+α+β+(αβ)+εy=\mu+\alpha+\beta+(\alpha\beta)+\varepsilonThe interaction’s measure
Ranking flipThe models’ order depends on the harnessThe interaction’s content
Four research questionsConvergence, general/overfit, minimal safe, automationThe agenda
Longitudinal designTwo tiers, same component, effect’s comparisonThe classification’s test

PART IV — TRAINING AND RL

Module 15: Trajectory SFT

ConceptRuleUse
TrajectoryContext, output, tool call, observationThe SFT’s unit
The whose-tokens ruleMask 1 for assistant, 0 elsewhereThe loss’s target
SFT loss−∑milog⁡πθ(ti)/∑mi-\sum m_i\log\pi_\theta(t_i)/\sum m_iThe masked loss
Mask testMasked tokens = assistant’s contentThe CI
Observation exclusionPrevents hallucinationThe discipline
Five quality dimensionsOutcome, format, process, efficiency, diversityThe filters’ targets
Rejection samplingnn samples, verifier keepsThe data’s generation
Acceptance rateTPR⋅p+FPR(1−p)\mathrm{TPR}\cdot p+\mathrm{FPR}(1-p)The cost’s multiplier
Six filtersVerifier, format, length, diversity, process, efficiencyThe set’s construction
Verifier’s precisionThe filter’s quality boundProposition 15.9.1
DiversityUnique tasks / totalThe coverage’s measure
Duplicates’ pass^k penaltyOverfitting, generalisation gapProposition 15.12.2
Distillation pipelineGenerate, filter, convert, train, evaluateThe five steps
Re-serializationThe student’s format, not the teacher’sThe conversion
Sequence-level lossSFT on teacher’s samplesClosed teacher
Logit-level lossKL to teacher’s distributionOpen teacher
Exploit amplificationStudent learns teacher’s exploitsProposition 15.18.1
ContaminationTest tasks in trainingThe split’s violation
PrivacyPII, secretsScrubbing, redaction, retention
Licence provenanceTeacher’s, data’s, derivative’sThe per-checkpoint rule
DatasheetEight sectionsThe reusability’s condition
SWE-RLRL on software tasks, rule-based rewardarXiv:2502.18449, P
SFT vs RL dataTeacher’s vs rolloutsThe bridge
Bridge designSFT’s model as RL’s initialisationThe warm start

Module 16: Agentic RL

ConceptRuleUse
RL objectiveE[R(τ)]\mathbb{E}[R(\tau)] over rolloutsThe SFT’s successor
Agentic differencesMulti-turn, tool observation, verifier reward, environment costThe four
Policy gradientE[∑∇log⁡πθ Aπ]\mathbb{E}[\sum\nabla\log\pi_\theta\,A^\pi]The theorem
Baseline unbiasednessState-only baseline leaves gradient unbiasedThe property
GRPOA^i=(ri−rˉ)/std(r)\hat A_i=(r_i-\bar r)/\mathrm{std}(r)R
GRPO biasstd normalisation, small-GGThe small-GG
Agentic GRPOTrajectory advantage for all turnsThe credit’s problem
RLVRVerifiable rewardsReliable but hackable
DeepSeek-R1Reasoning emergence from RLVRR
Survey warningApparent RL gain masked by format failuresP; format rate first
APPO / PACTResponses to sparse collapseP
Reward densitySparse, dense, intermediateThe spectrum
Dense varianceO(T)O(T) vs O(T2)O(T^2)The benefit
Exposure’s costPer-step errors accumulateThe cost
VPROutcome + dense oracleP
VPR conditionBenefit iff σsparse2−σdense2>σoracle2\sigma^2_{\text{sparse}}-\sigma^2_{\text{dense}}>\sigma^2_{\text{oracle}}The gate
RLVPOutcome − penaltiesP
PenaltiesValidity, safety, efficiencyThe design
Per-turn maskAssistant’s tokens onlyThe mask
Per-turn validityCounterfactual correlationThe validation
Four instabilitiesControl-token, formatting, entropy, KLThe signatures
Format firstPrimary metric before rewardThe survey’s warning
Hacking taxonomyExploit, specification, shortcut, collapseThe four
AuditExploit list, rate, corrected scoreThe evidence
Four defencesImmutable verifier, held-out, adversarial, KLThe layers
Deployment vs trainingProduction verifier vs rewardThe difference
Reward principlesPrecision, immutable, audit, dense condition, correctedThe five
On/off-policyFresh vs replayThe spectrum
Async architectureWorkers, trainer, weights serverThe throughput
Per-rollout costThree-term invariantThe budget
Experiment budgetNupdates×B×G×CrolloutN_{\text{updates}}\times B\times G\times C_{\text{rollout}}The arithmetic
Environment requirementsHermetic, resettable, instrumented, non-leakyThe validation

PART V — MULTI-AGENT, SECURITY, GOVERNANCE, PRODUCTION

Module 17a: Environments

ConceptRuleUse
Environment(S,T,O,Z,reset,verifier)(\mathcal{S},\mathcal{T},\mathcal{O},\mathcal{Z},\text{reset},\text{verifier})The substrate
Four propertiesHermetic, resettable, instrumented, non-leakyThe construction
Hermetic testRebuild hash equalityReproducibility
Reset testState equalityThe leakage’s check
Leakage channelsSolution, test, verifier, held-outThe four
Synthetic tasksFailure mutation, template, compositionalThe generation
CurriculumEasy-to-hard, competence-based, mixedThe scheduling
Formal verifier (Lean 4)TPR=1, FPR=0The ideal
Validation checklistEight itemsThe acceptance

Module 17b: Verifier Engineering

ConceptRuleUse
Oracle kindsSymbolic, differential, metamorphic, property-basedThe construction
Metamorphic relationf(x)=f(g(x))f(x)=f(g(x))Oracle-free
Calibration setLabelled, representative, large (≥500)The measurement
TPR/FPRWilson intervalsThe estimation
PrecisionBase-rate dependentThe deployment’s
ROCTPR vs FPRThe operating points
Judge biasesPosition, length, confidence, format, self-preferenceThe V5’s weaknesses
Exploit taxonomyTest, specification, judge, oracle blind spotThe four
Red-teamAttack, rate, corrected scoreThe audit
Measurement protocolSeven stepsThe procedure
Precision intervalDelta methodThe uncertainty
SPRTAccept/reject/continueWald–Wolfowitz; independence caveat
CompositionProduct (measured, not computed)The precision trade-off

Module 17c: Verification Economics

ConceptRuleUse
Cost per correct(Cg+Cv+CfFPR(1−π))/(TPRπ)(C_g+C_v+C_f\mathrm{FPR}(1-\pi))/(\mathrm{TPR}\pi)The optimisation
OptimumEnumerate over ROCThe operating point
SensitivityFPR most sensitiveThe calibration priority
Autonomy threshold(1−TPR)πCf<Ch(1-\mathrm{TPR})\pi C_f<C_hThe release decision
Threshold vs optimumDifferent; feasible setThe disagreement
AllocationPre, post, release; marginal costsThe budget’s order
RobustnessDecision across intervalsThe fragile’s input
MemoSeven fieldsThe deliverable

Module 18: Multi-Agent Systems

ConceptRuleUse
Five patternsOrchestrator-worker, debate, blackboard, market, hierarchicalThe topology
Default biasSingle agent; multi is the exceptionThe burden of proof
Null hypothesisSingle well-harnessed ≥ multiThe test
Three metricsReliability, cost, diagnosabilityThe comparison
MAST14 modes, 3 categoriesarXiv:2503.13657, P
Category 2Inter-agent misalignmentThe multi’s unique
Cohen’s kappa(po−pe)/(1−pe)(p_o-p_e)/(1-p_e); ≥0.6 acceptableThe coding’s reliability
A2AAgent cards, v1.0B
Card-rewriting riskRedirect, injection, auth downgradeThe attack
Four defencesIntegrity, untrusted treatment, permission independence, pinningThe layers
Cross-agent identityAgent’s, user’s, compositeThe delegation’s chain
Inter-agent contractTask, result, permissions, SLAs, securityThe interface
Coordination cost∑CAi+∑Cmsg+Ccoord\sum C_{A_i}+\sum C_{\text{msg}}+C_{\text{coord}}The model
Reliability∏pi\prod p_i; verifier-gated recoversThe compounding
JustificationΔp⋅V>Cmulti−Csingle\Delta p\cdot V>C_{\text{multi}}-C_{\text{single}}The decision
ConsistencyStrong vs eventualThe shared state
Stale readRead before write, act on oldThe failure
DeadlockCircular waitThe failure
Delegation chainUser → A → BThe audit’s basis
Confused deputyA’s permission used on user’s behalfThe attack

Module 19: Agent Security

ConceptRuleUse
Indirect injectionAdversary’s instruction in agent’s contentThe core threat
Instruction-only insufficiencyNo prompt rule guarantees resistanceProposition 19.1.2
Five adversary capabilitiesContent, format, timing, multi-step, compositionThe threat model
Injection formsDirect, role-play, format mimicry, encoded, incrementalThe five
ASRAttack success rateThe security metric
Tool poisoningMalicious tool description/outputThe schema-position vector
Malicious skillsSkill document as injectionThe supply-chain vector
Confused deputyPrivileged agent used on adversary’s behalfThe permission’s attack
ExfiltrationPrivate data reaching adversaryThe goal
Lethal trifectaPrivate data + untrusted content + external commsThe design gate
Trifecta checkEliminate a legProcedure 19.8.1
Residual riskASR after × compromise costThe acceptance input
IFCLabels + flow policiesThe provable defence
Confidentiality policyHigh data cannot flow to low sinksThe exfiltration defence
Integrity policyLow-integrity content cannot influence high-integrity actionThe injection defence
DeclassificationExplicit trusted ruleThe policy’s critical point
IFC guaranteePolicy-compliant flows, conditional on labelsTheorem 19.13.2
CaMeLP-LLM plans, Q-LLM extractsP
CaMeL guaranteeUntrusted content never reaches the planThe structural defence
CaMeL costTwo models, plan rigidityThe adaptivity loss
CapabilityUnforgeable, scoped, expiring, attenuableThe confused-deputy defence
Privilege separationPrivileged planner, unprivileged processorThe narrow interface
Model-based defencesInstruction, fine-tune, screeningThe layers
AgentDojoBenchmark: utility and securityR
Red-team suiteThe deployment’s own attacksThe lab
OWASP Top 10Agentic applications 2026B
Supply chainSkills, MCP servers, weights, dependenciesThe audit surface
SafetensorsNo-code-execution checkpointThe weights’ control
Security dossierEight sectionsThe governance artefact

Module 20: Oversight and Governance

ConceptRuleUse
Oversight problemChecking when reviewer’s capability is insufficientDefinition 20.1.1
Three regimesReviewer more, comparable, less capableThe design’s branch
Two failure directionsOver-trust, under-trustThe measurement’s target
Scalable oversightDebate, amplification, recursive reward modelling, market makingThe four
Techniques’ assumptionsJudge’s discernment, decomposition’s verifiability, preference’s consistency, market’s incentivesThe failure modes
MonitoringTrace’s analysis against baselineThe detection layer
Monitor’s targetsPolicy violations, verifier disagreements, behavioural, contentThe order
Base rate’s effectPrecision collapseThe alert fatigue
CoT monitorabilityTrace reveals intentionThe claim
FragilityUnfaithfulness, optimisation pressure, steganography, capability growthThe four reasons
Design implicationDefence in depth, not trace aloneThe posture
SandbaggingStrategic underperformanceThe alignment’s failure
SabotageDeliberate degradationThe alignment’s failure
Four evaluationsCapability elicitation, honeypot, sabotage detection, red-teamThe designs
InterpretationCan vs willThe monitoring’s role
Control agendaTrusted monitoring, untrusted monitoring, editing, protocol designThe security framing
Control’s guaranteeContainment, not alignmentThe achievable
Oversight’s componentsVerifier, policy engine, monitor, human gate, auditThe system
Five principlesPrevention, fail-closed, measurement, audit sample, layeringThe design
Deployment’s reward hackingProduction verifier’s optimisationThe distinction
Deployment’s additional risksPersistent, reputation, multi-agent, regulatoryThe four
Specification gamingLetter over intentThe under-specification
Goal misgeneralisationCompetent pursuit of wrong goalThe generalisation’s failure
EU AI ActProhibited, high-risk, GPAI, limited, minimalThe tiers
Act’s timelineForce, prohibited, GPAI, high-risk, fullThe dates
Act’s penalties€35M/7%, €15M/3%, €7.5M/1%The maxima
Agentic readingUse’s classification, deployer’s obligations, Article 14The application
Sectoral rulesHealth, finance, employment, educationThe stricter’s
Compliance mappingObligations to controlsThe table
Compliance postureHighest standard, not minimumThe efficiency’s
Accountability chainDelegation + decisionThe traceability’s
Audit logAppend-only, tamper-evident, complete, attributable, retained, accessibleThe evidence’s
Audit log schemaTrace + principal, authorisation, decision, outcome, chainThe fields
Sample auditPeriodic review, human’s TPR, monitor’s precisionThe measurement
Oversight designScope, interface, authority, competence, time, record, feedbackThe elements
Oversight failuresRubber-stamping, fatigue, bottleneck, automation biasThe modes
Privacy controlsPseudonymisation, encryption, access, retention, deletionThe tension’s resolution
Risk registerID, description, likelihood, impact, mitigation, residual, owner, review, acceptanceThe structure
RolesOwner, security, evaluation, operations, compliance, boardThe RACI
CadenceWeekly, monthly, quarterly, annualThe rhythm
Governance dossierTen sectionsThe lab’s deliverable

Module 21: Domain Agents

ConceptRuleUse
GUI agentAction is screen interaction, observation is screenDefinition 21.1.1
Action formsPixels, element reference, keyboardThe abstraction’s levels
Observation formsScreenshot, accessibility tree, DOMThe modality’s choice
Grounding functiong:O×T→Ag:\mathcal{O}\times\mathcal{T}\to\mathcal{A}The mapping
Three error sourcesObservation ambiguity, state ambiguity, action precisionThe failure’s modes
Grounding accuracyProduct of element, action, stateThe compounding
OSWorld369 tasks, OS apps, final-state verifierThe GUI benchmark
WebArena812 tasks, 4 web apps, app-state verifierThe web benchmark
Persistence bound1−(1−p)n1-(1-p)^nThe browsing reward
Persistence optimumn∗=log⁡(cq/(pV))/log⁡(1−p)n^*=\log(c_q/(pV))/\log(1-p)The arithmetic
Persistence riskNo convergenceThe deployment’s needs
GUI four failure modesGrounding, state, plan, loopThe distribution
Research anatomyLiterature, hypothesis, experiment design, execution, analysis, write-upThe pipeline
Verifier per stageCitation, plausibility, pre-registration, reproduction, statistical, expertThe chain
Verification gaprout−rverr_{\text{out}}-r_{\text{ver}}The bottleneck
Survey findings38% release traces, no externally validated in-loop oracle, gap is limitingarXiv:2608.05179, P
Four verification optionsReproduction, citation, expert, internal consistencyThe ranking
In-loop vs post-hocPer-step vs endThe VPR’s connection
Research evaluationCorrectness, novelty, significanceThe metrics
Research risksFabrication, misquotation, p-hacking, reproducibility, gamingThe risks
Research defencesReproduction, citation, pre-registration, expert, traceThe controls
Transfer dimensionsTask, verifier, data, regulation, expertThe five
High-stakes profileUnstructured, weak verifier, sensitive, high regulation, expertThe hardest
Expert’s three rolesVerifier, collaborator, overseerThe integration
Expert’s bottleneckTime is the scarce resourceThe allocation
Medical verifierOutcome, guideline, expert, formalThe vertical
Legal verifierStatute, precedent, expert, consistencyThe vertical
Financial verifierAudit, regulatory, expert, model riskThe vertical
Article 14 oversightHuman intervention and stopThe compliance
High-stakes evaluationBase rate, cost, expert, ground truthThe difficulty
Verification-first principleVerifier before agentThe module’s synthesis
Capability-first failureBenchmark not deployment, verifier afterthoughtThe contrast
Verifier specification checklistEight stepsThe design’s gate
Autonomy decisionDomain π\pi, CfC_f, ChC_h, TPR/FPRThe decision
Radiology worked exampleExpert verifier, assistive value, no autonomyThe worked

Module 22: Production Operations

ConceptRuleUse
SLO(metric, threshold, window)Definition 22.1.1
Stochastic SLODistribution’s statistic, not pointThe agent’s specificity
Four SLO metricsAvailability, success, latency, costThe set
User’s SLODerived from user toleranceThe principle
Technical SLO anti-patternBenchmark’s, not user’sThe failure
Error budget(1−threshold) × volumeDefinition 22.3.1
Budget’s usesRelease gate, prioritisation, acceptanceThe operations
Burn-rate alertingMulti-window, multi-burn-rateThe SRE practice
SLO failuresTechnical, short window, tight, looseThe four
CanarySmall traffic, comparisonDefinition 22.8.1
Canary statisticsPower, sequentialThe design
Peeking’s problemRepeated checks inflate false positivesThe sequential’s fix
Canary designFraction, duration, metrics, guardrails, ruleThe elements
GuardrailsSecurity, safety, fairness, costThe block’s
Canary failuresUnderpowered, peeking, guardrail ignored, shiftThe four
RollbackReversal, previous versionThe mechanism
Rollback’s riskThe rollback’s own changeThe risk
Rollback drillPeriodic exerciseThe rehearsal
Model pinningExact checkpoint, exact servingThe reproducibility
Deprecation riskProvider’s forced upgradeThe migration
Regression suiteTasks, scenarios, checksDefinition 22.16.1
Suite layersSmoke, regression, fullThe layering
Suite maintenanceReview, incidents, coverageThe rot’s
Upgrade procedureOffline, canary, staged, audit, rollbackThe five steps
CompatibilitiesFormat, context, verifier, harnessThe four
Cost per successThree-term / success rateThe economics
ForecastVolume × cost, with rangeThe model
Pareto frontierNon-dominated (model, harness)The choice
Optimisation leversSuccess rate, routing, context, tools, verifierThe order
FinOps practicesAllocation, anomaly, unit review, showbackThe practices
Success rate’s leverageHighest, quality and costThe concept
Team topologiesStream-aligned, platform, enabling, complicated-subsystemThe framework
Harness platformModules 1–17 as the platformThe agent’s topology
Review’s differenceVolume, trust, rationaleThe agent’s
Review’s designRisk-based, verification-first, signature, feedbackThe design
Productivity GoodhartMetric’s targetThe risk
Measurement designDORA, outcome, audit, no individualThe design
Operational loopDeploy → canary → promote/rollbackThe loop
Stability conditionη<2/(L(1+2d))\eta<2/(L(1+2d))The Part 0’s
OscillationAdopt, rollback, repeatThe failure
Margin workedη=1,d=3,L=0.5\eta=1,d=3,L=0.5 → bound 0.571, unstableThe arithmetic
Adoption phasesPilot, expansion, scaling, maturityThe phases
Adoption risksPilot misleading, scaling break, resistance, governance lagThe risks

THE FIVE MASTERY CRITERIA (The Curriculum’s Close)

  1. Every claimed improvement carries uncertainty estimates and harness controls.
  2. Every autonomy increase is paired with a named verifier, its ROC, and the autonomy threshold.
  3. Every external input is treated as untrusted, and every architecture is checked against the lethal trifecta before it is built.
  4. Every citation carries its evidence tier and reproduction status; every vendor claim is either reproduced or explicitly marked unreproduced.
  5. Every factorial comparison reports the model × harness interaction term.

THE THREE QUESTIONS THAT CUT THROUGH EVERYTHING

  1. What is the verifier? — Its TPR, its FPR, its precision at the deployment’s base rate, its cost. (Modules 5, 7, 17b.)
  2. What is the autonomy? — (1−TPR)πCf<Ch(1-\mathrm{TPR})\pi C_f < C_h? The feasible set. The value proposition. (Modules 17c, 20, 21.)
  3. What is the harness-controlled comparison? — The factorial, the interaction term, the held-out family. (Modules 5, 14, 22.)

End of the cheat sheet. The curriculum is complete.