Open Agent Loops
API Reference

webSearchTool

@open-agent-loops/core


function webSearchTool(backend): Tool;

Defined in: tools/builtin/web.ts:41

Build a web_search tool bound to a backend.

Parameters

ParameterTypeDescription
backendWebBackendThe WebBackend whose search performs the lookup.

Returns

Tool

A Tool named web_search ready to pass to the agent loop or a ToolRegistry.

Remarks

Read-only, so it keeps the default parallel execution mode (a batch of searches can run concurrently). Results are shaped by formatWebSearchResults.

See

Example

const tool = webSearchTool(myWebBackend);
await runAgent({ ...opts, tools: [tool] });
// The model can now call: web_search({ query: "agentic loop", maxResults: 5 })

On this page