Steadybase
API Reference

Memory API

Hierarchical durable memory — read, write, and monitor memory across scopes.

Memory API

The Memory API provides access to Steadybase's hierarchical durable memory system — reading entries, writing new memories, browsing the tree, and monitoring health.

Endpoints

Memory Tree

GET /api/memory/tree

Returns the full memory hierarchy organized by scope.

Response:

{
  "tree": {
    "org": {
      "icp-definition": {
        "value": "B2B SaaS, 100-5000 employees...",
        "pinned": true,
        "version": 3,
        "lastUpdated": "2026-03-01T12:00:00Z"
      },
      "pipeline-total": {
        "value": "$32.5M across 12 deals",
        "pinned": false,
        "version": 47,
        "lastUpdated": "2026-03-04T08:00:00Z"
      }
    },
    "team": { ... },
    "worker": { ... },
    "session": { ... }
  }
}

Read Memory

GET /api/memory/:scope/:key

Read a specific memory entry.

Parameters:

ParameterTypeDescription
scopestringMemory scope: org, team, worker, session
keystringMemory key identifier

Example:

GET /api/memory/org/icp-definition

Response:

{
  "scope": "org",
  "key": "icp-definition",
  "value": "B2B SaaS, 100-5000 employees, $5M+ ARR, using Temporal or considering workflow orchestration",
  "pinned": true,
  "version": 3,
  "lastUpdated": "2026-03-01T12:00:00Z"
}

Write Memory

POST /api/memory

Write or update a memory entry.

Request:

{
  "scope": "worker",
  "key": "acme-corp-champion",
  "value": "Sarah Kim, VP Engineering. Prefers Slack over email. Key concern: migration timeline.",
  "pinned": false
}

Response:

{
  "status": "ok",
  "version": 4,
  "previousVersion": 3
}

If the key already exists, the value is updated and the version is incremented.

Memory Health

GET /api/memory/health/:workerId

Returns memory health metrics for a specific worker.

Parameters:

ParameterTypeDescription
workerIdstringWorker ID (e.g., sarah-ae-west)

Response:

{
  "workerId": "sarah-ae-west",
  "totalEntries": 128,
  "pinnedCount": 12,
  "unpinnedCount": 116,
  "compressionRatio": 0.73,
  "oldestEntry": "2026-01-15T08:30:00Z",
  "newestEntry": "2026-03-04T10:15:00Z",
  "averageVersion": 3.2,
  "lastCompression": "2026-03-04T06:00:00Z"
}

Memory Scopes

ScopeAccessPersistenceUse Case
orgAll usersPermanentCompany-wide facts, ICP, strategy
teamTeam membersPermanentTerritory maps, campaigns, playbooks
workerPer workerPermanent (with compression)Account history, research, patterns
sessionPer sessionSession onlyTemporary conversation context

Auto-Compression

Unpinned entries older than 24 hours are automatically compressed during periodic compression runs. Pinned entries are never compressed.

To prevent a memory from being compressed, set pinned: true when writing.

On this page