Working code demos for the Udemy course Claude Certified Architect — Foundations (CCA-F): The Teaching Course.
Each folder maps one-to-one to a specific lecture in the course. Every demo runs end-to-end against real Anthropic APIs, with a small mock fallback where API cost or determinism matters.
CCA-F/
├── S02/ # Domain 1 — Agentic Architecture & Orchestration
│ ├── L04-Watch-The-Loop-Break/ # Broken agent loop → structured error fix
│ ├── L07-Coordinator-Subagent-Demo/ # Multi-agent coordinator + subagents
│ └── L12-Session-Management/ # Agent SDK continue / resume / fork
├── S03/ # Domain 2 — Tool Design & MCP Integration
│ └── L07-MCP-Server-Demo/ # MCP server + agent that consumes it
├── S04/ # Domain 3 — Claude Code Configuration & Workflows
│ └── L07-Configure-Claude-Code-Setup/ # Before/after Claude Code project setup
├── S05/ # Domain 4 — Prompt Engineering & Structured Output
│ └── L08-Structured-Extractor-Scenario-6/ # tool_use + strict mode + validation-retry + Batches
└── S06/ # Domain 5 — Context Management & Reliability
├── L03-Context-Compaction/ # /compact under the hood, real token counts
├── L04-Retry-Behavior-529-vs-429/ # Distinguish org rate limit from platform overload
└── L06-Optimize-Multi-Turn-Agent/ # Prompt caching cost comparison
Each demo folder contains:
README.md— what the demo teaches, how to run it, what to look forrequirements.txt— pinned Python dependencies for the demo.env.example— required environment variables*.py— the runnable Python source- Any supporting data files (contracts, benchmarks, etc.)
Prerequisites
- Python 3.10 or newer
- An Anthropic API key
- For the Claude Code demo (S04/L07) and MCP demo (S03/L07): the Claude Code CLI installed via
npm install -g @anthropic-ai/claude-code
Setup for any demo
cd S0X/L0X-Demo-Name/
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
python <demo-file>.pyEach demo's README.md has the specific run command and what to look for in the output.
| Section | Demo | Teaches | Key concept |
|---|---|---|---|
| Domain 1 | S02/L04 — Watch the Loop Break |
Structured tool errors vs iteration caps | Root Cause Bias Pattern 2 |
| Domain 1 | S02/L07 — Coordinator + Subagents |
Multi-agent orchestration, task decomposition | Root Cause Bias Pattern 3 |
| Domain 1 | S02/L12 — Session Management |
Agent SDK continue/resume/fork primitives | Stateful vs stateless agents |
| Domain 2 | S03/L07 — MCP Server + Agent |
Author an MCP server, consume its tools from an agent | Tool integration architecture |
| Domain 3 | S04/L07 — Claude Code Setup |
.claude/settings.json, CLAUDE.md hierarchy, hooks, allowed_tools scoping |
Deterministic capability control |
| Domain 4 | S05/L08 — Structured Extractor |
tool_use with strict: true, forced tool_choice, validation-retry loop, Batches API |
Guaranteed-schema output |
| Domain 5 | S06/L03 — Context Compaction |
What /compact does under the hood — summarize old turns, keep recent verbatim, measure token drop |
Context management, not window size |
| Domain 5 | S06/L04 — 429 vs 529 |
Distinguish org rate limit from platform overload, apply the right retry strategy for each | Reliability patterns |
| Domain 5 | S06/L06 — Prompt Caching |
Cache breakpoints, TTL choice, cache-hit-rate measurement, cost comparison | Cost audit — first lever |
Every CCA-F exam question is essentially "something is broken — what do you do?" The right answer fixes the cause, not the symptom. Four canonical patterns run through both the exam and these demos:
| Symptom | Wrong fix (the exam distractor) | Right fix (root cause) |
|---|---|---|
| Tool routing unreliable | Add a classifier layer | Fix tool descriptions |
| Agent loops forever | Cap iterations at N | Fix structured error responses |
| Subagent output wrong | Add shared memory between subagents | Fix coordinator decomposition |
| Critical business rule not enforced | Add it to the system prompt | Use a hook |
Every demo in this repo teaches one of these patterns.
Official Anthropic documentation (start here for any technical claim)
- Anthropic documentation home — canonical reference for API, models, and pricing
- Claude API — Messages endpoint — the core API surface these demos exercise
- Tool use guide — schemas, strict mode, forced tool_choice
- Prompt caching — breakpoints, TTL, cost math
- Extended thinking — budget, multi-turn preservation on newer models
- Message Batches API — 50% discount async workload
- Model overview + pricing — check before you trust any hardcoded price in demo code
Claude Code
- Claude Code setup and configuration
- Slash commands — custom
.claude/commands/ - Hooks — the deterministic enforcement primitive
- CLAUDE.md hierarchy — user/project/subdirectory scoping
Claude Agent SDK
- Agent SDK overview
- Session management — continue/resume/fork
- Custom tools
- MCP integration
Model Context Protocol (MCP)
- MCP specification
- MCP Python SDK
- Reference server implementations — read real MCP server code
Community study references
- paullarionov/claude-certified-architect — the highest-quality open-source CCA-F study guide. Deep technical detail across all five domains with worked exam questions. Recommended as a companion to this course.
Certification
- Register for the CCA-F exam — $99 USD (free for the first 5,000 Anthropic Partner Network employees)
- Official CCA-F exam guide v0.1 (PDF) — request via the registration page above; this PDF is the authoritative reference for domains, task statements, sample questions, in-scope and out-of-scope topics
Books and long-form reference
- Anthropic's engineering blog — architectural deep-dives on Claude systems
- Building effective agents (Anthropic) — the paper that shaped modern agentic design patterns
All demos default to:
claude-sonnet-4-6for standard workloadsclaude-opus-4-6where reasoning depth mattersclaude-haiku-4-5-20251001for cost-sensitive high-volume paths
If Anthropic ships new model IDs, update the MODEL constant near the top of each demo file (or set ANTHROPIC_MODEL in your .env).
If you find a bug, an outdated pattern, or a demo that no longer runs against the current Anthropic API:
- Open an issue on this repo describing the demo, the command you ran, and the observed vs expected output
- Or DM in the Udemy Q&A — the course author reads every question
Pull requests welcome for fixes and clarifications; behavioral changes to demos should go through issue discussion first so we don't drift from what the course lectures teach.
Course material and demo code © Alex Kaziuka, released under the MIT License for educational use. Feel free to adapt in your own production work.
Companion to the Udemy course Claude Certified Architect — Foundations: The Teaching Course.