pub enum ContextFormat {
Structured,
Plain,
}Expand description
Memory snippet rendering format injected into agent context (MM-F5, #3340).
Controls how each recalled memory entry is presented in the assembled prompt.
Flipping this value does not affect stored content — SQLite rows and Qdrant points
always contain the raw message text. The format is applied exclusively during
context assembly and is never persisted.
§Token cost
Structured headers add roughly 2–3× more tokens per entry than Plain.
Consider raising memory.recall_tokens proportionally when switching to Structured.
Variants§
Structured
Emit a labeled header per snippet:
[Memory | <source> | <date> | relevance: <score>] followed by the content.
This is the default. Gives the LLM structured provenance metadata for each recalled memory without re-parsing the recall body.
Plain
Legacy plain format: - [role] content per snippet, byte-identical to pre-#3340.
Use Plain when downstream consumers rely on the old format or when token budget
is tight and provenance headers are not needed.
Trait Implementations§
Source§impl Clone for ContextFormat
impl Clone for ContextFormat
Source§fn clone(&self) -> ContextFormat
fn clone(&self) -> ContextFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContextFormat
impl Debug for ContextFormat
Source§impl Default for ContextFormat
impl Default for ContextFormat
Source§fn default() -> ContextFormat
fn default() -> ContextFormat
Source§impl<'de> Deserialize<'de> for ContextFormat
impl<'de> Deserialize<'de> for ContextFormat
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ContextFormat
impl Hash for ContextFormat
Source§impl PartialEq for ContextFormat
impl PartialEq for ContextFormat
Source§impl Serialize for ContextFormat
impl Serialize for ContextFormat
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for ContextFormat
impl Eq for ContextFormat
impl StructuralPartialEq for ContextFormat
Auto Trait Implementations§
impl Freeze for ContextFormat
impl RefUnwindSafe for ContextFormat
impl Send for ContextFormat
impl Sync for ContextFormat
impl Unpin for ContextFormat
impl UnsafeUnpin for ContextFormat
impl UnwindSafe for ContextFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request