Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

image-removebg-preview (5)

Bjorn Cortex

License Python Docker Release Buy Me a Coffee

A centralized training server for the Bjorn swarm. Each Bjorn device explores its environment and sends anonymized feedback to the Cortex. The Cortex aggregates field experience across the fleet, trains a model, and redistributes it to all connected devices.

The current version targets local experimentation and iterative testing. Production deployment on a VPS is a future milestone.


How it works

  1. Bjorn devices send anonymized .csv.gz training files to the Cortex upload endpoint.
  2. The Cortex trains a TensorFlow/Keras model on the aggregated data.
  3. The latest model is served back to connected devices on request.
  4. Live training status is streamed via WebSocket.

Features

  • FastAPI backend and dashboard UI.
  • Upload endpoint for .csv.gz training data.
  • Training pipeline with TensorFlow/Keras.
  • Live status via WebSocket.
  • JWT authentication with MFA (TOTP).

Requirements

  • Python 3.10+
  • TensorFlow-compatible environment (GPU optional)
pip install -r Cortex/requirements.txt

Running

cd Cortex
python server.py

Access the dashboard on http://localhost:8000.


Docker

docker compose up -d --build

Security

Local configs (security_config.json, server_config.json) can contain secrets and are git-ignored. Commit only the sanitized .example variants. Rotate any secret previously exposed before pushing.

Do not expose this service publicly without HTTPS and a reverse proxy.


API endpoints

Method Path Description
GET /setup Initial setup page
GET /setup/qr TOTP provisioning QR
POST /token Issue JWT (OAuth2 password flow)
GET / Dashboard
POST /upload Upload training data
POST /train/start Trigger training
GET /model/latest Latest model metadata
GET /model/download/{filename} Download model artifact
WS /ws/logs Real-time training events

Star History

Star History Chart

License

MIT.

About

Bjorn Cortex is the brain of a Swarm AI: each Bjorn explores its environment, learns from real missions, and sends anonymized feedback to the Cortex.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages