Explore topics

Topic

AI Agent Tools

A tool is where the agent touches the real world, so most production issues live here. This topic covers the whole tool lifecycle: typed definitions with Zod, input/output hooks, repairing malformed tool calls, generating tools at runtime, and gating destructive actions behind human approval. Then the capabilities themselves — neural web search with Exa, scraping with Cheerio and Firecrawl, and PDF ingestion — each wired into a working chat you can test.

22 patterns8 featured

Featured patterns

A curated starting point for this topic — open a live preview, then adapt the source.

8 curated
Exa Web Search Tool preview
01Intermediate

Exa Web Search Tool

Search with Exa's semantic API and real-time crawling. Includes live content extraction and relevance scoring.

  • Run semantic web search with the Exa SDK
  • Livecrawl result pages for fresher content snippets
  • Return truncated, structured search hits to the model
streamTextstepCountIsconvertToModelMessagesai
Web Search Tool preview
02Beginner

Web Search Tool

Search the web using OpenAI's tool with real-time results. Includes source verification, citation tracking, and contextual answers.

  • Force OpenAI web_search_preview on every query
  • Return AI-synthesized answers grounded in web search
  • Configure search context size and optional user location
generateTexttools:aiwebsearch
Cheerio Web Scraper preview
03Beginner

Cheerio Web Scraper

Extract content from websites using Cheerio. Includes parsing, link discovery, and rate limiting.

  • Scrape HTML pages with Cheerio in a tool-calling agent
  • Extract readable text and structure from arbitrary URLs
  • Feed scraped page content into a streaming chat analysis
cheerioscraper
PDF Analysis Tool preview
04Beginner

PDF Analysis Tool

Process PDFs with AI analysis. Extract text, generate summaries, and identify key insights.

  • Analyze uploaded PDF files with multimodal streamText
  • Send PDF bytes to the model as application/pdf media
  • Reject oversized uploads before analysis begins
streamTextaipdf
Dynamic Tool preview
05Intermediate

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.

  • Create tools at runtime with dynamicTool
  • Adapt tool name, description, and Zod schema from user selection
  • Support unit conversion schemas that change by conversion type
streamTextconvertToModelMessagesdynamicToolai
Tool Input Lifecycle Hooks preview
06Beginner

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.

  • Observe tool input generation with onInputStart
  • Stream partial tool arguments via onInputDelta
  • React when full tool input becomes available with onInputAvailable
streamTextconvertToModelMessagestool(ai
HIL Tool Approval Basic preview
07Intermediate

HIL Tool Approval Basic

Chat assistant with human approval workflows for safe tool execution.

  • Intercept tool calls that require human confirmation before execution
  • Resume the agent after approve or deny decisions
  • Limit agent loops with stepCountIs during approval flows
streamTextgatewaystepCountIsai
HIL Needs Approval preview
08Intermediate

HIL Needs Approval

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

  • Pause Experimental_Agent tool calls until the user approves
  • Handle approval denial gracefully in agent instructions
  • Visualize pending and completed tool execution states
new Agenttool(stepCountIsai

More patterns

Additional patterns that fit this topic.

14 more
01
Preliminary Tool ResultsReturn preliminary tool results using async iterables. Stream status updates during tool execution before the final result is available.
02
Tool API ContextPass arbitrary context from generateText/streamText to tool execution via experimental_context. Access context in tool execute functions for dynamic behavior.
03
Tool Call RepairRepair invalid tool calls using experimental_repairToolCall. Fix schema validation errors without requiring additional steps that pollute message history.
04
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.
05
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.
06
Scrape - Cheerio (lightweight)Scrape websites using Cheerio's fast HTML parser. Includes URL scraping, website crawling, and content extraction without external API costs.
07
Scrape - Jina AI (advanced)Scrape websites using Jina AI's reader service with JavaScript rendering. Includes URL scraping, website crawling, and content extraction with AI-powered parsing.
08
Scrape - Markdown.new (free)Scrape websites using Cloudflare's markdown.new service. Extract clean markdown content from any URL. No API key required.
09
Claude Web Search ToolSearch the web with Claude AI. Includes result filtering, multiple search types, and language support.
10
@exalabs webSearch ToolSearch with Exa AI SDK's webSearch tool and Anthropic Claude Sonnet 4.5. Uses @exalabs/ai-sdk for seamless integration.
11
Firecrawl Scrape Tool ChatCrawl and extract content using Firecrawl's API. Includes URL processing, markdown conversion, and structured data extraction.
12
Jina AI Web ScraperScrape websites using Jina AI with JavaScript rendering and proxy rotation. Handles rate limiting and bot detection.
13
Cloudflare Markdown.new Web ScraperConvert any webpage to markdown using Cloudflare's markdown.new. Clean, structured output for AI pipelines and content processing.
14
AI Profile Enrichment FormAnalyze user profiles with AI and provide personalized suggestions. Enriches data, suggests improvements, and offers career insights.

Related topics

Continue with adjacent topics that share the same building blocks.

Browse by category

Jump into the catalog filtered by category.

You’ve reached the end of AI Agent Tools.