| Crates.io | exo-temporal |
| lib.rs | exo-temporal |
| version | 0.1.0 |
| created_at | 2025-12-02 04:04:49.386571+00 |
| updated_at | 2025-12-02 04:04:49.386571+00 |
| description | Temporal memory coordinator with causal structure for EXO-AI cognitive substrate |
| homepage | https://ruv.io |
| repository | https://github.com/ruvnet/ruvector |
| max_upload_size | |
| id | 1961116 |
| size | 147,963 |
Temporal memory coordinator with causal structure for the EXO-AI 2025 cognitive substrate.
This crate implements a biologically-inspired temporal memory system with:
┌─────────────────────────────────────────────────────────┐
│ TemporalMemory │
├─────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Short-Term │ │ Long-Term │ │ Causal │ │
│ │ Buffer │→ │ Store │ │ Graph │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ↓ ↑ ↑ │
│ ┌─────────────────────────────────────────────┐ │
│ │ Consolidation Engine │ │
│ │ (Salience computation & filtering) │ │
│ └─────────────────────────────────────────────┘ │
│ ↓ │
│ ┌─────────────────────────────────────────────┐ │
│ │ Anticipation & Prefetch │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
types: Core type definitions (Pattern, Query, SubstrateTime, etc.)causal: Causal graph for tracking antecedent relationshipsshort_term: Volatile short-term memory bufferlong_term: Consolidated long-term memory storeconsolidation: Memory consolidation with salience computationanticipation: Predictive pre-fetching and query anticipationRetrieves patterns within causal light-cone constraints:
let results = memory.causal_query(
&query,
reference_time,
CausalConeType::Past,
);
Transfers patterns from short-term to long-term based on salience:
let result = memory.consolidate();
Salience factors:
Pre-fetches likely future queries:
memory.anticipate(&[
AnticipationHint::SequentialPattern { recent: vec![id1, id2] },
AnticipationHint::CausalChain { context: id3 },
]);
Strategies:
use exo_temporal::{TemporalMemory, TemporalConfig, Pattern, Metadata};
// Create temporal memory
let memory = TemporalMemory::new(TemporalConfig::default());
// Store pattern with causal context
let pattern = Pattern::new(vec![1.0, 2.0, 3.0], Metadata::new());
let id = memory.store(pattern, &[]).unwrap();
// Retrieve pattern
let retrieved = memory.get(&id).unwrap();
// Causal query
let query = Query::from_embedding(vec![1.0, 2.0, 3.0])
.with_origin(id)
.with_k(10);
let results = memory.causal_query(
&query,
SubstrateTime::now(),
CausalConeType::Past,
);
// Trigger consolidation
let consolidation_result = memory.consolidate();
// Strategic forgetting
memory.forget();
// Get statistics
let stats = memory.stats();
println!("Short-term: {} patterns", stats.short_term.size);
println!("Long-term: {} patterns", stats.long_term.size);
println!("Causal edges: {}", stats.causal_graph.num_edges);
This implementation follows the pseudocode in PSEUDOCODE.md:
causal_query method implements causal cone filteringconsolidate function implements salience-based consolidationanticipate function implements predictive pre-fetchingDashMap for concurrent access to patterns and indicesparking_lot::RwLock for read-heavy workloadsexo-core: Core traits and types (to be implemented)dashmap: Concurrent hash mapsparking_lot: Efficient synchronization primitiveschrono: Temporal handlingpetgraph: Graph algorithms for causal distanceserde: Serialization supportMIT OR Apache-2.0