Features

Web Search

Give your agent access to real-time web information using Google Search.

The web search addon provides a web_search tool that lets your agent look up current information. Weather, news, prices, recent events — anything that requires up-to-date data.

Real-time Data

Access current information from the web, not just training data

Google Search

Powered by Google Search via Gemini Search Grounding

Fully Server-side

No client code needed — the server handles search and returns results

Enable Web Search

Add web-search to your agent's enabled addons. No additional configuration is required.

const metadata = {
  className: 'Research Assistant',
  personality: 'A helpful assistant with access to current information.',
  instructions: 'Use web_search when you need up-to-date information. Use send_message to reply.',
  tools: [],
  addons: {
    enabled: ['web-search', 'messaging'],
  },
};

How It Works

Web search is entirely server-side. Your client doesn't receive tool-call events for it — the server handles the full search lifecycle.

1

Agent Decides to Search

The action agent calls web_search with a query

2

Server Searches Google

The server uses Gemini with Google Search Grounding to find current information

3

Results Feed Back

Search results are injected back into the agent's context for the next response

4

Agent Responds

The agent uses the search results to send an informed reply via send_message

Tool Definition

The server automatically provides the following tool to the agent. You don't need to define it in your tools array.

// Automatically available when web-search addon is enabled
{
  name: 'web_search',
  description: 'Search the web for current information using Google Search.',
  parameters: [
    { name: 'query', type: 'string', required: true },
    { name: 'context', type: 'string', required: false }
  ]
}

Example Conversation

The agent automatically searches when it needs current information:

U

What's the weather like in Berlin today?

🤖

(Agent calls web_search with query "weather in Berlin today" → server handles it automatically)

🤖

It's currently 4°C in Berlin with partly cloudy skies. Expect a high of 7°C and a low of 1°C today.

Combining with Other Addons

Web search works well alongside other addons. A common pattern is combining it with messaging for natural typing delays and knowledge bases for private data:

addons: {
  enabled: ['web-search', 'messaging', 'knowledge-base'],
  messaging: {
    delays: { typingMode: 'exponential' },
  },
  knowledgeBases: [
    { id: 'cmk123abc456', name: 'Internal Docs' }
  ],
}

The agent will use knowledge base search for questions about your content and web search for current events, weather, prices, and other real-time information.