Skip to Content
Aionis currently ships as a local-first Lite Runtime for developer machines and self-managed deployments.
IntegrationsExternal Memory

External Memory Backends

Aionis can govern external memory candidates without writing them into Runtime storage.

Use this for:

  • Mem0
  • Zep
  • vector databases
  • markdown knowledge bases
  • custom memory stores

Call POST /v1/memory/govern, SDK governMemory(), or governMem0SearchResults().

Candidate Schema

External candidates use the same schema across SDK, MCP, and HTTP:

{ "external_memory_id": "mem0:checkout-current-route", "source_backend": "mem0", "text": "The accepted checkout route is src/checkout/adapter.ts.", "metadata": { "title": "Accepted checkout route", "target_files": ["src/checkout/adapter.ts"] }, "authority": { "source_trust": "trusted", "scope": "project", "evidence_requirement": "none" }, "lifecycle_hint": "current", "evidence_refs": ["mem0://checkout-current-route"] }

Authority Fields

FieldValuesMeaning
source_trusttrusted, known, untrusted, unknownHow much trust the backend/source gets.
scopeuser, project, team, org, global, unknownClaimed memory scope.
evidence_requirementnone, inspect_before_use, rehydrate_before_use, blockedWhat must happen before action.

Unknown authority defaults toward inspect-first behavior.

Lifecycle Hints

HintTypical route
currentuse_now if authority and scope allow.
procedureuse_now or inspect-first depending on trust.
faileddo_not_use or inspect-first.
staleinspect-first or blocked.
contestedinspect-first until resolved.
suppressedblocked from direct use.
archivedrehydrate.
unknowninspect-first by default.

Hints are evidence, not final authority. Aionis still applies admission gates.

SDK

const governed = await aionis.governMemory({ query_text: "Continue the checkout migration from the accepted path.", mode: "firewall", context_mode: "compact_agent", include_records: true, candidates: [ { external_memory_id: "vec:failed-legacy-route", source_backend: "vector-db", text: "The legacy adapter route failed verifier review.", metadata: { target_files: ["src/checkout/legacyAdapter.ts"], }, authority: { source_trust: "known", scope: "project", evidence_requirement: "inspect_before_use", }, lifecycle_hint: "failed", evidence_refs: ["vector://agent-history/failed-legacy-route"], }, ], });

Mem0 Helper

If your backend returns Mem0-style results, use the helper:

const governed = await aionis.governMem0SearchResults({ query_text: "Continue from the accepted path.", mem0_results: await mem0.search("checkout migration"), mode: "firewall", context_mode: "compact_agent", include_records: true, });

The helper maps Mem0 IDs, memory text, score metadata, lifecycle hints, and authority metadata into Aionis external candidates.

Output

The output uses the same four admission surfaces:

use_now | inspect_before_use | do_not_use | rehydrate

External memory remains external. Aionis governs prompt admission and returns audit records; it does not mutate the source backend.