Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nusomi.com/llms.txt

Use this file to discover all available pages before exploring further.

The memory graph is what turns a pile of recordings into something useful at the workflow level. Every sealed session is indexed into a graph keyed by workflow shape, so you can ask:
  • “What’s the most common path through this workflow?”
  • “Which frames precede a failure?”
  • “Show me every session that ended in validation_error: missing_po.”
  • “What’s the median time spent on the approvals screen?”

Shape

Nodes are workflow states (clusters of similar frames). Edges are transitions between them. Leaves are outcomessuccess, error, abandoned.
             ┌──────────┐
             │  start   │
             └────┬─────┘

           ┌──────────────┐
           │ vendor entry │ ────┐
           └──────┬───────┘     │
                  ▼             ▼
         ┌────────────────┐  ┌────────────────┐
         │ amount entry   │  │ duplicate flag │
         └──────┬─────────┘  └──────┬─────────┘
                ▼                   ▼
        ┌──────────────┐    ┌─────────────┐
        │ submit       │    │  abandoned  │
        └──────┬───────┘    └─────────────┘

       ┌───────────────┐
       │ approval wait │
       └────┬───────┬──┘
            ▼       ▼
      ┌───────┐  ┌────────────────┐
      │ ✓ ok  │  │ validation err │
      └───────┘  └────────────────┘
The graph is built per workspace, scoped per workflow, and updates as new sessions seal.

Querying

// All paths a workflow has taken in the last 30 days
const paths = await nusomi.memory.paths({
  workflow: "process_invoice",
  since: "30d",
});

// Sessions that took an unusual path
const outliers = await nusomi.memory.outliers({
  workflow: "process_invoice",
  threshold: 0.05, // path frequency under 5%
});

// Sessions similar to a given one
const similar = await nusomi.memory.similar(sessionId, { limit: 10 });

// Find the recovery point used by past successful runs after a failure
const recovery = await nusomi.memory.recoveryPoints({
  workflow: "process_invoice",
  failure_tag: "validation_error",
});

Use cases

Coverage. “Which paths through customer_onboarding have we seen at least once?” → tells you what an agent trained on this workflow knows how to handle. Drift detection. A path that appears suddenly might mean the underlying app changed. Subscribe to memory drift to alert when new node clusters appear. Failure clustering. Group failures by graph subpath, not by error message. Two errors with the same human cause cluster together even if their messages differ. Training-set selection. When exporting a dataset, filter by graph properties — “include only successful paths,” “include outliers above 1% frequency,” etc.

Drift subscription

nusomi.memory.onDrift("process_invoice", (drift) => {
  if (drift.kind === "new_node") {
    console.warn("New workflow state appeared:", drift.node_id);
  }
});

Privacy

The memory graph stores structure, not content. Node identity is derived from frame embeddings + AX tree shape; the underlying content (vendor names, amounts, customer data) is not in the graph itself — it stays in the per-session store with masking applied. See security/masking. You can opt a workflow out of the graph entirely:
await nusomi.workflows.update("process_invoice", {
  memory_graph: false,
});
In that case sessions are still captured, but no cross-run indexing happens.