Skip to main content

Module memory_context

Module memory_context 

Source
Expand description

Memory, context, and retrieval for EPIC5.

Provides indexed retrieval over snapshots and memories, decision rationale capture, token-budgeted context assembly, and retention/compaction policies.

Structs§

AssembledContext
Assembled context window.
CompactionPolicy
Policy for memory retention and compaction.
CompactionResult
Result of a compaction operation.
ContextAssembler
Assembles context segments within a token budget.
ContextSegment
A context segment with estimated token cost.
DecisionRationale
A captured decision rationale tied to a run event.
MemoryContextArtifact
Auditable artifact for memory context state.
MemoryEntry
Indexed entry (lightweight projection of MemoryRecord).
MemoryHit
A relevance-scored memory hit from an index query.
MemoryIndex
In-process memory index backed by a flat list of MemoryRecord-like entries.
MemoryQuery
Query parameters for memory index lookup.
RationaleLedger
Ledger for decision rationales within a run.

Enums§

CompactionStrategy
Strategy for compacting old memories.
DecisionImportance
Severity/importance of a decision.
MatchStrategy
Match strategy for memory queries.

Functions§

estimate_tokens
Estimate token count from text (~4 chars per token heuristic).
read_memory_context_artifact
Read and verify a memory context artifact.
write_memory_context_artifact
Persist a memory context artifact with digest verification.