| Example | Description |
|---|---|
| Tool Decorator | Define tool decorator with @tool, including sync and async examples. |
| Async Tool Decorator | Define async tools with @tool and stream results via AsyncIterator. |
| Tool Decorator On Class Method | Use @tool on toolkit class methods, including generators. |
| Tool Decorator With Hook | Attach execution hooks to a tool via the decorator pattern. |
| Tool Decorator With Instructions | Add tool instructions to guide model usage and output. |
| Cache Tool Calls | Cache tool results with cache_results to avoid repeat calls. |
| Stop After Tool Call | Stop agent execution immediately after a tool call completes. |