Memory · Associative

A clue can bring the pattern back.

Associative memory recalls stored patterns from partial or imperfect clues. When a signal looks familiar but does not match exactly, your application can compare it with earlier patterns and retrieve the closest candidates.

Associative memory

You don’t need the whole picture.

THE PART YOU REMEMBER

That customer who wanted a summary before a call…

An incomplete clue a comparable pattern
CONTEXT RECOVERED

Northstar Studio

Send a written summary before scheduling a call.

Design team pilotWritten handoffCall after review
Customer planning · Sep 8
“Could you send the summary first? We’ll read it before we find a time to talk.”

Bring the missing context back.

Use a matching pattern’s key and metadata to return to a meaningful record. Choose a different clue to explore another example.

Choose a chapter to explore

Illustrated pattern recall. The application encodes these example text cues as comparable vectors.

Recognition

Recognize something you have seen before.

A new sensor reading or activity pattern may resemble an earlier one with a few details missing. Associative memory uses a Modern Hopfield network, a model that moves a partial input toward learned patterns.

01

Start with a clue

Represent the incoming signal as a numeric vector in the same format as the patterns you stored.

02

Refine the match

Retrieval updates the input toward stored patterns. You can configure the number of iterations.

03

Inspect the candidates

Returned identifiers connect recalled patterns to records your application can inspect.

Matching behavior

Decide how strongly one pattern should stand out.

The beta setting controls retrieval sharpness. Lower values spread attention across nearby patterns; higher values favor stronger matches. Tune it against representative examples from your application.

01

Set the sharpness

The Rust engine exposes beta for tuning retrieval sharpness in a custom integration.

02

Compare real examples

Try clean, incomplete, and noisy inputs to see how your stored patterns behave at different settings.

03

Keep the pattern identifiable

Give each stored vector an identifier that connects it to a meaningful record in your application.

Choose the right memory

Use pattern recall where an exact lookup falls short.

Encode examples as comparable vectors, then try the incomplete clues your application encounters. Compare the recalled candidates as you tune the patterns, encoding, and retrieval settings.

01

Consistent inputs

Stored patterns and incoming cues use the same vector dimensions and encoding.

02

Imperfect clues

Compare recall from complete patterns with recall from missing or altered inputs.

03

Useful evaluation

Check both the returned pattern and its score before using a recalled candidate in the next action.

Developer example

Store a pattern. Recall it from a cue.

Initialize the pattern memory in an authorized namespace, store a vector under a UUID, and retrieve a nearby match. The compact example uses three dimensions; use consistent dimensions for your own patterns.

Store a numeric pattern and recall a nearby matchtypescript
// Run server-side with credentials scoped to this Mind.
const endpoint = process.env.AKASHA_URL;
const capability = process.env.AKASHA_CAPABILITY;
if (!endpoint || !capability) throw new Error("Configure your Mind connection");

async function request(method: string, path: string, body?: unknown) {
  const headers: Record<string, string> = {
    "Content-Type": "application/json",
    "x-akasha-capability": capability!,
  };
  if (process.env.AKASHA_TOKEN) {
    headers.Authorization = "Bearer " + process.env.AKASHA_TOKEN;
  }
  const response = await fetch(new URL(path, endpoint), {
    method, headers,
    body: body === undefined ? undefined : JSON.stringify(body),
  });
  if (!response.ok) throw new Error("Mind request failed: " + response.status);
  return response.json();
}

// Use a fresh namespace configured for three-dimensional patterns.
await request("POST", "/v1/assoc/mhn/new", { dimensions: 3 });
const id = crypto.randomUUID();
await request("POST", "/v1/assoc/mhn/store", {
  id, vector: [0.2, 0.5, 0.8],
});
const recalled = await request("POST", "/v1/assoc/mhn/retrieve", {
  vector: [0.2, 0.4, 0.8], k: 1,
});
// recalled.id, recalled.embedding, and recalled.score identify the match.
Under the hood

A configurable pattern memory.

The HTTP interface provides namespace-scoped pattern storage and recall. Custom Rust integrations can configure additional network and retrieval settings.

Associative
Model
Modern Hopfield network
Inputs
fixed-dimension numeric vectors
HTTP initialization
dimensions
HTTP retrieval
vector · optional k for nearest-match lookup
Developer reference
Scope
Verified namespace capability
create
POST /v1/assoc/mhn/new
store
POST /v1/assoc/mhn/store
retrieve
POST /v1/assoc/mhn/retrieve
stats
POST /v1/assoc/mhn/stats
Crate
akasha-memory-mhn
Type
ModernHopfieldNetwork

Help your agent recognize the familiar.

Build a memory of useful patterns, then test what it can recall from the next clue.