Memory System
Memory Observer
Provides monitoring, metrics, and visualization for the memory system.
Storage: SQL (
memory_access_logs), PrometheusPurpose
The Memory Observer ensures the system is not a "black box". It provides visibility into how memory is being accessed, modified, and evolved over time.
Key Features
- Real-time Streams: Pushes access events to Redis streams for live dashboards.
- Graph Visualization: Exports GraphML snapshots for UI rendering of memory structures.
Functional Deep Dive
Logging
Logs every memory access to SQL memory_access_logs and updates memory_ttl timestamps to delay pruning for active items.
Metrics
Updates Prometheus counters (access frequency, latency) and gauges (total item counts, storage savings from deduplication).
Streaming
Pushes real-time access events to Redis streams, allowing admin dashboards to show a live "pulse" of the memory system.
API Reference
Memory Observer provides endpoints for monitoring and metrics.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/memory/v1/observability/log | Log memory access |
| GET | /api/memory/v1/observability/stats | Get memory statistics |
| GET | /api/memory/v1/observability/access-logs | Query access logs |
| GET | /api/memory/v1/observability/metrics | Get Prometheus metrics |
| GET | /api/memory/v1/observability/health/module | Get module health |
| POST | /api/memory/v1/observability/visualize | Generate KG visualization |
SDK Reference
The Functor SDK provides a Python interface for observability operations.