-
-
Notifications
You must be signed in to change notification settings - Fork 0
Memory Prospective
github-actions[bot] edited this page May 31, 2026
·
1 revision
Package:
com.spectrayan.spector.memory.prospectiveBiological Analog: Prospective memory is the ability to remember to perform an intended action in the future — "Remember to call the doctor at 3pm." Unlike retrospective memory (recalling the past), prospective memory is future-oriented and time-triggered.
An AI agent needs to remember not just what happened, but what to do next. Prospective memory enables:
- "Remind me to check the build in 10 minutes"
- "Flag this issue for follow-up tomorrow"
- "Alert when deployment completes"
public final class ProspectiveScheduler {
/**
* Schedules a prospective reminder.
*
* @param text reminder text
* @param triggerAt when to surface the reminder
* @param tags synaptic tags for contextual association
* @return the scheduled Reminder
*/
public Reminder schedule(String text, Instant triggerAt, String... tags) {
long synapticTags = SynapticTagEncoder.encode(tags);
String id = "prospective-" + UUID.randomUUID();
Reminder reminder = new Reminder(id, text, triggerAt, synapticTags, tags);
reminders.add(reminder);
return reminder;
}
/**
* Collects all reminders whose trigger time has passed.
* Called at Step 2 of the RecallPipeline.
*/
public List<Reminder> collectDue() {
Instant now = Instant.now();
List<Reminder> due = new ArrayList<>();
reminders.removeIf(r -> {
if (r.triggerAt().isBefore(now)) {
due.add(r);
return true;
}
return false;
});
return due;
}
}public record Reminder(
String id,
String text,
Instant triggerAt,
long synapticTags,
String[] tags
) {}Due reminders are injected at Step 2 of the RecallPipeline with maximum score (10.0), ensuring they always appear at the top of results:
// In RecallPipeline.recall()
List<Reminder> dueReminders = prospectiveScheduler.collectDue();
for (Reminder r : dueReminders) {
allResults.add(new CognitiveResult(
r.id(), r.text(), 10.0f, 10.0f, 0f,
(short) 0, (byte) 0, MemoryType.WORKING, MemorySource.PROCEDURAL,
new String[]{"prospective"}, 1.0f, 1.0f));
}- :material-mirror: Metamemory — Self-Reflection — memory health analytics
- :material-lightning-bolt: 6-Phase Scoring Pipeline — the full recall flow
- Home
- About
- Getting Started
-
Architecture
- Architecture--Overview
- Architecture--Core-Concepts
- Architecture--Mcp-Integration
- Architecture--Ingestion-Pipeline
- Architecture--Rag-Pipeline
- Architecture--Distributed-Mode
- Architecture--Gpu-Acceleration
-
Modules
- Modules
- Modules--Spector-Core
- Modules--Spector-Commons
- Modules--Spector-Config
- Modules--Spector-Storage
- Modules--Spector-Embed-Api
- Modules--Spector-Embed-Ollama
- Modules--Spector-Index
- Modules--Spector-Query
- Modules--Spector-Gpu
- Modules--Spector-Rag
- Modules--Spector-Engine
- Modules--Spector-Ingestion
- Modules--Spector-Memory
- Modules--Spector-Runtime
- Modules--Spector-Node
- Modules--Spector-Mcp
- Modules--Spector-Cli
- Modules--Spector-Client
- Modules--Spector-Spring
- Modules--Spector-Metrics
- Modules--Spector-Bench
- Modules--Spector-Dist
- Modules--Spector-Cortex
-
Deep Dives
- Deep-Dives--Ann-Search-Primer
- Deep-Dives--Hnsw-Explained
- Deep-Dives--Spector-Index-Architecture
- Deep-Dives--Svasq-Deep-Dive
- Deep-Dives--Understanding-Quantization
- Deep-Dives--Quantization-Comparison
- Deep-Dives--Turbo-Quant
- Deep-Dives--Real-Embedding-Benchmarks
- Deep-Dives--Svasq-Spectorindex-Whitepaper
-
🧠 Cognitive Memory
- Memory
- Memory--Getting-Started
- Architecture
- Biological Systems
- Advanced Profiles
- Deep Dives
- Memory--Api-Reference
- 🧬 Cortex Dashboard
- Reference
- Operations
- FAQ
- Roadmap
- 🔬 Labs