Skip to content
2 min read · 353 words

Interface: SearxngToolConfig<A>

Defined in: src/batteries/tools/searxng/index.ts:146

Configuration for createSearxngSearchTool (async) and createSearxngSearchToolSync (sync — artifact narrowed to the sync subset).

Type Parameters

Type ParameterDefault typeDescription
AArtifactResolverThe ArtifactResolver variant accepted: the full resolver (async factory) or the sync subset (createSearxngSearchToolSync).

Properties

PropertyTypeDescriptionDefined in
artifact?ASpool-artifact resolver for the tool's output. Default () => SpooledJsonArtifact. Accepts a constructor, a sync resolver, or — via createSearxngSearchTool — an async / dynamic-import resolver. Pass () => SpooledMarkdownArtifact (paired with an output stage that renders markdown into ctx.output) or () => SpooledArtifact for plain text.src/batteries/tools/searxng/index.ts:168
description?stringTool description override.src/batteries/tools/searxng/index.ts:161
gate?ToolGateFnOptional per-call gate run before the HTTP request — the seam for human-approval/RBAC flows built on ctx.waitFor (the ADK gates primitive). Throwing aborts the call through the standard tool-error path. Search queries reach the network on the agent's behalf, which makes every call a candidate for gating.src/batteries/tools/searxng/index.ts:175
headers?| SearxngHeadersResolver | SearxngHeadersCustom request headers — a static object or a (sync/async) resolver for refreshable auth.src/batteries/tools/searxng/index.ts:150
inputPipeline?SearxngInputMiddlewareFn[]Stages run before the HTTP request. See SearxngRequestContext.src/batteries/tools/searxng/index.ts:177
instanceUrlstringBase URL of the SearXNG instance, e.g. https://searx.example.org. Required.src/batteries/tools/searxng/index.ts:148
name?stringTool name. Default searxng_search.src/batteries/tools/searxng/index.ts:159
outputPipeline?SearxngOutputMiddlewareFn[]Stages run after the response is parsed. See SearxngResponseContext.src/batteries/tools/searxng/index.ts:179
resultFormat?SearxngResultFormatOutput shape. normalized/raw pin the shape (the model cannot change it); either (default) exposes a format argument so the model chooses per call.src/batteries/tools/searxng/index.ts:157
timeout?numberRequest timeout in milliseconds. Default 10_000.src/batteries/tools/searxng/index.ts:152