Fleet Memory
graft()
Assemble worker graft context.
What it does
Assemble worker graft context.
The operation follows the fleet’s memory mode and agent identity rules when selecting, storing, or transferring memory.
Signature
TypeScript
graft(topicIds?: string[]): Promise<InjectionResult>Parameters
topicIds? (string[]) — Topic identifiers to include in the generated context.InjectionResult fields
systemPrompt is the assembled context; this operation does not itself call the chat model.nodes are selected topics and memories contains their active structured facts when included.tokenCount is the assembled size; tokenBudget is present when a budget governed assembly.Result
The selected memory context and prompt text ready to pass to an LLM.
Example
example.ts
const graft = await worker.graft(topicIds);