Tutorials
Follow a series in order, or jump straight to the one you searched for.
Agents at Scale: The 2026 Frontier
-
1. Why AI Agent Projects Fail Between Pilot and Production
88% of enterprise AI agent pilots never reach production. Learn the four structural failure modes and the engineering discipline that separates the 12% that ship.
-
2. The 6 Multi-Agent Patterns That Actually Work in 2026
The six patterns worth using — orchestrator-worker, routing, pipeline, fan-out, reflection, debate — with real token economics and when one agent still wins.
-
3. A2A vs MCP: How Agent-to-Agent and Agent-to-Tool Protocols Differ
MCP connects an agent to tools; A2A connects agents to each other. Here is how both protocols work mechanically and why production systems need both.
-
4. How Subagent Isolation Prevents Context Rot in LLM Agents
Why spawning fresh-context subagents is the structural cure for the accuracy decay that plagues long single-agent sessions — and how to apply it in production.
-
5. Agent Observability: How to Trace and Debug AI Agents with OpenTelemetry
Status codes lie in agent systems. Learn how OpenTelemetry GenAI semantic conventions let you trace tool I/O, handoffs, and state mutations that actually cause failures.
-
6. What Is Harness Engineering? How the System Around the Model Determines AI Reliability
Why the agent harness — not the model — is the real differentiator in 2026 AI systems, and how to build each of its five layers correctly.
How Claude Actually Works
-
1. How Claude Works: A 5-Layer Mental Model for Developers
Master the 5-layer Claude Stack — model, Messages API, MCP tools, agent loop, surfaces — and place any Claude feature instantly.
-
2. Claude's 5-Layer Stack: MCP, Hooks, Skills, and Subagents Explained
Map every Claude feature to one of 5 layers or 2 cross-cutting planes — so any new Anthropic release clicks into place in seconds.
-
3. How LLM Tokens Work — And Why They Explain Your AI Bill
Claude never reads your words — it reads tokens. Understand tokenization, why it drives every dollar of your AI bill, and the letter-counting bug it creates.
-
4. How Claude's Context Window Works: Limits, Costs, and Overflow
What fills Claude's context window, which models get 1M tokens, why the middle degrades, and how to design around all three constraints.
-
5. Understanding stop_reason in the Claude Messages API
Master all 7 stop_reason values in the Claude Messages API — end_turn, tool_use, max_tokens, pause_turn, refusal, and more — to build agents that never go feral.
-
6. How Claude Tool Calling Actually Works: The Request-Execute Model
How Claude tool calling works: the model requests, your code executes. Covers the tool_use block, executor lanes, strict schemas, and dynamic tool discovery.
-
7. What Is MCP (Model Context Protocol) and How It Works
MCP is the USB-C moment for AI tools: one open protocol that collapses N×M custom integrations into N+M. Learn the three roles, three primitives, and two transports.
-
8. How Claude Code's Agent Loop Works (and Why It Breaks)
The agent loop is a while cycle around one API call. Learn how it runs, how it breaks in three classic ways, and the four code-level controls that keep it on track.
-
9. Claude Code Hooks Explained: Deterministic Guards for the Agent Loop
Learn how Claude Code hooks enforce hard rules at every lifecycle event — pre-tool, post-tool, session start/stop — that the model cannot override.
-
10. How to Guarantee JSON Output from Claude with Structured Outputs
Force schema-valid JSON from Claude every time using tool_choice, Pydantic schemas, a validation retry ceiling, and the native output_config.format API.
-
11. How to Pin Model Output Format Using Few-Shot Examples
Few-shot examples in the messages array fix format, locale, and edge-case failures that temperature tweaks never can — here's exactly how and why.
-
12. Temperature, Top-P, and Top-K Explained: Controlling LLM Randomness
Master temperature, top-p, and top-k: the three knobs that reshape a token probability distribution before every single LLM draw.
-
13. How to Write Acceptance Criteria for LLM Output (Not Just 'Be Accurate')
Replace vague LLM prompts with testable acceptance criteria: exact output schema, edge-case rules, missing-field behavior, and ambiguity tie-breakers.
-
14. Confidence Fields and Human-in-the-Loop Routing for LLM Extraction Pipelines
Add a confidence field to your forced tool schema and route low-confidence rows to a human review queue — cheap triage that catches the dangerous extractions.
-
15. How Claude Code Edits Your Repo: Inside the Agentic Edit Loop
Claude Code edits your repo via a surgical read → plan → edit → verify loop — not whole-file rewrites. Here's the exact mechanism, step by step.
-
16. How CLAUDE.md File Hierarchy Works: User, Project, Subtree, Local
How Claude Code's CLAUDE.md tier system (managed, user, project, subtree, local) loads rules and resolves conflicts — so your instructions actually fire.
-
17. Claude Code Extensions: Skills, Subagents, Hooks, and Plugins
Skills, subagents, hooks, and plugins are four distinct extension points in Claude Code — each doing a completely different job. Here's exactly how to tell them apart.
-
18. Anthropic Agent SDK: Use Claude Code's Engine in Your App
The Agent SDK exposes Claude Code's agent loop, built-in tools, and MCP support as a Python/TypeScript library — for agents your code drives, not a human.
-
19. Anthropic Managed Agents: Claude Runs the Loop for You
Anthropic's managed agents run the agent loop, sandbox, and session state server-side. Provision three assets — agents, memory stores, vaults — instead of owning the runtime.
-
20. How to Run Claude Code Headlessly in CI/CD Pipelines
Run Claude Code non-interactively with claude -p: parse JSON output, scope tools safely, and wire AI review steps into any CI pipeline.
-
21. How Prompt Caching Cuts Your AI Bill ~90% (and the Floor Trap)
Prompt caching stores a stable prefix so you stop paying full price to resend identical context. Real mechanics, current model floors, and the silent no-op trap.
-
22. Context Engineering: Pin, Summarize, Prune, and Compact
Four techniques to keep long Claude sessions coherent and cheap: pin stable facts, summarize resolved turns, prune tool output, and compact as a last resort.
-
23. How to Write LLM Evals: Testing AI Apps with Real Data
Replace gut-feel LLM testing with a real eval harness: datasets, graders, CI score gates, and LLM-as-judge calibration.
-
24. Prompt Injection Attacks Explained: How to Defend Your AI Agent
How untrusted content becomes agent commands, why indirect injection is the dangerous case, and the three layered defenses every production agent needs.
-
25. Agent Escalation: When to Hand Off to a Human vs. Keep Handling
The four deterministic signals that route to a human, why sentiment never qualifies, and how to structure a handoff that a human can act on in ten seconds.
-
26. How Claude Token Billing Works: Input, Output, and Cache Costs
Break a Claude API bill into input, output, and cached token buckets, understand the 5x output multiplier, and fix the three cost leaks that quietly inflate agent bills.
-
27. How to Structure a Production Claude Agent: All Layers Explained
The full layered architecture of a production Claude agent: gateway, model router, agent loop, scoped tools, policy hooks, prompt caching, evals, and clean escalation.
-
28. Building a Customer Support Agent with Claude: Tools, Policy Hooks, and Escalation
Build a production Claude support agent: scoped tools, a code-enforced policy hook that guards the refund cap, structured escalation, and a three-stream reliability log.
-
29. Building a Multi-Agent Research System with Isolated Contexts
Architect a coordinator–subagent research pipeline with isolated context bubbles, scoped tools, and provenance that survives synthesis — without context overflow.
-
30. How to Build a Structured Data Extraction Pipeline with Claude
Wire forced schemas, few-shot examples, validation retry, confidence routing, and prompt caching into one production extraction flow you'd actually ship.
-
31. Claude Architecture Explained: 5 Layers and 2 Cross-Cutting Planes
Master the Claude stack: 5 layers (model → protocol → reach → orchestration → surfaces) plus 2 planes that cut through every layer.
-
32. CCA-F Exam Study Guide: Claude Certified Architect Foundations
Map every CCA-F exam domain to the Claude stack layers, master the score weights, and build a focused study path — all in one reference.
Securing AI: How AI Gets Attacked — and Defended
-
1. The AI Attack Surface Explained: The Mental Model for Securing AI
Learn the 6-stage AI pipeline attack surface—from data poisoning to excessive agency—mapped to OWASP LLM Top 10 2025, MITRE ATLAS, and NIST AI RMF.
-
2. AI Security vs AI Safety vs Cybersecurity: What's the Difference?
Learn the three distinct disciplines — AI security, AI safety, and cybersecurity — why they overlap, and why blurring them creates gaps nobody owns.
-
3. How to Threat Model an AI System: ATLAS, OWASP, MAESTRO & NIST
ATLAS, OWASP, MAESTRO, and NIST answer four different questions about AI security. Learn which framework to reach for—and when—before threats find you.
-
4. Why AI Is Uniquely Attackable: The Four Properties That Break Security
Learn why uninterpretability, unpatchability, nondeterminism, and scale make AI fundamentally harder to secure than traditional software — and how to defend against each.
-
5. The ML Lifecycle Attack Surface: 6 Handoffs, 6 Injection Points
Walk the ML build pipeline — collect, label, train, validate, package, register — and see the exact attack that lands at each handoff, plus the gate that stops it.
-
6. Embeddings & Vector Space: The Geometry Attackers Exploit
Learn how AI turns text into points in space, why 'similar means close' is an attack surface, and how to defend against evasion and LLM08 embedding attacks.
-
7. Why Signature-Based Defenses Fail on AI (Nondeterminism Explained)
Learn why hash-match and blocklist defenses break against AI, what nondeterminism actually is, and what behavioral detection replaces them.
-
8. Data Poisoning Explained: Corrupting an AI Model Before It Ships
Learn how a handful of planted training samples corrupt a model's learned behavior, trace the attack from data ingestion to inference, and apply the four layered defenses.
-
9. Adversarial Examples Explained: How One Pixel Flips the Label
Learn how a tiny, targeted perturbation pushes an input across a model's decision boundary, why your eye can't see it, and the four defenses that harden the boundary.
-
10. Backdoors & Trojaned AI Models: The Sleeper Trigger Attack
Learn how a backdoored model passes every accuracy test yet obeys an attacker's secret trigger — and the four layered defenses that catch it before it ships.
-
11. Model-Level Defenses: Adversarial Training & Certified Robustness
How to harden an AI model against adversarial attacks: adversarial training, randomized smoothing, certified robustness—and why gradient obfuscation backfires.
-
12. Model Extraction, Inversion & Membership Inference: 3 Ways a Model Leaks
Learn how attackers clone AI models, reconstruct training data, and prove records were in a training set — using only the public API. Three attacks, three defenses.
-
13. System Prompt Leakage: Why Your Hidden Prompt Isn't Hidden
Learn why LLM system prompts aren't a secret store, how crafted queries coax them out (OWASP LLM07), and the three layered defenses every AI developer needs.
-
14. Sensitive Information Disclosure in LLMs: When the Model Remembers
Learn the two ways LLMs leak sensitive data — memorized training data and context bleed — and the layered defenses that stop each one.
-
15. Differential Privacy Explained: The Defense That Adds Noise on Purpose
Learn how differential privacy defends against membership inference and model inversion by adding calibrated noise — and what the privacy-utility tradeoff really costs you.
-
16. Prompt Injection: The Attack Flow Every AI Developer Must Know
Learn the full prompt injection attack flow, why the trust boundary breaks, the exfiltration combo, and the layered defenses that contain it — OWASP LLM01 2025.
-
17. Direct vs Indirect Prompt Injection: The One That Rides In on a Web Page
Learn how direct and indirect prompt injection differ, why the web-page variant is scarier, and the one architectural rule that contains both.
-
18. AI Jailbreaks Explained: Why Alignment Is Not a Security Control
Learn what AI jailbreaks are, why alignment is probabilistic and unpatchable, and how to defend with deterministic controls that can't be talked out of.
-
19. Improper Output Handling: When the LLM's Output Is the Exploit
Learn how unvalidated LLM output becomes XSS, SQL injection, command execution, and SSRF—and the AppSec habit that closes every sink.
-
20. Unbounded Consumption: Token Floods & Runaway AI Cost (LLM DoS)
Learn how token floods, recursive context, and runaway agent loops drain your AI budget—and the layered caps that stop it before the meter runs away.
-
21. RAG Security: Why Your RAG Pipeline Retrieves a Backdoor
Learn how RAG poisoning turns a clean knowledge base into a command channel — and the three layered gates at ingestion, retrieval, and output that stop it.
-
22. The AI Supply Chain & Securing MCP (Model Context Protocol)
Learn how pretrained models, datasets, packages, and MCP servers form an AI supply chain — and where each link gets poisoned and how to defend it.
-
23. Vector & Embedding Weaknesses: The Database That Trusts Everything
Learn the three OWASP LLM08 failure modes that make your vector store a breach target — and the layered defenses that lock it down.
-
24. AIBOM & Model Signing: Knowing What's Actually in Your AI
Learn how an AI Bill of Materials (AIBOM), model signing, and fail-closed loading gates turn 'I think it's fine' into 'verified, or it doesn't load.'
-
25. Excessive Agency: When an AI Agent Does Too Much
Learn the three root causes of OWASP LLM06 Excessive Agency and the guardrails that contain a compromised agent before it sends the email, runs the shell, or moves the money.
-
26. Agent Memory Poisoning: The Attack That Persists Across Sessions
Learn how memory poisoning plants a false instruction in an AI agent's long-term store and re-reads it every session — and the four layered defenses that stop it.
-
27. Tool Misuse & the OWASP Agentic Top 10 Explained
Learn how attackers weaponize legitimate AI agent tools, what the OWASP Agentic Top 10 covers, and three layered guardrails every agent builder needs.
-
28. Multi-Agent Failure Modes: When AI Agents Trust Each Other Too Much
Learn how one compromised AI agent silently cascades through an entire agent swarm — and the Zero-Trust layers that break the chain before it spreads.
-
29. AI Agent Identity: IAM for Non-Human Actors
Learn why autonomous AI agents need their own identity, not yours — and how per-agent principals, least-privilege scopes, and short-lived credentials stop skeleton-key attacks.
-
30. Zero Trust for AI: The 5 Guardrail Principles
How Zero Trust's five core guardrails — allowlist, readable policy, log everything, fail closed, defense in depth — apply to AI agents in 2026.
-
31. The Architecture of a Secured AI System (Capstone)
Learn how to layer defenses across every stage of a production AI system — gateway, model, RAG, tools, and agent — mapped to OWASP, MITRE ATLAS, and NIST.
-
32. Red Teaming an AI System: Finding the Holes Responsibly
Learn the full AI red-team process: set objectives, threat model, map to MITRE ATLAS, execute tests, and disclose findings responsibly before attackers strike.
-
33. AI Monitoring, SIEM & Incident Response
Learn what to log in an AI system, how to route telemetry into a SIEM, detect AI-specific attacks, and run the detect→contain→eradicate→recover→learn incident loop.
-
34. AI Governance for Builders: NIST AI RMF & the EU AI Act
Learn the 4 NIST AI RMF functions, 12 GenAI risk categories (NIST AI 600-1), and EU AI Act tiers—governance you ship, not a binder you file.
-
35. Harvest Now, Decrypt Later: Post-Quantum Readiness for AI
Learn how the HNDL attack threatens AI model weights and training data, why crypto-agility is the structural fix, and which NIST PQC standards to migrate toward.
Claude Certified Architect (CCA) Prep
-
1. Claude Certified Architect (CCA) Exam Guide: All Five Domains on One Diagram
The Claude Certified Architect exam mapped to one diagram — all five domains, their weights, and the five things you do to a Claude agent.
-
2. MCP Explained on One Diagram: The USB-C Port for AI Tools
What the Model Context Protocol actually standardizes, the client-server-tool round-trip, and when to reach for MCP vs inline functions vs RAG.
-
3. RAG vs Context Engineering: Why 'RAG Is Dead' and What Replaces It
RAG didn't die, it got demoted. Learn the four pillars of context engineering and why the context window is a budget, not a memory.
-
4. The Agent Loop Explained: Why Ignoring Tool Results Breaks Your Agent
An agent calls a tool, gets results back, then answers from memory anyway. Which part of the agent loop failed? Learn the mechanism, not just the key.
-
5. How to Expose 30 Tools Across 3 Services: MCP vs Inline Tools
A CCA practice question on exposing 30 tools across 3 services — why one MCP server per service beats inline function defs, with the mechanism diagram.
-
6. RAG vs MCP: Which Is Which, and When to Use Each
RAG retrieves knowledge, MCP exposes tools. A CCA practice question that untangles the difference with a context-budget diagram.
-
7. Why Your Agent Loops Forever: Termination Conditions in the Agent Loop
An agent keeps calling the same tool and never stops. This CCA practice question shows the missing exit-guard and how to fix it: max-steps plus a goal check.
-
8. When Two Agents Disagree, Who Decides? The Coordinator-Subagent Pattern
Two sub-agents return conflicting answers — what should the orchestrator do? The reconcile-step pattern explained, with the mechanism diagram.
-
9. Your Agent Blew the Context Window: Decompose Before You Overflow
A long agent run just overflowed the context window. The exam wants the first lever, not a rebuild — here's the mechanism behind the right answer.
-
10. When NOT to Build an Agent Loop: Workflows vs Agents
A CCA practice question on when a single-shot prompt beats an agent loop — the decision rule, the mechanism, and why the other options fail.
-
11. Your Tool Said 'Ignore Your Instructions': Prompt Injection Through Tool Results
A tool result contains an instruction. Learn why that's indirect prompt injection, not a hallucination, and how to draw the trust boundary.
-
12. Where Does an Agent Remember Last Week? Session State vs Long-Term Memory
Why an agent forgets last week's conversation by default, and the architectural fix: session state vs a persistent long-term memory store.
-
13. The Cheapest Way to Cut Agent Cost: Model Routing and Cheaper Loops
The cheapest lever for agent cost isn't a smaller context or fewer tools — it's routing easy steps to a cheap model and escalating only the hard ones.
-
14. Why Does Claude Pick the Wrong Tool? Fixing Tool Selection
Claude picks search_web instead of search_docs? Learn why tool descriptions — not schemas — drive tool selection, and how to fix it.
-
15. The Model Sends 'Next Tuesday,' Not a Date: Typing Tool Parameters
A tool needs a real date but the model keeps sending free text like 'next Tuesday.' The fix isn't a prompt — it's the JSON schema. Here's the mechanism.
-
16. Your Tool Returns a 500 — Then What? Designing a Tool Error Contract
A tool's upstream API returns HTTP 500 — should it throw, return empty, or retry? The mechanism behind structured tool error contracts.
-
17. 40 Tools, Wrong Picks, High Latency: Scoping Tools Per Agent
An agent with 40 tools picks the wrong one and runs slow. The fix isn't more tools — it's grouping them behind namespaces or MCP servers.
-
18. Same Tool, Three Agents: Inline Tool or MCP Server?
A capability is reused across three agents and two teams — inline copy or one MCP server? The mechanism behind the reuse decision, explained.
-
19. A Tool That Can Delete Prod: Designing Safe Destructive Tools
How to expose a tool that can delete production data: least privilege plus a human-approval gate, and why the other three options fail fast.
-
20. 'Gets Data' Is Too Vague: How to Write Tool Descriptions That Work
A CCA D2 practice question on tool descriptions: why 'gets data' breaks tool selection, and what the model actually needs to read instead.
-
21. Your Tool Returns 5,000 Rows: Paginating and Shaping Tool Responses
A 5,000-row tool result blows the context window. Learn why pagination, summaries, and handles beat raw dumps — and why bigger context isn't the fix.
-
22. The Param the Model Keeps Skipping: Required vs Optional Tool Parameters
A model keeps omitting an optional 'currency' param and totals go wrong. The fix isn't a smarter prompt — it's the JSON schema. Here's why.
-
23. Per-User OAuth Across Many Tenants: MCP Authentication at Scale
A CCA practice question on per-user OAuth across tenants — why MCP centralizes auth instead of every tool re-implementing it inline.
-
24. Where Does a Team Convention Live? Project CLAUDE.md Explained
Project CLAUDE.md ships with the repo as shared team memory, while user CLAUDE.md is yours alone. The Claude Code memory hierarchy, explained with a CCA practice question.
-
25. A Rule for You, Not Your Team: Local vs Shared Claude Code Settings
Where does a personal Claude Code rule live so it follows you across every repo without landing in your teammates' checkouts?
-
26. Instructions or a Hook — Which Runs Every Time? CLAUDE.md vs Hooks
A CCA practice question on CLAUDE.md vs hooks: why an instruction is advisory but a PostToolUse hook guarantees the linter runs after every edit.
-
27. Where Does a /review Shortcut Live? Claude Code Slash Commands
Custom Claude Code slash commands like /review are markdown files in .claude/commands/ — learn the mechanism, the file tree, and why the other options fail.
-
28. Slash Command or Skill? When to Use Each in Claude Code
Model-invoked vs you-invoked: the mechanism that decides whether a capability belongs in a slash command or an Agent Skill.
-
29. Run Claude Code in CI With No Human: Headless Mode Explained
Wiring Claude Code into a CI pipeline to triage issues automatically? Learn why headless print mode, not the TUI, is the mechanism that makes it work.
-
30. Allow npm test, Gate Destructive Git: Claude Code Permissions
Scoped allow/ask/deny rules let Claude Code run npm test silently while destructive git still prompts. The mechanism behind Claude Code permissions.
-
31. The Setting You Must Not Commit: settings.local.json in Claude Code
Where personal, experimental Claude Code settings belong so they never land in a teammate's repo — settings.local.json, gitignored by default.
-
32. Enterprise Denies, You Allow — Who Wins? Claude Code Permission Precedence
Enterprise policy denies Bash, your local settings allow it — which one wins? The Claude Code settings precedence ladder, explained with a diagram.
-
33. A Scoped 'Test-Writer' Agent: Custom Subagents in Claude Code
Restrict a Claude Code agent to a few tools with a scoped subagent — where the file lives, what frontmatter does, and how delegation works.
-
34. How Do You Guarantee Valid JSON? Forcing Structured Output
Why 'return only JSON' in a prompt fails and forced tool_choice with a schema guarantees valid, parseable structured output every call.
-
35. A Number Comes Back as a String: Validating Structured Output Types
Extraction returns amount as '42' instead of 42. The fix isn't a downstream cast — it's a typed JSON schema plus a validation gate.
-
36. Keep the Reasoning, Hide It From Output: Chain of Thought With Clean JSON
You want Claude to think before it answers, but your downstream code needs clean JSON, not a wall of reasoning. Here's the pattern that gets both.
-
37. Your Few-Shot Examples All Look the Same: Diversity in Few-Shot Prompting
A CCA practice question on few-shot overfitting: why examples define the output distribution, and how to fix examples that are all one shape.
-
38. Force the Tool, or Let It Decide? tool_choice Explained
Why tool_choice:'tool' beats 'auto' when structured output isn't optional — the four modes explained with the mechanism, not the myth.
-
39. Your Retry Loop Never Stops: Bounded Retries for LLM Output
Why validation-retry loops must be bounded, and how feeding the error back into the next prompt turns rejections into self-correcting attempts.
-
40. 10,000 Docs Overnight, Cost Matters: Batch Processing LLM Jobs
10,000 documents, cost-sensitive, no latency deadline — the Message Batches API cuts cost ~50%. Learn when to batch vs call synchronously.
-
41. It Ignores the Rule Buried in the Prompt: Where to Put Instructions
Claude keeps skipping a rule buried in your system prompt? Learn why structure and position beat volume, caps, and repetition.
-
42. 'Unknown' Beats a Hallucinated Field: Preventing Made-Up Output
Why a schema that forbids null forces Claude to guess. CCA D4 practice: allow 'unknown' in the schema instead of hoping it won't hallucinate.
-
43. The Output Feeds a Program, Not a Person: Machine-Readable LLM Output
Free text, Markdown, or JSON schema? When an LLM's output is consumed by code, not a human, the mechanism that makes it reliable.
-
44. It Forgot Your First Instruction: Lost-in-the-Middle and Context Rot
Why long agent runs ignore early instructions, and the mechanism behind lost-in-the-middle attention decay — plus the fix. CCA Domain 5 practice.
-
45. The Task Overflowed the Window: Chunking and Decomposition
A CCA Domain 5 practice question: an agent overflows the context window mid-task. The fix is compaction, not a bigger model — here's the mechanism.
-
46. Stop Re-Sending the Same Big Block: Prompt Caching for Context
A CCA practice question on prompt caching: why re-sending a fixed policy block every call wastes tokens, and how cache_control on a stable prefix fixes it.
-
47. Why Is Your Cache Never Hitting? Prompt Cache Prefix Rules
cache_read stuck at 0 despite adding caching? Learn the model-specific cache floor and why a too-short prefix silently no-ops.
-
48. Where Did That Fact Come From? Grounding and Citations
A CCA D5 practice question on provenance: why every fact an agent hands downstream needs a source attached, and what breaks when it doesn't.
-
49. It Failed and Answered Confidently Anyway: Error Propagation in Agents
Why a coordinator answers confidently after a subagent fails, the swallowed-error mechanism, and the fix: propagate and escalate. CCA D5 practice.
-
50. When Should It Hand Off to a Human? Escalation Patterns
A CCA D5 practice question on confidence-gated escalation: when an agent should hand off to a human, and why the naive answers all fail.
-
51. Confidently Wrong: Confidence Calibration for LLM Output
Why LLMs sound just as certain when wrong as when right, and how a confidence score plus a review/retry router fixes it.
-
52. Your Scratchpad Vanished on Compaction: Persisting Agent State
Why an agent's scratchpad notes disappear when context is compacted, and the fix: persist working state outside the window. CCA Domain 5 practice.
-
53. 80% History, 20% Task: Budgeting the Context Window
Your agent's context is 80% conversation history and quality is dropping — why rebalancing the token budget beats a bigger model. CCA D5 practice.
The Hidden Cost of AI Coding
-
1. What Is a Token in AI? How AI Coding Tools Are Priced
Tokens defined from first principles: how code tokenizes differently, why output costs 5x more, and what drives agentic AI coding bills to $2,000/month.
-
2. Why AI Agent API Costs Are So Much Higher Than Chatbots
62% of an agent's bill is the model rereading prior context on every step. Learn why agentic workloads cost 5–30x more and what you can do about it.
-
3. Context Window Limits: Why 200K Tokens Isn't Really 200K
The advertised context window is not your working budget. Learn why effective capacity is smaller, how position determines recall, and what context rot does to long agent sessions.
-
4. What Is Context Rot and Why AI Agents Degrade Over Time
Why AI agents get worse mid-session even with a half-empty context window — and the three compounding mechanisms behind it.
-
5. Prompt Caching: How Anthropic and OpenAI Differ (and the Catch)
How prompt caching works on Anthropic and OpenAI, what the break-even math looks like, and why prefix order can make or break your hit rate.
-
6. How to Reduce AI Coding Costs 40-60% with Model Tiering
Route each agent task to the right model tier — Haiku 4.5, Sonnet 4.6, or Opus 4.8 — and cut AI coding spend 40-60% with no measurable quality loss.
-
7. Context Engineering: What the Model Sees Is What You Design
Context engineering replaced prompt engineering for agents: four failure modes, four levers, and how to design the model's full information environment.
Spring AI for Enterprise Java
-
1. What Is Spring AI? The Enterprise Java Framework for Calling Any AI Model
Spring AI 2.0.0 explained for Java/Spring Boot teams: what it is, why it's not just an LLM wrapper, and a working ChatClient demo in 10 lines.
-
2. Why Spring AI Fits Spring Boot Teams: The Patterns That Transfer Directly
Spring AI reuses the Spring Boot patterns you already trust — DI, starters, auto-config. See the exact 2.0.0 wiring, mapped row by row.
-
3. Spring AI ChatClient Explained: prompt → model → response, and reading token usage
Spring AI 2.0.0 ChatClient walkthrough: system vs. user messages, .content() vs. .chatResponse(), and reading model + token usage from ChatResponseMetadata.
-
4. Spring AI Model Portability: Switch Providers Without Rewriting Your App
How Spring AI's ChatModel interface lets you swap OpenAI, Anthropic, Bedrock, Gemini, and local Ollama behind one ChatClient — with zero code changes.
-
5. Structured Output in Spring AI: Turn Model Text Into Typed Java Records with .entity()
AI models return text, not objects. Spring AI's .entity() converts that text into a typed, schema-validated Java record — the same move as Jackson, but for a model.
-
6. RAG with Spring AI: Documents → Chunks → Embeddings → Vector Store → Grounded Answers
Spring AI 2.0.0 RAG pipeline explained: QuestionAnswerAdvisor vs RetrievalAugmentationAdvisor, vector stores, and grounding answers in your own docs.
-
7. Tool Calling in Spring AI 2.0: @Tool, ChatClient.tools(), and the Full Round Trip
How Spring AI 2.0 tool calling works: @Tool methods, the ChatClient.tools() seam, the model-requests/code-decides round trip, and least-privilege denial.
-
8. MCP with Spring AI: Connect AI to Tools the Standard Way (Spring AI 2.0.0)
MCP standardizes the tool-calling handshake so any AI client can call your Java code. Wire a Spring Boot app as an MCP client and server in 2.0.0.
-
9. Observability for Spring AI: Logging, Metrics, and Tracing Every Model Call
Wire SimpleLoggerAdvisor and Micrometer tracing into Spring AI 2.0.0 — read a real ChatClient trace, track token cost, and build an audit trail.
-
10. Spring AI Evaluation & Guardrails: RelevancyEvaluator, FactCheckingEvaluator, and CI Release Gates
Spring AI's Evaluator interface turns a RAG answer into a JUnit assertion. Wire RelevancyEvaluator and FactCheckingEvaluator into a real CI release gate before you ship.
-
11. Spring AI Security & Compliance: Where Secrets, Authorization, PII Boundaries, and Audit Logs Actually Live
Spring AI 2.0.0 security and compliance, mapped: secrets, Spring Security authz, SafeGuardAdvisor/PII boundary, and audit logging — with real code.
-
12. Spring AI Production Blueprint: ChatClient + RAG + Tools + Security + Observability in One Service
The complete Spring AI 2.0.0 reference architecture: one @Service + @RestController wiring ChatClient, RAG, tool calling, and observability for production.
AI Agent Internals: How Coding Agents Really Work
-
1. How AI Agents Use Tools: The Model vs. Orchestrator Split
The model only writes text. A separate orchestrator reads, validates, and executes — this split defines every AI agent ever built.
-
2. MCP Explained: How AI Agents Connect to Any Tool
How MCP's host-client-server model collapses N×M integrations to N+M, what servers actually expose, and how the 2025-11-25 spec adds human-in-the-loop controls.
-
3. The Agent Loop and Supervision Contracts in AI Coding Tools
How the think-act-read-decide loop works inside every coding agent, and why the supervision contract — not the model — is the real differentiator.
-
4. How a Chat Message Becomes a GitHub API Call: Full Stack Trace
Trace how a typed English sentence travels through eight nodes — editor, model, MCP client/server, GitHub API — and comes back as a created issue.
-
5. How MCP Apps Work: Tools That Return Interactive UI
MCP tools can return real interactive UI — not just text. Here's how MCP Apps render forms, dashboards, and widgets inside Claude and VS Code, with a precise technical breakdown.
-
6. Why MCP Tools Disappear: Editor Modes and Permission Gates
MCP tools vanish because editors gate them by mode. Learn how the protocol works, what tool annotations signal, and which gate each editor places.
The Engine Behind Every AI Code Editor
-
1. Why Cursor, Windsurf, and Copilot Are All Built on VS Code
How VS Code's multi-process architecture — extension host, LSP, DAP, pty — became the shared skeleton under every major AI code editor.
-
2. How VS Code Isolates Extensions to Prevent Editor Crashes
How VS Code's extension host process keeps your editor alive when extensions hang or crash, and what this reveals about LSP, DAP, remote dev, and AI editor forks.
-
3. How Autocomplete and Go-to-Definition Actually Work in VS Code
The Language Server Protocol (LSP) powers autocomplete and go-to-definition. Here's the full architecture — JSON-RPC wire, symbol indexing, and why AI editors didn't rebuild any of it.
-
4. How AI Agents Run Terminal Commands in VS Code
The pty, OSC 633 shell integration markers, and the five-process architecture that let AI agents run and monitor commands in VS Code.
-
5. How VS Code Remote Development Works: SSH, Containers, and Tunnels
How VS Code splits its processes across local and remote machines using the VS Code Server — same architecture, longer wires, and the foundation for every AI editor.