Expand description
Streaming Memory Ingestion for Implicit Learning
Enables continuous memory formation from streaming data without explicit remember() calls.
Designed for LLM agents, robotics, drones, and other autonomous systems that need
to learn implicitly from their environment.
§Architecture
WebSocket /api/stream
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ StreamingMemoryExtractor │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────────────┐ │
│ │ Buffer │→ │ Triggers │→ │ Extraction Pipeline │ │
│ │ (messages) │ │ (time/event) │ │ (NER + dedup + store) │ │
│ └──────────────┘ └──────────────┘ └────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
Response stream: { memories_created, entities_detected, dedupe_skipped }§Supported Stream Modes
- Conversation: Agent dialogue with user (high semantic content)
- Sensor: IoT/robotics sensor readings (continuous, needs aggregation)
- Event: Discrete system events (logs, errors, state changes)
§Extraction Triggers
- Time-based: Flush every N milliseconds (configurable checkpoint_interval_ms)
- Event-based: Flush on important events (errors, decisions, discoveries)
- Content-based: Flush when buffer semantic density exceeds threshold
- Manual: Explicit flush via
{ type: "flush" }message
Structs§
- Buffered
Message - Buffered message awaiting extraction
- Detected
Entity - Entity detected during extraction
- Extraction
Config - Configuration for automatic memory extraction from streams
- Relevance
Breakdown - Breakdown of composite relevance score components
- Session
Stats - Session statistics
- Stream
Handshake - WebSocket handshake message - sent by client to initialize stream
- Stream
Session - Per-session streaming state
- Streaming
Memory Extractor - Streaming Memory Extractor - core processing engine
- Surfaced
Stream Memory - Memory surfaced during streaming context injection
Enums§
- Extraction
Result - Result of memory extraction - sent back to client
- Stream
Message - Incoming stream message types
- Stream
Mode - Stream processing modes - determines extraction behavior
Functions§
- contains_
ignore_ ascii_ case - Case-insensitive substring search without allocation.
Returns true if
haystackcontainsneedle(ASCII case-insensitive).needleMUST be lowercase ASCII for correct results. - content_
hash - Quick hash for exact deduplication (public for benchmarking). Uses case-insensitive byte-level hashing with batched writes to minimize hasher call overhead.