Skip to documentation
Docs navigation
Docs/Fleet & shared memory
Guide

Fleet & shared memory

Give specialized workers local memory, shared fleet knowledge, and explicit conductor-led transfer between agents.

Estimated time: 12 minutes
Level: Advanced
Prerequisites:Installation·Quick Start

Overview

A fleet groups worker agents and a conductor around one core. Workers can read local memory, the fleet’s synthetic shared session, or both, while grafting remains available for deliberate cross-worker transfer.

When to use this

Several specialized agents need isolated task memory.
All workers need common policies or product knowledge.
A conductor should transfer selected context between workers.
Memory provenance and worker identity must remain visible.

Fleet memory model

Worker memory
Fleet shared memory
Conductor selection
Target worker

Step 1: Create the fleet

fleet.ts
const fleet = new MemoGrafterFleet(config, {
  id: "support-fleet",
  name: "Support Fleet",
  defaultWorkerMemory: "both",
});

await fleet.initialize();
const conductor = fleet.createConductor();
const billing = await fleet.createWorker({ color: "billing" });
const technical = await fleet.createWorker({ color: "technical" });

Step 2: Add shared knowledge

shared.ts
await fleet.ingestToFleet(
  "Refund requests are accepted within 30 days.",
  { tags: ["policy"], source: "support-handbook" },
);

const result = await fleet.recallFromFleet("refund policy");

Step 3: Choose worker scope

memory-mode.ts
const support = await fleet.createWorker({
  color: "support",
  memory: "both",
});

await support.recall("refund policy", { memory: "fleet" });
await support.recall("customer preference", { memory: "local" });

Step 4: Transfer selected worker memory

conductor.ts
await conductor.graftColorIntoAgent("billing", technical, { limit: 4 });
await conductor.graftByPrompt("invoice credit context", technical, {
  minSimilarity: 0.6,
  limit: 3,
});

Full example

support-fleet.ts
const fleet = new MemoGrafterFleet(config, { id: "support-fleet" });
await fleet.initialize();

try {
  await fleet.ingestToFleet("Refund window: 30 days.", { tags: ["policy"] });
  const billing = await fleet.createWorker({ color: "billing", memory: "both" });
  await billing.invoke("The customer prefers email updates.");
  console.log(await billing.invoke("What refund window and contact method apply?"));
} finally {
  await fleet.close();
}

Memory modes

local: only the worker session.
fleet: only the synthetic shared fleet session.
both: local worker memory plus shared fleet memory.
The default is local unless the fleet or worker overrides it.

Common mistakes

Putting worker-specific private context into shared fleet memory.
Using the reserved conductor color for a worker.
Assuming shared recall copies memory into a worker graph.
Skipping authorization before cross-worker transfer.
Closing an underlying core independently when the fleet owns it.