Skip to main content

Crate mentedb_context

Crate mentedb_context 

Source
Expand description

MenteDB Context: attention aware context assembly engine.

This crate provides:

  • Token-budget-aware context packing
  • Attention-pattern-aware ordering (U-curve optimization)
  • Delta-aware serving (only send what changed)
  • Token-efficient serialization formats

Re-exports§

pub use assembler::AssemblyConfig;
pub use assembler::AssemblyMetadata;
pub use assembler::ContextAssembler;
pub use assembler::ContextWindow;
pub use assembler::OutputFormat;
pub use budget::BudgetAllocation;
pub use budget::TokenBudget;
pub use budget::ZoneBudgetConfig;
pub use delta::DeltaResult;
pub use delta::DeltaTracker;
pub use layout::AttentionZone;
pub use layout::ContextBlock;
pub use layout::ContextLayout;
pub use layout::ScoredMemory;
pub use layout::ZoneThresholds;
pub use serializer::CompactFormat;
pub use serializer::ContextSerializer;
pub use serializer::DeltaFormat;
pub use serializer::StructuredFormat;

Modules§

assembler
Core context assembly logic. Context assembler: the main entry point for context assembly.
budget
Token budget tracking and allocation. Token budget management for context assembly.
delta
Delta aware serving (only send what changed). Delta-aware serving: track what changed between turns to save tokens.
layout
Attention zone layout and scored memory ranking. Attention-aware context layout using U-curve optimization.
serializer
Serialization formats for context output. Token-efficient serialization formats for context output.