Overview
The Allternit Memory Fabric is the unified memory and persistence layer for the Allternit platform. It provides a common Rust interface for storing, retrieving, and querying memory across backends, with an append-only, cryptographically chained ledger for auditability.Status: Implementation IMPLEMENTED (library) × Exposure —. Earlier versions of this page said the memory service “exposes HTTP endpoints” at
http://127.0.0.1:3008. services/memory/src registers no routes; 3008 is only the default port in the service config struct, and its main.rs does not start an HTTP listener. No binary in cmd/ (including allternit-api) depends on allternit-memory-fabric today; it is consumed by other workspace crates under services/memory/.Usage
The fabric is a library crate (allternit-memory-fabric). There is no public HTTP API for it. For user-facing memory endpoints see Memory and Memory stores.
Components
Core traits
MemoryProvider
Every memory backend implements:
MemoryFabric
The recommended entry point for Rust services:
Data types
MemoryEntry
MemoryQuery
Backend types
Routing rules
MemoryRouter::determine_backend evaluates rules in priority order:
TagMatch— route by memory tag.TenantSpecific/SessionSpecific— route by tenant or session.PersistenceRequired— route to a persistent backend.PerformanceRequirement— route by latency requirement.SizeThreshold— reserved for size-based routing.
default_backend is used. Fallbacks are tried when the selected backend fails ping and fallback_enabled is true.
Ledger format
TheHistoryLedger writes one JSON object per line (JSONL). Each line is a LedgerEntry:
content_hash matches its content, the first entry has a null prev_hash, and each subsequent entry’s prev_hash equals the previous entry’s content_hash.
Error codes
All fabric operations returnMemoryError: