Track
AI Agent Infrastructure lessons
40 short lessons on AI Agent Infrastructure. Each one starts from a real situation, shows how it works, and ends with a quiz. Free to read.
All 40 lessons
- Agent control loopBeginner · 4 min
Production agents are workflow systems: model decisions invoke tools, which must be validated, authorized, timed out, retried appropriately and recorded. Treat tool…
- Durable executionBeginner · 4 min
Persist checkpoints and operation IDs so long-running tasks can resume after crashes.
- Tool contractsBeginner · 4 min
Tools use explicit schemas, scoped privileges, timeouts, and validated results.
- Human approvalBeginner · 4 min
Risky tool actions should require a human approval checkpoint before execution.
- Conversation stateBeginner · 4 min
Conversation memory should separate short-term context from durable, user-approved facts.
- Retrieval pipelinesBeginner · 4 min
Retrieval should be permission-filtered and sources should remain attributable.
- Context managementBeginner · 4 min
Summarization and selective retrieval keep context bounded within token budgets.
- MCP connectivityBeginner · 4 min
MCP exposes tools and resources through defined protocol boundaries and server trust relationships.
- Idempotent toolsBeginner · 4 min
External calls use stable idempotency keys and retry policies that distinguish transient failures.
- Tool sandboxingBeginner · 4 min
Run untrusted code in isolated environments with restrictive network, filesystem, and credentials.
- Prompt injection defenseBeginner · 4 min
Separate trusted instructions from untrusted retrieved pages, files, and tool responses.
- Rate limits & budgetsBeginner · 4 min
Bound per-run tokens, cost, wall clock time, concurrency, and tool invocation count.
- Agent tracesBeginner · 4 min
Trace model inference, agent invocations, and tool execution in a linked request context.
- Regression evalsBeginner · 4 min
Test agents against reproducible scenarios, expected tool invocations, and outcome graders.
- Agent SLOsBeginner · 4 min
Track task success, p95 latency, retries, cost per successful task, and failure classifications.
- Agent runtime loopBeginner · 4 min
Explain the agent runtime loop, where tool_use stop reasons lead to tool_result messages, and why a run needs an explicit end and a budget for steps, tokens and time.
- Tool interface schemasIntermediate · 4 min
Explain how a tool's JSON Schema constrains its arguments, what additionalProperties controls, and why the runtime should validate each call before the handler runs, so…
- MCP security boundariesIntermediate · 4 min
Explain the security boundaries of MCP servers, including startup commands, token audience and passthrough, and the listening address of a local server, and the consent…
- Sandboxed code executionIntermediate · 4 min
Explain how namespaces, control groups and capabilities combine into a sandbox for generated code, and which inputs a sandbox should never receive, and why each one…
- Tool retriesIntermediate · 4 min
Explain how retries with exponential backoff and jitter work, why nested retries multiply load, and why a retry is safe only for calls that can be repeated.
- Idempotency keysIntermediate · 4 min
Explain how an idempotency key lets a server recognize a repeated request, why a key must name the operation, and how keys are pruned and compared.
- Durable checkpointsIntermediate · 4 min
Explain how durable checkpoints let a long agent job resume after a crash, why the order of writes matters, and how replay differs from snapshots.
- Workflow state machinesIntermediate · 4 min
Explain how a workflow state machine uses a transition table to reject illegal moves, and how the states in an AWS Step Functions definition connect to each other.
- Queue based agent jobsIntermediate · 4 min
Explain why standard SQS queues deliver at least once, how the visibility timeout makes a message reappear, and how a job record stops duplicate effects.
- Concurrency limitsAdvanced · 5 min
Explains how concurrency caps and provider rate limits differ, and how a client should react to 429 responses with retry-after and backoff rather than more retries.
- Token budgetsAdvanced · 4 min
Explains why token budgets must be enforced in code, how input and output tokens differ, and how to find the tasks that use the most tokens.
- Cost per taskAdvanced · 5 min
Shows how to calculate cost per task from billing tags and completed-run counts for each task type, and why failed runs must stay in the spend figure.
- Context window managementAdvanced · 4 min
Explains what counts toward the context window, why more space does not fix missed details, and how to measure and trim input before each call.
- Retrieval permissionsAdvanced · 4 min
Shows how a retrieval step filters results by user identity before any passage reaches the model, and why prompt rules are not an access control.
- Vector index freshnessAdvanced · 5 min
Explains how pull indexers, schedules and change detection set the delay between a source change and a searchable update, and how to measure that delay.
- Memory consentAdvanced · 5 min
Explains what a valid consent record must hold for an assistant's memory, how withdrawal must reach derived copies, and what to check in the data stores.
- Prompt injection defensesAdvanced · 5 min
Explains how untrusted text can steer an agent, why filters are only a signal, and how to limit tools, data and approvals so that an injected instruction has no path to…
- Human approval gatesAdvanced · 4 min
Explains what makes an approval gate real: the action pauses, the approver sees the exact plan, and the approval is bound to that plan so it cannot be reused.
- Tool output validationAdvanced · 4 min
Explains why tool results need their own schema checks, because strict tool use constrains only the model's inputs, and what to do when a required field is missing.
- Agent trace spansAdvanced · 5 min
Explains how spans, parent links and context propagation turn agent logs into one trace, and how to check an export for lost context and sensitive attributes.
- Evaluation datasetsAdvanced · 4 min
Explains how to build an evaluation dataset that matches live traffic, keep a held-out set, and read label spread before trusting an accuracy number from it.
- Regression harnessesAdvanced · 4 min
Explains how a regression harness runs saved cases against a baseline, reports the cases that flipped, and why model-based graders need repeated runs before a release…
- Multi agent orchestrationAdvanced · 4 min
Explains the agents-as-tools and handoff patterns, how to choose between them, and why a validated handoff contract stops missing facts from reaching the next agent.
- Failure recoveryAdvanced · 4 min
Explains how retries, catch branches and compensations differ, why a retry needs an idempotency key, and how to read a run's history to find duplicate actions.
- Agent task SLOsAdvanced · 4 min
Explains how to define success for an agent task, compute an SLI from run logs, and turn the SLO into an error budget the team can act on.