Tool calling
Safe side effects
Protect writes, external messages, payments, and other irreversible actions.
Lesson overview
Safe side effects
Separate read tools from write tools. For high-impact writes, show the exact proposed action to a human or require a policy that proves authorization.
Use idempotency keys for operations that may be retried.
Learning path
Theory → Example → Code → Practice → Quiz → Challenge → Completion
Step 1
Theory
Safe side effects
Separate read tools from write tools. For high-impact writes, show the exact proposed action to a human or require a policy that proves authorization.
Use idempotency keys for operations that may be retried.
Step 2
Example
Example
Apply Safe side effects to a realistic production scenario and trace the decision step by step.
Step 3
Code
Code
Add implementation notes or a runnable example for this concept.
Step 4
Practice
Practice
Write down the inputs, expected output, constraints, and one failure case for Safe side effects.
Step 5
Quiz
Quiz coming soon.
Step 6
Challenge
Challenge
Design a production-ready solution for Safe side effects and explain one important trade-off.
Complete every stage
Work through every step in order, then the lesson will be marked complete.
Each chapter and subtopic has its own public URL under /ai-agent.