pub struct ProceduralMemory {
pub id: Uuid,
pub name: String,
pub description: String,
pub context: TaskContext,
pub steps: Vec<PlaybookStep>,
pub effectiveness: PatternEffectiveness,
pub source_episodes: Vec<Uuid>,
pub source_patterns: Vec<PatternId>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Procedural memory represents learned heuristics-as-skills.
It bridges the gap between raw patterns and actionable workflows (playbooks). Inspired by ParamAgent (2026) three-tier memory architecture.
Fields§
§id: UuidUnique identifier for this procedural memory
name: StringName of the skill or heuristic
description: StringDetailed description of what this skill achieves
context: TaskContextContext where this skill is most applicable
steps: Vec<PlaybookStep>Ordered steps to execute this skill
effectiveness: PatternEffectivenessReal-world effectiveness tracking
source_episodes: Vec<Uuid>Episodes that contributed to the learning of this skill
source_patterns: Vec<PatternId>Patterns that contributed to the learning of this skill
created_at: DateTime<Utc>When this procedural memory was created
updated_at: DateTime<Utc>When this procedural memory was last updated or used
Implementations§
Source§impl ProceduralMemory
impl ProceduralMemory
Sourcepub fn new(
name: String,
description: String,
context: TaskContext,
steps: Vec<PlaybookStep>,
) -> Self
pub fn new( name: String, description: String, context: TaskContext, steps: Vec<PlaybookStep>, ) -> Self
Create a new procedural memory
Sourcepub fn is_relevant_to(&self, query_context: &TaskContext) -> bool
pub fn is_relevant_to(&self, query_context: &TaskContext) -> bool
Check if this procedural memory is relevant to a given context
Sourcepub fn record_retrieval(&mut self)
pub fn record_retrieval(&mut self)
Record that this procedural memory was retrieved in a query
Sourcepub fn record_application(&mut self, success: bool, reward_delta: f32)
pub fn record_application(&mut self, success: bool, reward_delta: f32)
Record that this procedural memory was applied with an outcome
Sourcepub fn add_source_episode(&mut self, episode_id: Uuid)
pub fn add_source_episode(&mut self, episode_id: Uuid)
Add a source episode ID
Sourcepub fn add_source_pattern(&mut self, pattern_id: PatternId)
pub fn add_source_pattern(&mut self, pattern_id: PatternId)
Add a source pattern ID
Trait Implementations§
Source§impl Clone for ProceduralMemory
impl Clone for ProceduralMemory
Source§fn clone(&self) -> ProceduralMemory
fn clone(&self) -> ProceduralMemory
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProceduralMemory
impl Debug for ProceduralMemory
Source§impl<'de> Deserialize<'de> for ProceduralMemory
impl<'de> Deserialize<'de> for ProceduralMemory
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ProceduralMemory
impl PartialEq for ProceduralMemory
Source§impl Serialize for ProceduralMemory
impl Serialize for ProceduralMemory
impl StructuralPartialEq for ProceduralMemory
Auto Trait Implementations§
impl Freeze for ProceduralMemory
impl RefUnwindSafe for ProceduralMemory
impl Send for ProceduralMemory
impl Sync for ProceduralMemory
impl Unpin for ProceduralMemory
impl UnsafeUnpin for ProceduralMemory
impl UnwindSafe for ProceduralMemory
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> DeserializeOwnedAlias for Twhere
T: DeserializeOwned,
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 moreimpl<T> Scalar for T
impl<T> Scalar for T
impl<T> SendAlias for T
impl<T> SendAlias for T
impl<T> SendSyncUnwindSafe for Twhere
T: Send + Sync + UnwindSafe + ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
impl<T> SerializeAlias for Twhere
T: Serialize,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.