1. Agent + runner
2. Typed tools
3. Streaming
Use streaming when a UI or CLI should show progress before the final result is ready.run_stream() returns an AgentStreamHandle. Consume it to receive text, tool lifecycle events, errors, and the terminal result.
4. Memory continuity
Pass the samethread_id to keep conversation context attached to a thread.
thread_id for related turns.
5. Safety limits
Production agents need hard limits even when prompts and tools are well designed.What to read next
Agents
Agent fields, prompt resolution, subagents, skills, and MCP tools.
Tools
Tool schemas, context, hooks, middleware, sandboxing, and output limits.
Streaming
Event types, stream handles, cancellation, and UI patterns.
Production Readiness
Evals, telemetry, security controls, queues, and deployment.