CPN Learning Path CPN Connect On Demand Library All Courses Home

Production-Grade Prompting, Agents & Tool Use

Build your first production integration on Claude, with reliable prompts, tools, context management, and agent loops.

rate limit

Code not recognized.

About this course

Writing code that uses Claude is different from using Claude to write code. Each topic in this module addresses a specific failure mode: a prompt that looked solid but breaks on real input, a stream that fails partway through, an agent that runs past its budget, and an action that turns out to be irreversible. Learning to identify and avoid these failure modes early is what makes a Claude integration reliable and affordable in production.

Learning objectives
By the end of this module, you will be able to:

  • Write production-ready prompts using system prompts, XML tags, few-shot examples, and output constraints, and diagnose why a prompt underperforms when first-pass results miss the mark
  • Decide when to enable extended thinking, set a thinking budget, and handle thinking blocks correctly across tool-use turns
  • Define and implement a tool schema that Claude selects correctly, construct the tool-use loop, handle multi-turn message blocks, and distinguish when to use a single tool call versus multiple parallel calls
  • Consume a streamed response, assemble streamed events into complete content blocks, and recover cleanly when a stream is interrupted partway through
  • Apply context engineering techniques including managing the context window, compacting, clearing history between, and subagent handoffs, to keep multi-turn agent sessions within budget without losing task continuity
  • Build a production agent by choosing between workflow and agent patterns, wiring tools and context into a working loop, selecting a wiring path that fits your deployment constraints, and adding human-in-the-loop (HITL) checkpoints where actions are irreversible
  • Manage agent memory across sessions using persistent storage patterns and choosing the right memory scope so that agent state survives across turns without inflating context cost
  • Understand sending images and PDFs to Claude using the correct message block structure, apply the Files API for reusable assets, and submit high-volume workloads using the Message Batches API so they complete asynchronously

About this course

Writing code that uses Claude is different from using Claude to write code. Each topic in this module addresses a specific failure mode: a prompt that looked solid but breaks on real input, a stream that fails partway through, an agent that runs past its budget, and an action that turns out to be irreversible. Learning to identify and avoid these failure modes early is what makes a Claude integration reliable and affordable in production.

Learning objectives
By the end of this module, you will be able to:

  • Write production-ready prompts using system prompts, XML tags, few-shot examples, and output constraints, and diagnose why a prompt underperforms when first-pass results miss the mark
  • Decide when to enable extended thinking, set a thinking budget, and handle thinking blocks correctly across tool-use turns
  • Define and implement a tool schema that Claude selects correctly, construct the tool-use loop, handle multi-turn message blocks, and distinguish when to use a single tool call versus multiple parallel calls
  • Consume a streamed response, assemble streamed events into complete content blocks, and recover cleanly when a stream is interrupted partway through
  • Apply context engineering techniques including managing the context window, compacting, clearing history between, and subagent handoffs, to keep multi-turn agent sessions within budget without losing task continuity
  • Build a production agent by choosing between workflow and agent patterns, wiring tools and context into a working loop, selecting a wiring path that fits your deployment constraints, and adding human-in-the-loop (HITL) checkpoints where actions are irreversible
  • Manage agent memory across sessions using persistent storage patterns and choosing the right memory scope so that agent state survives across turns without inflating context cost
  • Understand sending images and PDFs to Claude using the correct message block structure, apply the Files API for reusable assets, and submit high-volume workloads using the Message Batches API so they complete asynchronously