Skip to main content
AI Exam LabIndependent prep
CourseVideoCCDV-F

Developer Foundations: integrating Claude

Code-first course on SDK usage, structured output, streaming, tool definitions, testing and CI for non-deterministic systems.

Every module has runnable code, a deliberately broken example and a debugging exercise. The focus is the integration problems that actually cost teams days: partial streams, fabricated required fields, retry storms and untestable prompts.

Course outline

12 lessons · 4h 28m · v1

  1. 01SDK and client fundamentalsConfiguration, auth, timeouts and the defaults you should override.3 lessons
    • Client setup and configurationFree preview20 min
    • Multi-turn conversations in codeFree preview22 min
    • Streaming and partial parsing24 min
  2. 02Structured output and toolsMaking model output something a type system can accept.3 lessons
    • Schema-validated structured output24 min
    • Writing tool definitions that behave24 min
    • Handling tool errors gracefully20 min
  3. 03Testing and debuggingWorking productively when the same input can produce different output.3 lessons
    • Test strategies for non-deterministic code26 min
    • Prompt and model versioning in CI22 min
    • Debugging with traces22 min
  4. 04Developer workflows with Claude CodeUsing agentic coding tools responsibly inside a real repository.3 lessons
    • Agentic coding workflows that scale24 min
    • Repositories that agents work well in20 min
    • Review discipline for AI-written code20 min

What this covers

You will be able to

  • Configure the client correctly for each environment
  • Validate and repair structured output
  • Write tool definitions that behave predictably
  • Catch prompt regressions in CI

Included

  • 12 lessons across 4 modules
  • Runnable example repository
  • CI prompt-regression workflow
  • Lifetime access and updates

Preview: Client setup and configuration

The first two lessons of the course are free to read, so you can judge the material before buying.

Client configuration is where most 'the API is unreliable' reports actually begin: a missing timeout, an unset retry policy, or a key read from the wrong environment.

Configure explicitly

  • API key from the environment, never from source, and never logged.
  • A request timeout lower than the caller's own timeout.
  • Bounded retries with exponential backoff and jitter, only for retryable failures.
  • A base URL per environment so sandbox traffic cannot reach production data.
  • A stable anthropic-version header — API versioning is separate from model versioning.

One client, one place

Wrap the SDK in a small module that owns configuration, logging and error mapping. When every call site constructs its own client, policies diverge and the one that skips retries is the one that pages you at 3am.

import Anthropic from "@anthropic-ai/sdk";

export const anthropic = new Anthropic({
  apiKey: process.env.ANTHROPIC_API_KEY,
  timeout: 60_000,  // fail before the caller does
  maxRetries: 2,    // SDK retries 408/409/429/5xx with backoff
});

export async function complete(prompt: string) {
  const res = await anthropic.messages.create({
    model: process.env.CLAUDE_MODEL ?? "claude-sonnet-5",
    max_tokens: 1024,
    messages: [{ role: "user", content: prompt }],
  });
  if (res.stop_reason === "max_tokens") throw new Error("truncated");
  return res;
}
A single, boring, correct client wrapper

Checkpoint

Which two settings must be lower than the caller's own deadline?