How prathamkhatwani/code_cubicle works
CORTEX is an offline-first vector-memory platform for edge devices. Observations enter through the REST API or the robot-arena demo, are embedded and stored locally, then surfaced through semantic search and the inspector. A consolidation sleep cycle clusters and merges memories, applies decay and PII safeguards, while a separate sync agent prioritizes anomalous records and reconciles edge/cloud updates. The README documents these major capabilities; source excerpts are partial, so links to the cloud store and some internal consolidation details are omitted where callers are not shown.
Main entry points: main.py REST API · qdrant_store.py Edge Vector Store · consolidation.py Sleep Consolidation · sync_agent.py Sync Agent
Components 14
Intake & API
- REST API
backend/main.py - Demo Seed Data
backend/seed_data.py
Memory Services
- Local Embeddings
backend/embedding.py - Edge Vector Store
backend/qdrant_store.py - Memory Models
backend/models.py - Platform Config
backend/config.py - Memory Benchmark
backend/benchmark.py
Memory Lifecycle
- Sleep Consolidation
backend/consolidation.py - Sync Agent
backend/sync_agent.py - Activity Log
backend/activity_log.py
Inspector Experience
- Robot Arena
frontend/simulation.js - Inspector Dashboard
frontend/app.js
Other components
- Operator / Device
- Cloud Qdrant
Connections 21
- Operator / Device → Robot Arena: operates
README.md - Robot Arena → REST API: posts memories
frontend/simulation.js - Operator / Device → Inspector Dashboard: uses
README.md - Inspector Dashboard → REST API: calls API
frontend/app.js - REST API → Inspector Dashboard: serves UI
backend/main.py - REST API → Edge Vector Store: reads and writes
backend/main.py - REST API → Sleep Consolidation: runs / restores
backend/main.py - REST API → Sync Agent: dispatches sync
backend/main.py - REST API → Activity Log: reads activity
backend/main.py - REST API → Demo Seed Data: loads samples
backend/main.py - Edge Vector Store → Local Embeddings: embeds text
backend/qdrant_store.py - Local Embeddings → Platform Config: reads settings
backend/embedding.py - Edge Vector Store → Platform Config: reads settings
backend/qdrant_store.py - Sleep Consolidation → Activity Log: logs events
backend/consolidation.py - Sleep Consolidation → Edge Vector Store: updates memories
- Sync Agent → Cloud Qdrant: syncs records
- Sync Agent → Edge Vector Store: reads and updates
- Demo Seed Data → Edge Vector Store: adds samples
backend/seed_data.py - REST API → Memory Benchmark: runs benchmark
backend/main.py - Sleep Consolidation → Memory Models: uses data models
backend/consolidation.py - Activity Log → Memory Models: creates entries
backend/activity_log.py