Memory overview
Governed local memory, MemoryWrite capability, and optional HMS projection.
Carina’s local long-term memory belongs to the control plane, not the prompt builder. Memory mutation is a capability-mediated side effect (MemoryWrite).
Source: docs/architecture.md (Governed memory), docs/rpc-api.md (Memory API).
Targets
Section titled “Targets”| Target | Purpose |
|---|---|
memory | Project / agent notes |
user | Profile facts (scoped by Nebutra identity when available) |
The daemon stores bounded entries under its state directory. Each agent run receives a frozen memory snapshot in the prompt — writes during that run persist for future work without changing the current run’s stable prefix.
Write path
Section titled “Write path”- Daemon builds a resource string from target, scope, action, operation count, and content hash
- Requests
MemoryWritefrom the Rust kernel - Built-in policy defaults to
requires_approval - On allow: apply add/replace/remove/batch atomically after local content scanning and size checks
- Audit records decision + hash metadata — not raw memory text
# conceptual RPCmemory.list / memory.context / memory.status / memory.writeIf approval is required, governance.action.approve applies the pending write; governance.action.deny discards it.
Identity scoping (target=user)
Section titled “Identity scoping (target=user)”Resolution order:
CARINA_NEBUTRA_IDENTITY_JSON- Claims in
CARINA_NEBUTRA_TOKEN CARINA_NEBUTRA_USER_ID- Local fallback profile
Token claims choose a local memory scope only — they do not grant Gateway, kernel, or filesystem authority.
External recall (HMS)
Section titled “External recall (HMS)”Optional HMS provider modes: off, hms-shadow, hms-hybrid.
- Shadow evidence does not enter prompts
- Hybrid evidence is frozen into the task checkpoint as a fenced, low-trust tool observation
- HMS never changes local write/delete authority
Projection
Section titled “Projection”HMS projection is a separate, disabled-by-default setting. After local commit, a durable outbox reconciles replace updates and delete tombstones. Projection independently requires NetworkAccess and MemoryExternalize — MemoryWrite approval is not sufficient.
memory.projection.authorize/retry/reseed- Projection failure never rolls back canonical local memory
See docs/integrations/hms-memory.md.
Layers at a glance
Section titled “Layers at a glance”| Layer | Lifetime | Notes |
|---|---|---|
| Turn context | Single turn | Model-visible working set |
| Session history | Session | Conversation + tool outcomes |
| Governed memory | Durable local | Capability-gated |
| Audit store | Durable | Hash-chained, not model-writable |
Source of truth
Section titled “Source of truth”- Capability:
MemoryWrite/ externalize gates ·docs/integrations/hms-memory.md - CLI:
carina memory …· CLI reference - RPC:
memory.*· JSON-RPC reference - Related: Policy · Audit
- Sessions API — session-scoped lifecycle
- Traces — what is and is not model-writable
Was this page helpful?
What went wrong?
Thanks for the feedback.
One vote per page is recorded during this session.