SuperAgent API

Managed memory and knowledge

Cloud Superbrain lets a hosted app remember useful context between calls. It can save facts and decisions, find them by words or meaning, answer from them with citations, and keep earlier versions when something changes.

It does not need a desktop session or an Obsidian vault. Each HivemindOS account receives an isolated memory store.

Use cloud-superbrain when your hosted product needs durable memory. Use the local Hive Superbrain when the user’s Obsidian vault should remain the editable source of truth.

Choose a recall mode

Mode Operation Result Charge
Lexical search memory.search Fast matches from titles, content, tags, projects, entities, aliases, and usage. 0 credits
Semantic recall memory.recall Hybrid meaning and keyword matches, with the evidence used for ranking. 1 credit
Memory Answer memory.answer A concise answer grounded in returned memories, plus cited memory ids. 5 credits

Semantic Recall and Memory Answer require a paid Cloud Superbrain plan. Lexical search, storage within the account’s plan, history, graph reads, capsules, and health checks do not consume agent credits. Read catalog.get before onboarding an account so your product can show its current plan, storage limits, and availability.

Semantic indexing runs when memory changes, so there is no idle compute charge to keep a model running. A newly written memory is immediately available to lexical search and becomes eligible for Semantic Recall after its index status is ready. Use memory.health when a workflow must confirm that state.

Operational memories such as action and handoff receipts stay out of default recall so routine execution history does not crowd durable facts, preferences, and decisions. Request a specific operational memoryType or set includeOperational: true when that history is the subject of the lookup.

Advanced: measured hosted and local recall results

Measured quality and latency

The August 27, 2026 authenticated API benchmark used three fresh isolated hosted accounts. Every account passed all eight lexical behavior cases, all six semantic Top-1 cases, and all three grounded-answer cases, including aliases, current and historical evolution, usage ranking, operational isolation, paraphrases, and unsupported-question abstention. The equivalent local typed-memory cases also passed in every fresh run.

Hosted recall is not as fast as the local vault path. Across the three hosted trials, the median trial p50 was about 0.53 seconds for lexical search, 4.89 seconds for semantic recall, and 5.93 seconds for grounded answers. The corresponding local lexical/API behavior trials had a median p50 of 7.85 milliseconds. A separate 48-distractor diagnostic kept every quality check passing and measured 0.43 seconds lexical p50, 1.67 seconds semantic p50, and 2.59 seconds answer p50, which also shows that hosted latency varies with request and service state.

These are measured product-path snapshots, not an availability or latency promise. The result supports quality parity on the published cases, not universal parity with every private vault. See Shared Brain Memory Benchmarks for corpus sizes, repetition counts, and limitations.

Create typed memory

Only title and contentText are needed for a basic Markdown memory. Add a stable memoryKey when later calls should update one canonical subject instead of creating unrelated records.

const saved = await hive.services.invokeOperation(
  "cloud-superbrain",
  "memory.create",
  {
    title: "Aurora compute funding decision",
    contentText: "Compute capacity starts only after the customer-funded job is accepted.",
    memoryKey: "decision:aurora-compute-funding",
    memoryType: "decision",
    project: "Aurora",
    confidence: 0.96,
    tags: ["compute", "commercial"],
    entities: ["Project Aurora", "Hive Compute"],
    evidenceCount: 3,
  },
  { idempotencyKey: "aurora-compute-decision-v1" },
);

if (!saved.ok) throw new Error(saved.error);
const memoryId = saved.result.memory.id;

Supported memory types are instruction, fact, decision, goal, commitment, preference, relationship, context, event, learning, observation, artifact, error, action, and knowledge. Optional fields include path, kind, mimeType, mediaUrl, links, metaTags, aliases, sourceType, actorRole, memoryOrigin, and cognitiveStage.

Cloud Superbrain rejects content that appears to contain a credential, private key, bearer token, seed phrase, or mnemonic. Store only the credential name and safe set/missing status; keep the value in a secret manager.

Use memory.batch for up to 25 already-bounded records. Each accepted record returns its own id and immutable generation receipt.

Search and answer

Lexical search is useful for autocomplete, retrieval before a model call, and predictable no-charge lookups:

const search = await hive.services.invokeOperation(
  "cloud-superbrain",
  "memory.search",
  undefined,
  {
    query: {
      q: "customer-funded compute",
      project: "Aurora",
      memoryType: "decision",
      limit: 8,
    },
    idempotencyKey: "aurora-memory-search-001",
  },
);

Use semantic recall when wording may differ from the saved memory:

const recalled = await hive.services.invokeOperation(
  "cloud-superbrain",
  "memory.recall",
  {
    query: "Who pays before an Aurora GPU starts?",
    mode: "hybrid",
    project: "Aurora",
    limit: 8,
  },
  { idempotencyKey: "aurora-memory-recall-001" },
);

Use Memory Answer when the caller wants a finished, grounded response:

const answered = await hive.services.invokeOperation(
  "cloud-superbrain",
  "memory.answer",
  {
    query: "What is the Aurora compute funding policy?",
    limit: 8,
  },
  { idempotencyKey: "aurora-memory-answer-001" },
);

console.log(answered.result.answer);
console.log(answered.result.citedMemoryIds);

If no relevant managed memory can support an answer, the request returns a not-found response and releases the credit reservation. You are not charged.

Every hit includes its memory fields, excerpt, total score, matched signals, and score details. Set trackUsage: false when a diagnostic lookup should not influence the soft usage signal. memory.usage can explicitly record retrieved or final-answer use for known memory ids.

Ask for only as much as you need

Recall returns whole memories by default, so a caller that only wants to know which memories are relevant still receives every body it will not read. Pass detail to choose how much of each hit comes back.

detail Each hit carries Good for
abstract Id, title, type, project, status, updated date, score, and a one-line excerpt. Surveying candidates, then re-requesting the few that matter.
overview The full metadata record, ranked excerpt, and score details — no body. Ranking and filtering when the body is not needed yet.
full Everything, including contentText. The default. Reading the memory.
const survey = await hive.services.invokeOperation(
  "cloud-superbrain",
  "memory.recall",
  { query: "Who pays before an Aurora GPU starts?", mode: "hybrid", detail: "abstract", limit: 8 },
  { idempotencyKey: "aurora-memory-survey-001" },
);

detail narrows the response only. It never changes which memories rank, their order, the grounding behind memory.answer, or what a recall costs — a narrowed recall is charged exactly like a full one. The response echoes the detail it applied.

Evolve instead of contradicting

When reviewed information replaces an active memory, use memory.evolve. The old record becomes superseded, the new record becomes the active canonical head, and both remain linked in the evolution chain.

const evolved = await hive.services.invokeOperation(
  "cloud-superbrain",
  "memory.evolve",
  {
    contentText: "Aurora capacity starts only after the customer's maximum charge is reserved.",
    evolutionReason: "Clarified when funding is secured.",
  },
  {
    pathParameters: { memoryId },
    idempotencyKey: "aurora-compute-decision-v2",
  },
);

memory.update changes the current record in place. Use it for metadata or wording fixes that do not replace the underlying truth. memory.delete permanently removes a non-starter memory and requires an exact SuperAgent approval. An operation-only deletion key therefore needs services.invoke.cloud-superbrain.memory.delete, approvals.create, and approvals.decide in allowedOperations; include apiKeys.revoke only when the worker must also revoke its own key. Prefer archived or evolution when history still matters.

Advanced: history, knowledge graphs, capsules, and the full operation map

Keep the store clean

Cloud Superbrain rejects a second active memory on the same memoryKey, but two memories can still say the same thing under different keys. memory.consolidate finds them: it groups near-duplicates within a memory type by how much distinctive vocabulary they share, spots memories whose text says they correct an earlier note but were written without supersedes, and lists aged-out memories that nothing has ever retrieved.

It reports rather than merges. Merging two memories discards whichever wording loses, so each group comes back with the exact memory.evolve call that would consolidate it, for you to review. The one change it will make is archiving the aged-out candidates, and only when you pass applyArchives: true — archiving is reversible and applies only to context, event, observation, and action memories older than 120 days with no retrieval history.

memory.health now also reports duplicatePressure, so a scheduled check can watch the number without running a full consolidation pass.

const report = await hive.services.invokeOperation(
  "cloud-superbrain",
  "memory.consolidate",
  { applyArchives: false },
  { idempotencyKey: "aurora-consolidate-001" },
);

for (const group of report.result.duplicateGroups) {
  console.log(group.canonicalTitle, group.memberIds, group.evolveHint);
}

Learn from what your agents actually did

memory.minePatterns reads the account’s operational memories and proposes three things worth a person’s attention: a failure signature that keeps recurring across different tasks, a workflow repeated often enough to be worth turning into a skill, and an operation running on a cadence stable enough to be worth scheduling. Test and fixture traffic is excluded, and repeated retries of one task are not counted as a pattern — only the same thing happening across genuinely different tasks.

It proposes and never creates. Send a candidate to memory.create if you want to keep it.

Look inside a capsule before importing it

capsules.open returns a capsule’s manifest, an integrity verdict, and a summary of what is inside. capsules.search finds a memory within a capsule. capsules.preview reports exactly what an import would change: which memories are new, which the account already holds, and which would be refused for colliding with an active memoryKey. None of them write anything.

A capsule whose contents do not match its declared hash is still shown rather than hidden, with a warning — if a capsule is damaged, seeing what survived is more useful than seeing only an error.

Search by path

Memories carry a path, and most callers use it as a grouping. memory.browse summarizes those groups without returning any memory bodies: detail: "abstract" is about 100 tokens per group, overview about 2,000. Passing mode: "hierarchical" to memory.recall scores those groups before individual memories, so a memory’s neighbours come back with it and the reply names the paths it searched. Every memory stays eligible either way — hierarchy changes the order of results and never hides one.

Generations and historical recall

Each write publishes an immutable generation receipt. Use:

  • generations.list to read retained generations and the visible replay boundary.
  • generations.compare to find added, removed, and changed memory ids between two retained generations.
  • memory.recall with generationId to replay a lexical question against a retained historical state.
  • temporalMode: "historical" to include superseded and archived records, or temporalMode: "as-of" with asOf for a time cutoff.

Cloud Superbrain retains up to 256 generations per account. A request outside the reported replay boundary fails instead of silently substituting newer memory.

Memories with type knowledge, a knowledge tag, or a path under Synthesis/ become knowledge nodes. The registered operations are:

Operation Purpose
knowledge.search Search knowledge-only records.
knowledge.get Read one knowledge node.
knowledge.backlinks Find memories connected through entities, aliases, and links.
knowledge.graph Read a bounded node-and-edge overview.

Use entities, aliases, and links consistently when another product needs dependable graph navigation.

Portable capsules

capsules.export returns a bounded, checksummed capsule for selected memory ids or the next page of the account. capsules.import verifies the schema and content hash before adding the records to the authenticated account. A capsule never grants access to its source account, and an import cannot overwrite another account’s memory.

Export no more than 100 memories per capsule part. Follow hasMore and nextCursor until the export is complete. Keep the capsule private when its memories are private; its checksum detects corruption but is not encryption.

Registered operations

Operation Method Purpose
catalog.get GET Read plans, limits, features, and current charges.
memory.snapshot GET Read the account’s current managed-memory snapshot.
memory.get GET Read one memory by id.
memory.create POST Create or upsert one memory.
memory.update PATCH Update one current memory.
memory.delete DELETE Permanently delete one memory after approval.
memory.batch POST Create up to 25 memories.
memory.evolve POST Create a new canonical head and supersede the old one.
memory.search GET Run lexical search.
memory.recall POST Run paid hybrid semantic recall.
memory.answer POST Return a paid grounded answer with citations.
memory.usage POST Record retrieved or final-answer use.
memory.health GET Read plan, index, generation, duplicate pressure, and usage health.
memory.consolidate POST Report duplicate pressure, missed corrections, and aged-out memories.
memory.minePatterns POST Propose recurring failures, reusable workflows, and routines from operational memories.
memory.browse POST Survey memory paths at the abstract or overview tier.
index.rebuild POST Rebuild indexes after an import or repair.
generations.list GET List retained immutable generations.
generations.compare POST Compare two retained generations.
capsules.export POST Export a checksummed capsule part.
capsules.import POST Verify and import a capsule part.
capsules.open POST Read a capsule’s manifest, integrity, and contents without importing.
capsules.search POST Search inside a capsule without importing it.
capsules.preview POST Report what importing a capsule would change.
knowledge.search GET Search knowledge nodes.
knowledge.get GET Read one knowledge node.
knowledge.backlinks GET Read backlinks for a knowledge node.
knowledge.graph GET Read a bounded knowledge graph.

Restrict a worker key to only the operations it needs. For example, an answer-only service can allow services.invoke.cloud-superbrain.memory.answer and set a separate request limit on that exact selector.

Next: create narrow API keys, set per-operation limits, or use the local Hive Superbrain.

Expanded image Scroll to pan · Esc to close
100%