API reference

github.com/arii/feels · report a bug

Bringup

Prerequisites: Python 3.12, a virtualenv, and .env with MONGODB_URI (Atlas IP allowlist must include your machine) and the VIAM_* robot credentials. bash setup.sh creates the venv, installs requirements.txt, and copies .env.example to .env.

Mock bringup (no hardware): FEELS_MOCK=1 python realtime_plot.py --port 8080, then open http://localhost:8080. The dashboard serves the full UI on bundled recordings; a purple MOCK badge marks the mode.

Live bringup: python realtime_plot.py --port 8080. Verify with curl localhost:8080/api/status — atlas_configured reports Atlas reachability and cycle reports the macro state. Teach one item in Mode 2, then run Mode 1 on a mystery cup.

Python modules

Generated with pdoc from the docstrings. Each page has inline source and a GitHub link.

realtime_plot HTTP + SSE server feature_extractor 10-D signatures atlas vector memory teach_csv batch teaching CLI extract identify teach
Module relationships. realtime_plot orchestrates: it calls feature_extractor for signatures, atlas for memory, and teach_csv handles batch ingestion.

HTTP API — realtime_plot.py

Dashboard browser realtime_plot aiohttp Atlas MongoDB POST /api/cycle/predict JSON + SSE stream $vectorSearch neighbors
Request flow. The dashboard posts to realtime_plot, which queries Atlas and streams telemetry back over SSE.
MethodPathHandlerWhat it does
GET/handle_index
GET/docshandle_docsServe the built-in docs pages (the presentation). /docs and /docs/{page}.
GET/docs/{page}handle_docsServe the built-in docs pages (the presentation). /docs and /docs/{page}.
GET/streamhandle_stream
POST/tarehandle_tare
POST/record/starthandle_record_start
POST/record/stophandle_record_stop
GET/record/downloadhandle_record_download
POST/api/cycle/predicthandle_cycle_predictMode 1: run the swirl macro on a mystery cup → features → Atlas $vectorSearch.
POST/api/cycle/teachhandle_cycle_teachMode 2: run the swirl macro on a labeled item → save signature to Atlas.
POST/api/cycle/aborthandle_cycle_abortStop the running macro subprocess (physical e-stop remains at the venue).
POST/api/cycle/correcthandle_cycle_correctTeach the true label for the most recent prediction's recording.
GET/api/statushandle_api_status
POST/api/vectorspacehandle_vspace2-D PCA of the Atlas signature library, optionally with the query

teach_csv.py — CLI

python teach_csv.py [paths] [flags]
FlagWhat it does
pathsCSV files
--sessionsession tag (default: thu
--labelforce one label for all files"
--dry-runshow what would be taught"
--forcere-teach files already in Atlas"
--include-mystery
--require-swirl
--listshow signature counts per label"