Skip to content

Repository files navigation

Aether Networks

Automated AI delivery to the edge. Upload a heavy model, watch it shrink and ship itself to thousands of devices with self-healing rollouts.

Aether is a fully automated, laptop-runnable platform that takes a heavy AI model from developer upload and walks it through four stages with zero operator involvement:

  1. Gateway — receives the raw upload, scans it, parks it in a secure waiting room.
  2. Brain — automatically quantises the model to INT8 so it fits and runs on small edge chips (Raspberry Pi, Jetson Nano, Coral, generic CPU).
  3. Pipeline — distributes the shrunk model to a global fleet in 64 KB chunks, sandbox-tests each candidate on the device, rolls back automatically if anything looks wrong.
  4. Command Center — streams live chip temperature, memory %, and inference latency back to a dark-mode dashboard with a world map.

No Docker. No cloud. Single tenant. No auth. The whole stack boots with one command.


Why this matters for a solo developer

  • Zero human bottlenecks. The journey from "developer uploads a file" to "every device in the field is running it" requires zero manual approvals. The Brain optimiser, rollout orchestrator, and self-healing Agent handle everything.
  • Self-healing hardware. The Agent sandbox-tests every candidate update on the device. If the new model crashes or fails the health check, the Agent silently rolls back to the previous stable version. The user's physical device never breaks.
  • Absolute isolation. Aether only handles the transport and optimisation of model files. It never sees the customer's video feeds, sensor data, or business logic. This keeps you out of compliance nightmares and avoids heavy data-residency obligations.

ASCII architecture

                       Developer
                          |
                  POST /api/v1/models   (multipart upload)
                          |
                          v
+----------------------------------------------------------+
|                  Aether Backend (FastAPI)               |
|                                                          |
|  ingestion  -->  optimization  -->  delivery  -->  mon. |
|     |              |                  |            |    |
|     v              v                  v            v    |
|   blobs/        blobs/             rollouts     telemetry
|   original/     optimized/         (sqlite)     (sqlite) |
|     |              |                  |            |    |
|     +------+-------+------------------+------------+    |
|            |      aiosqlite (data/aether.db)            |
|            |      AsyncTopicBus (in-process)            |
|            +-------------------+------------------------+
|                                |                        |
|                  WebSocket /ws/events <----- Dashboard  |
|                                                          |
+----------------------------------------------------------+
                          ^
                          |
                  GET /api/v1/models/{id}/chunks/{offset}
                  WS  /ws/devices/{id}
                          |
                  Simulated Fleet (in-process)
                  Python fleet/device.py per virtual device
                  Publishes telemetry every N seconds

Quickstart

Option A — Download and run the installer

If you don't have the source tree yet, grab a self-extracting installer:

# from aether-networks/dist/ on disk:
bash aether-networks-v0.1.0-installer.sh

Or, if you're pulling it from the web:

curl -L -o aether.sh https://example.com/aether-networks-v0.1.0-installer.sh
bash aether.sh

The installer checks for Python 3.9+ and Node 16+, pip-installs both Python packages in editable mode, runs npm install for the dashboard, generates the sample ONNX model, and (by default) runs the smoke test to confirm the install worked. Pass --no-smoke to skip the final test.

Options:

bash aether.sh /opt/aether        # custom prefix
bash aether.sh --no-smoke         # install only
bash aether.sh --help             # all options

Option B — Build from source

Requires Python 3.9+ and Node 18+.

cd aether-networks
make install     # pip install -e backend && pip install -e fleet && npm install in frontend
make model       # generate a sample ONNX model under data/sample_model.onnx

In three terminals:

make backend     # FastAPI on :8000
make frontend    # Vite/React on :5173
make fleet       # 20 simulated devices

Then open http://localhost:5173. Drag any .onnx (or .pt) onto the Upload page. Watch it become OPTIMIZED, trigger a rollout, and watch the world map light up green as devices install.

Build your own installer

make dist
# produces:
#   dist/aether-networks-v0.1.0.tar.gz
#   dist/aether-networks-v0.1.0-installer.sh

One-shot smoke tests

make smoke       # runs tests/e2e_smoke.py on an isolated port
make rollback    # runs tests/e2e_rollback.py: verifies the rollback path

Both tests boot the backend in a subprocess, push the sample model, spawn a small fleet, run the full loop, and assert installs succeeded.


Per-step deep dive

1 — Gateway (Ingestion) — backend/aether/ingestion/

  • POST /api/v1/models accepts a multipart upload.
  • Streams the file to disk, computing SHA-256 incrementally. Enforces a 500 MB cap.
  • Validates ONNX (via onnx.load) and PyTorch (via safe torch.load). Idempotent on duplicate SHA-256.
  • Fires a background asyncio.create_task(...) that hands the row off to the Brain. The request returns 201 immediately.

2 — Brain (Optimization) — backend/aether/optimization/

  • A long-running worker polls for READY_FOR_OPTIMIZATION rows.
  • For PyTorch models, converter.py exports through torch.onnx.export to ONNX.
  • quantizer.py runs real INT8 dynamic quantization with onnxruntime.quantization.quantize_dynamic (per-channel, asymmetric weights).
  • Computes size before/after and an accuracy delta by running both the fp32 and quantized models against synthetic calibration inputs.

3 — Pipeline (Delivery) — backend/aether/delivery/

  • POST /api/v1/devices/register is the device's first call.
  • The Agent opens a WebSocket to /ws/devices/{id}. The server pushes events whenever a rollout selects that device.
  • The Agent calls GET /api/v1/models/{id}/chunks/manifest to get total_size, chunk_size=64KB, chunk_count, and sha256. It pulls each chunk via GET .../chunks/{offset}, verifying X-Chunk-CRC32 per chunk.
  • After all chunks are downloaded, the Agent verifies the cumulative SHA-256 matches the manifest.
  • The Agent runs a local sandbox test on the candidate model and reports the result back via POST /api/v1/devices/{id}/install_result.
  • rollout.py orchestrates: CANARY (5%, then 25%, then 100%), WAVE, or ALL_AT_ONCE. Failed devices never block healthy devices.

4 — Command Center (Monitoring) — backend/aether/monitoring/

  • POST /api/v1/telemetry ingests batches with one executemany round-trip.
  • A per-device ring buffer feeds /api/v1/fleet/summary and the time-series endpoint.
  • The dashboard subscribes to /ws/events, which fans out every event to every connected WebSocket.

API tour

See ARCHITECTURE.md for the exhaustive contract. Quick reference:

Method Path Purpose
GET /api/health Liveness
POST /api/v1/models Upload a model
GET /api/v1/models List models
GET /api/v1/models/{id} Get model status
POST /api/v1/models/{id}/optimization/retry Retry a failed optimization
POST /api/v1/devices/register Register a new device
GET /api/v1/devices List devices
POST /api/v1/devices/{id}/install_result Report sandbox result
GET /api/v1/models/{id}/chunks/manifest Get chunk manifest
GET /api/v1/models/{id}/chunks/{offset} Download one chunk (CRC32 verified)
POST /api/v1/rollouts Create a rollout
GET /api/v1/rollouts/{id} Rollout detail with per-device rows
POST /api/v1/telemetry Ingest telemetry batch
GET /api/v1/telemetry/latest Most recent telemetry
GET /api/v1/fleet/summary Live fleet counters
GET /api/v1/fleet/heatmap Per-device snapshot for the map
GET /api/v1/fleet/stats/timeseries Fleet-wide average per metric
WS /ws/events Real-time event stream
WS /ws/devices/{id} Per-device push channel

Tech stack

Layer Choice
Backend Python 3.9+, FastAPI, uvicorn, aiosqlite
Quantize onnxruntime.quantization (real INT8 dynamic)
Conversion torch.onnx.export
Real-time In-process asyncio pub/sub over WebSockets
Frontend React 18, Vite, TypeScript, React Router 6
State TanStack Query + Zustand
Maps react-leaflet + CartoDB Dark Matter tiles
Charts Recharts
Typography JetBrains Mono

Project layout

aether-networks/
├── ARCHITECTURE.md            -- full API contract + design notes
├── README.md                  -- this file
├── Makefile                   -- install / backend / frontend / fleet / smoke
├── backend/aether/            -- FastAPI app (4 modules, one per pipeline step)
├── fleet/fleet/               -- simulated edge agents
├── frontend/src/              -- React app (pages, components, store, ws)
├── scripts/make_sample_model.py
├── tests/e2e_smoke.py
├── tests/e2e_rollback.py
└── data/                      -- uploads, optimized blobs, sqlite, sample

Production hardening notes

Component Demo Production hardening
Quantization onnxruntime dynamic INT8 Static INT8 with real calibration set, hardware-aware per-tensor strategy
Storage Local filesystem + SQLite Object storage + Postgres + KMS at rest
Transport Plain WS, no auth mTLS, signed model blobs, per-tenant rate limits
Sandboxing In-process stub with simulated failure rate Real device-side sandbox: Docker/WASM/perf-budget check before swap
Rollouts Single-strategy orchestrator Multi-armed bandit canary + automatic promotion/abort on metric guardrails
Dashboard Single-tenant SPA Multi-tenant RBAC, SSO, audit log
Fleet simulator In-process asyncio Real fleet: build fleet/device.py Agent into a single binary and ship to Pi

The architecture is intentionally demo-friendly while every seam has a realistic production target.


License

MIT.

About

A fully automated 4-step platform that shrinks heavy AI models, ships them to edge devices with self-healing rollouts, and monitors the fleet live. Runs on a laptop; no cloud.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages