Skip to main content

Crate mnemo_amp

Crate mnemo_amp 

Source
Expand description

§mnemo-amp

AMP / memorywire interop adapter for mnemo.

AMP models an agent’s memory surface as 5 operations (remember / recall / forget / merge / expire) over 4 memory types (episodic / semantic / procedural / working), carried in a self-describing JSON envelope validated against a JSON-Schema 2020-12 document. This crate implements that wire format as a MemoryStore-conformant surface over a real MnemoEngine, so any AMP-speaking client can drive mnemo’s embedded DuckDB backend unchanged.

§What maps where

AMP opEngine call
rememberMnemoEngine::remember
recallMnemoEngine::recall (top-k, default 5)
forgetMnemoEngine::forget
mergethin composition: remember (consolidated record) + forget (Consolidate) — not the branch-timeline engine.merge
expirethin composition: set expires_at + run_ttl_sweep — there is no engine.expire

§Pieces

§Honest scope

This is a wire-format + surface adapter. AMP transport binding (HTTP / stdio framing, .well-known schema discovery) is left to the embedding application; the crate provides the schema document and the typed envelope so that binding is mechanical.

Re-exports§

pub use approval::Approval;
pub use approval::ApprovalHook;
pub use approval::AutoApprove;
pub use approval::ClosureApprove;
pub use approval::WriteDiff;
pub use error::AmpError;
pub use router::AmpRouter;
pub use router::max_fuse;
pub use router::rrf_fuse;
pub use store::DEFAULT_TOP_K;
pub use store::MemoryStore;
pub use store::MnemoAmpStore;
pub use wire::AmpEnvelope;
pub use wire::AmpHit;
pub use wire::AmpMemoryType;
pub use wire::AmpOp;
pub use wire::AmpResult;
pub use wire::schema;

Modules§

approval
Human-in-the-loop (HITL) diff-and-approve hook.
error
AMP adapter error type.
router
Fan-out router + cross-adapter fusion primitives.
store
MemoryStore-conformant surface over a MnemoEngine.
wire
AMP / memorywire wire format.