Yantrika

Yantrika
the operations platform for Physical AI

Robots are getting cheap; operating a mixed fleet of them is not. Yantrika is an open-source, out-of-the-box operations layer for AMR fleets: a VDA 5050 wire in, a Supabase/PostgREST backend in the middle, and on top a live web console, automatic incidents, predictive maintenance, real alert delivery, and an AI copilot that only answers from your fleet's actual data. Every robot-affecting action passes a human approval gate. It runs end-to-end on your laptop in about 60 seconds — no cloud account, no API keys, no robots required.

$ python -m yantraops up --loopback

The whole platform — simulated fleet, detector, notifier, copilot, console — against an embedded in-memory backend. One process tree, one Ctrl-C.

VDA 5050 v2.1 MQTT + MCAP import 400+ offline tests MIT license

Modules

Eight small parts, one row shape

Every module reads and writes the same Supabase tables and the same canonical status vocabulary. Each is independently installable and offline-tested.

yantracore · core/

The canonical status contract: one vocabulary (active · idle · charging · paused · estop · degraded · fault) plus the multi-site id helper, enforced end-to-end by a DB CHECK constraint. Small on purpose.

yantrasim · sim/

Deterministic 10-AMR warehouse simulator (3 vendors, waypoint grid, chargers, faults, rolling missions). Emits real VDA 5050 v2.1 state to Supabase, MQTT, or stdout — the stand-in until your robots show up.

yantrabridge · connector/

The VDA 5050 ⇄ backend connector: MQTT or JSONL state in, deduped rows/alerts out; imports existing MCAP/JSONL recordings; publishes approved operator commands back to robots as VDA instantActions.

yantradetect · detector/

Auto-incidents with PagerDuty-style dedup, pending windows, flap counting and idempotent INC-XXXX ids — plus a predictive-maintenance mode that turns telemetry trends into findings with rough RUL estimates.

yantranotify · notifier/

Alert and incident fan-out to Slack, Discord and JSON webhooks: retries with backoff, a no-loss pending queue, per-channel circuit breakers, severity-grouped digests, and a 10-second test subcommand.

sarathi · copilot/

Grounded AI copilot with three degradation tiers: LLM + live fleet tools → LLM only → offline template answers (no key needed). A grounding guard checks the numbers in every answer against tool payloads. Also an MCP server.

yantraops · ops/

The one-command orchestrator: up --loopback (zero-config demo), --supabase, --mqtt; migrate applies the schema with tracking and checksums; doctor preflights your environment; status pings a running stack.

console · console/

A single HTML file, no build step: live map, robot drill-down, the command approval gate, incident replay from recorded telemetry, printable shift report, command palette, and a first-run tour. Falls back to an in-browser sim offline.

academy · academy/

Operator training as a static single-file app, served next to the console at /academy/ by yantraops up and the AWS deploy. Open the Academy.

Architecture

State flows right, commands flow back

Robots (or the simulator) publish VDA 5050 state over MQTT; the bridge turns it into rows; everything else reads those rows over PostgREST. Nothing touches a robot without an operator-approved command row.

approval gate — operator-approved commands return to robots as VDA instantActions state state rows Robots real AMRs or yantrasim MQTT broker VDA 5050 v2.1 topics yantrabridge translate · dedup · sink Supabase PostgREST robots · alerts · incidents commands · missions telemetry · findings console map · approvals · replay sarathi grounded copilot + MCP yantradetect incidents · maintenance yantranotify Slack · Discord · webhook

In --loopback mode the Supabase box is an in-process fake PostgREST and the MQTT hop is optional (--mqtt adds an embedded broker). In production the boxes are your broker and your Supabase project — same code, same tables.

Quickstart

Pick your platform

PowerShell 5.1+ and Python 3.10+ (the installer finds a suitable Python or tells you where to get one). From the repo root:

# install: venv + all packages + preflight (idempotent, safe to re-run)
powershell -ExecutionPolicy Bypass -File install.ps1

# start the full loopback demo — prints the console URL and opens your browser
.venv\Scripts\python.exe -m yantraops up --loopback

Or install.ps1 -Run to do both in one go. Full walkthrough — manual venv path, MQTT demo, real Supabase, troubleshooting: docs/RUNBOOK-WINDOWS.md.

Python 3.10+. From the repo root:

# install + start in one command
./install.sh --run

# or by hand, in a venv of your choosing
pip install -e core -e sim -e connector -e detector -e notifier -e ops
pip install -r copilot/requirements.txt
python -m yantraops up --loopback

Open the console URL from the READY banner. python -m yantraops doctor preflights the environment; status health-checks a running stack.

Host networking is the supported path (the stack binds 127.0.0.1 on ephemeral ports, so -p publishing cannot reach it):

docker build -f docker/Dockerfile -t yantrafleet .
docker run --rm --init --network host yantrafleet   # Linux

# or
docker compose -f docker/docker-compose.yml up --build

Open the console URL from the READY line. Docker Desktop (macOS/Windows) needs its host-networking option; details and headless/CI usage in docker/README.md.

A single small EC2 instance runs the whole demo stack; a step-by-step guide (instance size, security group, install, keeping it running) lives in deploy/aws/README.md. The short version:

# on a fresh Ubuntu instance
sudo apt-get update && sudo apt-get install -y python3-venv git
git clone <this repo> && cd yantrafleet
./install.sh
.venv/bin/python -m yantraops up --loopback --no-open

The stack binds 127.0.0.1 by design — reach the console over an SSH tunnel rather than opening ports to the internet (see the deploy guide and SECURITY.md).

FAQ

Honest answers

Can I use it with my own robots?
If they speak VDA 5050 over MQTT — yes, today: point the stack at your broker with python -m yantraops up --supabase --mqtt --broker host:1883 --no-sim and yantrabridge ingests their state; approved operator commands go back as VDA instantActions. Robots that don't speak VDA 5050 need an adapter on your side, but you can already import their recordings (MCAP or JSONL, with a topic map) via python -m yantrabridge import to use the replay, incident and analytics side of the platform.
What if I don't have robots at all?
That's the default. python -m yantraops up --loopback runs a deterministic 10-robot warehouse simulation with real VDA 5050 messages, faults, missions, incidents and maintenance findings — the full platform, entirely on your machine, no accounts and no keys. Add --mqtt to run the same demo over a real MQTT wire.
What does it cost to run?
The software is free (MIT). The loopback demo costs nothing and touches no cloud. A real deployment needs a Supabase project (the free tier is enough to evaluate), optionally an LLM API key for the copilot's higher tiers (billed by your provider; not required), and whatever your broker/VM costs — the AWS guide fits on one small EC2 instance.
Is an LLM required?
No. Sarathi degrades through three tiers: with a key (GEMINI_API_KEY or OPENAI_API_KEY) it answers with an LLM grounded in live fleet tools, and a grounding guard verifies the numbers in every answer against the tool payloads; without a key it serves offline template answers computed directly from your data — still cited, just less conversational. Everything else on the platform is LLM-free.
What's the security story?
The demo stack binds 127.0.0.1 only. Components talk to Supabase with the anon key, so row-level security and your key handling matter in real deployments; there is no built-in login UI yet, so anything exposed beyond localhost belongs behind your own reverse proxy or tunnel. Robot-affecting actions always pass the human approval gate (the commands table, with a full audit trail). Details and hardening checklist: docs/SECURITY.md.
What's the license?
MIT — see LICENSE. Use it commercially, fork it, embed it; contributions are welcome under CONTRIBUTING.md.

Scope

Not yet

Things Yantrika does not do today, so you don't find out the hard way:

  • No auth UI. The console has no login; access control is whatever you put in front of it (localhost, SSH tunnel, reverse proxy) plus Supabase RLS on the data.
  • Single region, single writer. Multi-site columns exist (migration 0005), but fleet_meta still assumes one active writer; there is no multi-region story.
  • The embedded MQTT broker is demo-grade. No TLS, no auth — fine for --loopback --mqtt on your laptop; bring your own mosquitto (or managed broker) for anything real via --broker host:port.
  • LLM tiers need your key. Without one the copilot runs in its offline tier — grounded template answers only. Live LLM behavior is exercised in CI with fakes; your first keyed run is the first real one.