Open Agent Loops
API Reference

formatWebSearchResults

@open-agent-loops/core


function formatWebSearchResults(results): string;

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

Render web-search hits into the single text block handed to the model.

Parameters

ParameterTypeDescription
resultsWebSearchResult[]The hits returned by a WebBackend's search.

Returns

string

One numbered block per hit, or "No results found." when empty.

Remarks

Each hit becomes a numbered [n] title — url line followed by its snippet; an empty result set yields a clear note instead of an empty string.

See

webSearchTool

On this page