Open Agent Loops
API Reference

formatSearchResults

@open-agent-loops/core


function formatSearchResults(matches): string;

Defined in: tools/builtin/search.ts:77

Render search matches into the single text block handed to the model.

Parameters

ParameterTypeDescription
matchesSearchMatch[]The matches returned by a SearchBackend.

Returns

string

One path:line: text line per match, or "No matches found." when empty.

Remarks

Each match becomes one path:line: text line; an empty result set yields a clear note instead of an empty string.

See

searchTool

On this page