Skip to main content

Module facade

Module facade 

Source
Expand description

Thin trait abstraction over crate::semantic::SemanticMemory.

MemoryFacade is a narrow interface covering the four operations the agent loop depends on: remember, recall, summarize, and compact. It exists for two reasons:

  1. Unit testingInMemoryFacade implements the trait using in-process storage so tests that exercise memory-dependent agent logic do not need SQLite or Qdrant.

  2. Future migration path — the agent can eventually hold Arc<dyn MemoryFacade> instead of Arc<SemanticMemory>. Phase 2 will require making the trait object-safe (e.g. via #[trait_variant::make] or boxed-future signatures). This PR implements Phase 1 only.

§Design constraints

MemoryEntry.parts uses Vec<serde_json::Value> (opaque JSON) rather than Vec<zeph_llm::MessagePart> to keep zeph-memory free of zeph-llm dependencies.

Structs§

CompactionContext
Input context for a compaction run.
CompactionResult
Result of a compaction run.
InMemoryFacade
In-process test double for MemoryFacade.
MemoryEntry
An entry to persist in memory.
MemoryMatch
A matching entry returned by a recall query.

Enums§

MemorySource
Which memory backend produced a MemoryMatch.

Traits§

MemoryFacade
Narrow read/write interface over a memory backend.