Skip to main content
Agents can search the web for current information using the built-in WebSearch tool. This tool works with OpenAI and Anthropic models.
See the Model Reference to check which specific models support web search.
from timbal import Agent
from timbal.tools import WebSearch

# Works with OpenAI or Anthropic models
agent = Agent(
    name="SearchAgent",
    model="openai/gpt-5.1",
    tools=[WebSearch()],
    system_prompt="Search the web for current information."
)

# Agent will automatically use search when needed
result = await agent(
    prompt="When was the last match of Liverpool?"
).collect()

Key Features

  • Real-time Information: Access current web data and news
  • Automatic Tool Selection: Agent decides when to search
  • Citation Support: Includes source links in responses