# https-deeplearning-ai/sc-on-device-ai-memory architecture

> Architecture diagram of the GitHub repository https-deeplearning-ai/sc-on-device-ai-memory, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/https-deeplearning-ai/sc-on-device-ai-memory
- Repository: https://github.com/https-deeplearning-ai/sc-on-device-ai-memory

## Overview

The Qdrant Edge Memory Robot is an on-device object-memory assistant. Its main workflow detects and tracks camera objects, embeds stable crops for recognition, and lets users teach names by voice; later sightings and spoken questions can retrieve stored memories. The browser interface also supports browsing and managing memories. The graph follows the documented architecture and shown source references; details of unsampled runtime paths and voice-action dispatch are represented conservatively.

Main entry points: [`robot/device/live.py`](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/live.py) (Live app), [`robot/brain/core.py`](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/core.py) (Robot workflow), [`robot/brain/memory.py`](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/memory.py) (Memory operations), [`robot/device/server.py`](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/server.py) (Web server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Device experience"]
  node_live["Live app<br/>[live.py]"]
  node_server["Web server<br/>[server.py]"]
  node_page["Browser interface<br/>[page.html]"]
  node_renderer["Video renderer<br/>[draw.py]"]
  node_runtime["Device runtime<br/>[runtime.py]"]
  node_app["App entry<br/>[app.py]"]
  node_config["Device settings<br/>[config.py]"]
end

subgraph group_perception["Perception and recognition"]
  node_robot["Robot workflow<br/>[core.py]"]
  node_detector["Object detection<br/>[detect.py]"]
end

subgraph group_memory["Memory and recall"]
  node_memory[("Memory operations<br/>[memory.py]")]
end

subgraph group_voice["Voice and models"]
  node_labels["Label parsing<br/>[labels.py]"]
  node_models["Embedding and ASR<br/>[models.py]"]
  node_mic["Audio capture<br/>[mic.py]"]
end

node_user(("User"))
node_camera["Camera"]
node_microphone["Microphone"]
node_qdrant[("Qdrant Edge")]

node_user -.->|"uses"| node_live
node_camera -.->|"supplies frames"| node_live
node_microphone -.->|"supplies audio"| node_mic
node_app -->|"creates workflow"| node_robot
node_app -->|"starts live mode"| node_live
node_live -->|"starts server"| node_server
node_server -->|"serves page"| node_page
node_page -->|"polls and sends controls"| node_server
node_live -->|"uses renderer"| node_renderer
node_live -->|"uses runtime"| node_runtime
node_live -->|"uses audio capture"| node_mic
node_live -.->|"dispatches robot actions"| node_robot
node_robot -->|"runs detection"| node_detector
node_robot -->|"embeds crops"| node_models
node_robot -->|"queries memory"| node_memory
node_robot -->|"parses taught names"| node_labels
node_memory -->|"stores vectors"| node_qdrant
node_mic -->|"reads device setting"| node_config
node_detector -->|"reads thresholds"| node_config
node_models -.->|"transcribes speech"| node_user
node_memory -.->|"returns recalled sightings"| node_user

click node_live "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/live.py"
click node_server "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/server.py"
click node_page "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/page.html"
click node_renderer "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/draw.py"
click node_runtime "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/runtime.py"
click node_app "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/app.py"
click node_robot "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/core.py"
click node_detector "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/detect.py"
click node_memory "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/memory.py"
click node_labels "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/labels.py"
click node_models "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/models.py"
click node_mic "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/mic.py"
click node_config "https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/config.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_live,node_server,node_page,node_renderer,node_runtime,node_app,node_config,node_user toneBlue
class node_robot,node_detector,node_qdrant toneAmber
class node_memory toneMint
class node_labels,node_models,node_mic toneRose
class node_camera,node_microphone toneIndigo
```

## Components

### Device experience

- [Live app](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/live.py): `robot/device/live.py`
- [Web server](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/server.py): `robot/device/server.py`
- [Browser interface](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/page.html): `robot/device/page.html`
- [Video renderer](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/draw.py): `robot/device/draw.py`
- [Device runtime](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/runtime.py): `robot/device/runtime.py`
- [App entry](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/app.py): `robot/app.py`
- [Device settings](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/config.py): `robot/config.py`

### Perception and recognition

- [Robot workflow](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/core.py): `robot/brain/core.py`
- [Object detection](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/detect.py): `robot/brain/detect.py`

### Memory and recall

- [Memory operations](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/memory.py): `robot/brain/memory.py`

### Voice and models

- [Label parsing](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/labels.py): `robot/brain/labels.py`
- [Embedding and ASR](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/brain/models.py): `robot/brain/models.py`
- [Audio capture](https://github.com/https-deeplearning-ai/sc-on-device-ai-memory/blob/main/robot/device/mic.py): `robot/device/mic.py`

### Other components

- **User**
- **Camera**
- **Microphone**
- **Qdrant Edge**

## Connections

- User → Live app: uses
- Camera → Live app: supplies frames
- Microphone → Audio capture: supplies audio
- App entry → Robot workflow: creates workflow (evidence: `robot/app.py`)
- App entry → Live app: starts live mode (evidence: `robot/app.py`)
- Live app → Web server: starts server (evidence: `robot/device/live.py`)
- Web server → Browser interface: serves page (evidence: `robot/device/server.py`)
- Browser interface → Web server: polls and sends controls (evidence: `robot/device/server.py`)
- Live app → Video renderer: uses renderer (evidence: `robot/device/live.py`)
- Live app → Device runtime: uses runtime (evidence: `robot/device/live.py`)
- Live app → Audio capture: uses audio capture (evidence: `robot/device/live.py`)
- Live app → Robot workflow: dispatches robot actions
- Robot workflow → Object detection: runs detection (evidence: `robot/brain/core.py`)
- Robot workflow → Embedding and ASR: embeds crops (evidence: `robot/brain/core.py`)
- Robot workflow → Memory operations: queries memory (evidence: `robot/brain/core.py`)
- Robot workflow → Label parsing: parses taught names (evidence: `robot/brain/core.py`)
- Memory operations → Qdrant Edge: stores vectors (evidence: `README.md`)
- Audio capture → Device settings: reads device setting (evidence: `robot/device/mic.py`)
- Object detection → Device settings: reads thresholds (evidence: `robot/brain/detect.py`)
- Embedding and ASR → User: transcribes speech
- Memory operations → User: returns recalled sightings
