claude-agent-sdk
Installation
SKILL.md
Claude Agent SDK - Structured Outputs & Error Prevention Guide
Package: @anthropic-ai/claude-agent-sdk@0.2.12 Breaking Changes: v0.1.45 - Structured outputs (Nov 2025), v0.1.0 - No default system prompt, settingSources required
What's New in v0.1.45+ (Nov 2025)
Major Features:
1. Structured Outputs (v0.1.45, Nov 14, 2025)
- JSON schema validation - Guarantees responses match exact schemas
outputFormatparameter - Define output structure with JSON schema or Zod- Access validated results - Via
message.structured_output - Beta header required:
structured-outputs-2025-11-13 - Type safety - Full TypeScript inference with Zod schemas
Example:
Related skills