Memory · Working

Keep the current task in focus.

Working memory is your agent’s temporary workspace. It holds the goal, useful clues, and decisions needed right now. As the task changes, less useful context fades and makes room for what comes next.

Working memory

Keep the work in focus.

Current task/ Pilot handoff
Example workspace
ACTIVE CONTEXT0 of 7 slots

Room for what’s next.

The active workspace is clear.

Temporary work doesn’t need to stay forever.

Save lasting decisions in the appropriate memory type, then clear or expire working context when the task is done.

Choose a chapter to explore

Example workspace with the engine’s default seven slots. Selection and removal illustrate application controls.

A focused workspace

Enough context to move the work forward.

While investigating a revenue change, your agent might hold the question, the current hypothesis, and a few useful figures. A limited workspace keeps that active context manageable as new information arrives.

01

Set the capacity

Choose how many pieces of context the workspace can hold. The default engine configuration provides seven slots.

02

Make room

When the workspace is full, older items with low activation can leave to make space for incoming context.

03

Keep what lasts

Context that remains useful can be passed to episodic memory, where it becomes part of the agent’s longer history.

Temporary by design

Let yesterday’s detail stop competing with today’s task.

Each item has an activation score: how present it is in the workspace. That score falls over time. Revisiting an item raises it again, keeping useful context available while stale details fade.

01

Fade gradually

Configurable decay controls how quickly unused context loses activation.

02

Reinforce useful context

Rehearsal increases an item’s activation when the agent returns to it.

03

Release what has faded

Items below the configured threshold are removed from the active workspace.

Attention

Choose what deserves attention next.

Recency, relevance, activation, and importance help decide what enters the workspace. Your agent can focus on a particular item when it is ready to take the next step.

01

Screen incoming context

An attention gate admits candidates that meet its configured priority threshold.

02

Focus the next step

Select the item the cognitive cycle should attend to, then release that focus when the work moves on.

03

Use the active context

The attention stage reads the focused workspace as part of the agent’s observe, decide, and act cycle.

Developer example

Keep a record of the task in progress.

Working memory manages active context inside the engine. A cognitive session provides a complementary record of the task’s goal and agent. Create that session through the HTTP interface shown here.

Start a session for the task in progresstypescript
// 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();
}

const { session } = await request("POST", "/v1/memory/cognitive/session", {
  agent_id: "revenue-assistant",
  goal: "Investigate the Q3 revenue change by sales channel.",
});
// The session record complements the engine’s active working memory.
Engine configuration

Tune how context stays active.

Set the capacity, decay, and attention policy to suit the task. These engine defaults give developers a starting point for managing active context.

Workspace
Default capacity
7 slots
Presets
minimal 3 · high_capacity 12
CapacityMetric
Slots · Resource · Chunks · Hybrid
Decay functions
linear · exponential · power-law · ACT-R
Default decay
Exponential, rate 0.1 / s, tick 100ms
Rehearsal boost
+0.3 activation
Evict below
activation 0.1
Gating · binding · session API
Default gate
ThresholdBased, 0.3
Also implemented
TopK · SoftmaxCompetition · GoalDirected · Open
PriorityWeights
recency 0.30 · relevance 0.30 · activation 0.25 · importance 0.15
BindingSource
Direct · Unification · PatternMatch · Inference · UserInput · Perception
Isolation default
RepeatableRead
Session request
agent_id · goal
thought
POST /v1/memory/cognitive/thought
decision
POST /v1/memory/cognitive/decision
interaction
POST /v1/memory/cognitive/interaction
Start session
POST /v1/memory/cognitive/session

Give your agent room to focus.

Keep useful context close to the current task, and let the workspace change as the work does.