Minimal backend scaffold for the planned smart-glasses realtime agent platform.
- expose a simple FastAPI service teammates can run immediately
- provide a Vision Agents starter example with config-based provider selection
- establish folders for future processors, tools, and RAG wiring
app.main:appapp.main:create_appapp.examples.basic_video_agent
GET /healthGET /bootstrapPOST /sessionsGET /sessions/{session_id}GET /sessions/{session_id}/frameWS /sessions/{session_id}/stream
Important:
- the session WebSocket is live and tested for app-to-backend ingest
- realtime mode forwards live media into the Vision Agents realtime provider bridge
- the viewer can poll session state and fetch the latest annotated preview frame
- the Fast Whisper pipeline path still exists, but the quickest demo path is Gemini realtime plus the pose overlay processor
From the backend/ directory:
make setup
make devHealth check:
curl http://127.0.0.1:8000/healthVision Agents starter:
make exampleTests:
make testLive ingest smoke test:
make smoke-streamThe backend is instrumented with Pydantic Logfire for tracing FastAPI requests and pydantic-ai agent calls.
- Create an org at logfire.pydantic.dev
- Authenticate the CLI:
pip install logfire
logfire auth- Create a project inside your org (one-time):
logfire projects new droopdetection- On first
make dev, logfire will pick up the linked project and start sending traces automatically.
If no project is linked, logfire falls back to a local no-op mode — the backend still runs, you just won't see traces.
- Use Python
3.11to3.13.vision-agentscurrently pulls native dependencies that are not smooth on Python3.14. - The FastAPI service is intentionally lightweight and does not require a live Stream or model session to boot.
- The Vision Agents example is the starting point for the realtime backend, not the finished architecture.
- The face droop processor is currently a scaffold seam for your real model.
- The pose overlay processor uses the Vision Agents ultralytics plugin and stores the latest annotated JPEG in memory for the viewer.
make cleanremoves the backend virtualenv and Python caches.