Skip to documentation
Docs navigation
Docs/graftByRelevance()
Fleet Memory

graftByRelevance()

Build fleet-aware relevant graft context.

What it does

Build fleet-aware relevant graft context.

The operation follows the fleet’s memory mode and agent identity rules when selecting, storing, or transferring memory.

Signature

TypeScript
graftByRelevance(query: string, options?: FleetGraftByRelevanceOptions): Promise<InjectionResult>

Parameters

query (string) — Natural-language intent used to rank relevant memory.
options? (FleetGraftByRelevanceOptions) — Optional limits, filters, tags, or operation-specific behavior.

Result

The selected memory context and prompt text ready to pass to an LLM.

Example

example.ts
const graft = await worker.graftByRelevance("billing");