wireSearchMemory
function wireSearchMemory( agent, session,store): Promise<AnyTool | undefined>;Wires the search_memory tool for one turn, or withholds it entirely.
Two independent reasons withhold the tool, both “absent” rather than “present but broken” — a search tool that silently returns nothing is worse than one that is not offered at all:
- No declared extractor is addressable in this session (no owner — see
resolveWorkingMemoryOwner). MirrorswireWorkingMemoryexactly. - The agent declares no extractors at all.
z.enum([])is not constructible, so there is no schema to build.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<AnyTool | undefined>