

HIL Tool Approval Basic
Chat assistant with human approval workflows for safe tool execution.


HIL Needs Approval
Demonstrate tool approval with async generators. Includes real-time feedback, approval workflows, and interactive management.


Tool Input Lifecycle Hooks
Explore tool input lifecycle hooks: onInputStart, onInputDelta, and onInputAvailable. See how to track tool input generation in real-time during streaming.


Preliminary Tool Results
Return preliminary tool results using async iterables. Stream status updates during tool execution before the final result is available.


Tool API Context
Pass arbitrary context from generateText/streamText to tool execution via experimental_context. Access context in tool execute functions for dynamic behavior.


Tool Call Repair
Repair invalid tool calls using experimental_repairToolCall. Fix schema validation errors without requiring additional steps that pollute message history.


Dynamic Tool
Create dynamic tools with runtime-generated schemas using dynamicTool. Demonstrates unit conversion tools where schema adapts based on conversion type (temperature, length, weight, currency) and supports dynamic model selection.


Search - Exa AI (robust)
Search the web using Exa's semantic API and real-time crawling. Includes URL search, content extraction, Wikipedia, Reddit, and news search tools.


Search - Firecrawl (robust)
Search the web using Firecrawl's API and real-time crawling. Includes URL search, content extraction, Wikipedia, Reddit, and news search tools.
Explore More
More in SDK API
generateText( )
Text and structured data generation with Output.object()
streamText( )
Streaming text and structured data with Output.object()
generateImage( )
Image generation examples
generateSpeech( )
Speech synthesis examples
transcribe( )
Audio transcription examples
Agent( )
AI SDK agent API examples and patterns



