Yantrika

Integrations

Nothing proprietary on the wire.

Robots get in over the open standard they already speak, or over plain HTTPS. People get out over the console, webhooks, WhatsApp and MCP. Every writer holds an ingest key that can only touch its own workspace — row-level security in Postgres, not a promise in a README.

VDA 5050 v2.1 over MQTT — the native path

Point yantrabridge at your broker. It subscribes to state, translates into the shared schema with alert dedup and battery hysteresis, publishes connection and, with --commands, turns approved console commands into instantActions and watches for the robot's actionStates acknowledgement.

# Python 3.10+ — install the connector straight from the repo
pip install "git+https://github.com/punith-naga/yantrafleet#subdirectory=core" \
            "git+https://github.com/punith-naga/yantrafleet#subdirectory=connector"

# values from your workspace's "Connect robots" tab
export SUPABASE_URL=https://<your-project>.supabase.co
export SUPABASE_KEY=<publishable anon key>
export YANTRA_INGEST_KEY=yk_…            # the secret; create it in the console
export YANTRA_SITE_ID=WS-xxxxxxxx         # your workspace's site id

python -m yantrabridge --mqtt-host broker.yourplant.local --mqtt-port 1883 \
       --mqtt-topic "uagv/v2/+/+/state" --site WS-xxxxxxxx --commands

Not sure your vehicles implement the standard correctly? Run the free 52-check conformance tester first. Recorded fleets replay the same way: yantrabridge import --mcap capture.mcap or --jsonl.

REST — anything that can speak HTTPS

The backend is PostgREST: one upsert per tick is enough. Row ids are namespaced with the site id because robots.id is a global primary key; the console strips the prefix for display.

curl -X POST "https://<your-project>.supabase.co/rest/v1/robots?on_conflict=id" \
  -H "apikey: <anon key>" -H "Authorization: Bearer <anon key>" \
  -H "x-yf-ingest-key: yk_…" \
  -H "Content-Type: application/json" \
  -H "Prefer: resolution=merge-duplicates,return=minimal" \
  -d '[{"id":"WS-xxxxxxxx-AMR-01","vendor":"Acme AMR","status":"active",
        "battery":82,"pos":[12.5,4.0],"speed":1.1,"health":97,
        "motor_temp":41,"tasks_done":12,"site_id":"WS-xxxxxxxx"}]'

Status vocabulary is enforced by a database CHECK: active · idle · charging · paused · estop · degraded · fault. Alerts (alerts), telemetry history (robot_telemetry), incidents and missions are plain tables too — the architecture reference lists every column.

Python — ten lines

import httpx, datetime

BASE = "https://<your-project>.supabase.co/rest/v1"
H = {"apikey": "<anon key>", "Authorization": "Bearer <anon key>",
     "x-yf-ingest-key": "yk_…",
     "Prefer": "resolution=merge-duplicates,return=minimal"}
SITE = "WS-xxxxxxxx"

def publish(robot_id, **state):
    row = {"id": f"{SITE}-{robot_id}", "site_id": SITE,
           "updated_at": datetime.datetime.utcnow().isoformat() + "Z", **state}
    httpx.post(f"{BASE}/robots", params={"on_conflict": "id"},
               json=[row], headers=H, timeout=10).raise_for_status()

publish("AMR-01", vendor="Acme AMR", status="active", battery=82,
        pos=[12.5, 4.0], speed=1.1, health=97, motor_temp=41, tasks_done=12)

Simulator — a fleet without hardware

Every cloud workspace can start a server-side simulated fleet with one click. The same deterministic simulator also runs from your laptop against your workspace, which is the easiest way to test a notifier rule or an MCP integration before robots are involved.

git clone https://github.com/punith-naga/yantrafleet.git && cd yantrafleet && ./install.sh
export SUPABASE_URL=https://<your-project>.supabase.co SUPABASE_KEY=<anon key>
export YANTRA_INGEST_KEY=yk_…
.venv/bin/python -m yantrasim --supabase --site WS-xxxxxxxx --fleet-size 10

MCP — your fleet as tools for AI agents

Sarathi's evidence-grounded toolbox — fleet_summary, query_robots, query_alerts, query_incidents, query_commands, robot_history — is exposed over the Model Context Protocol for Claude Desktop and any other MCP client. Every result carries a source_id citation key.

{
  "mcpServers": {
    "yantrika": {
      "command": "python", "args": ["-m", "sarathi.mcp_server"],
      "env": {"SUPABASE_URL": "https://<your-project>.supabase.co",
              "SUPABASE_KEY": "<anon key>",
              "YANTRA_SITE_ID": "WS-xxxxxxxx"}
    }
  }
}

The hosted copilot behind POST /ask reads as the person asking: the console forwards your session, and row-level security decides what the answer may contain.

Alerts out — Slack, Discord, webhooks, WhatsApp

The notifier polls unacknowledged critical and serious alerts and open incidents, dedups, groups by severity and fans out with retry, backoff and a circuit breaker per channel. Webhook posts are Slack Block Kit / Discord embed shaped and HMAC-SHA256 signed (X-Yantra-Signature) when a secret is set. WhatsApp goes through Twilio, and inbound WhatsApp replies can acknowledge, assign and approve — re-checking the sender's mapped role server-side.

On a self-hosted deployment an admin rotates all of these live from the console's Settings panel; per-workspace routing on Yantrika Cloud is on the post-beta list.

Commands in — the human-in-the-loop gate

Pause, resume, send-to-charge and e-stop from the console insert a pending row. A manager approves or rejects through the decide_command function, which enforces the role in the database. The bridge then publishes the VDA 5050 instantAction and marks the command executed or failed with the robot's own reason. The whole trail is in the Audit view.

Ingest keys

One secret per writer, pinned to one workspace.

A key looks like yk_ + 64 hex characters. Only its SHA-256 hash is stored; the plaintext is shown once when you create it. On every request Postgres resolves the header x-yf-ingest-key to exactly one site id — or to NULL — and every policy on every fleet table is site_id = yf_ingest_site(). A missing, revoked, expired or guessed key sees nothing and writes nothing; no key can touch another workspace, fleet_meta, settings or roles. Create up to ten per workspace and revoke any of them instantly from the console. Full contract: docs/WORKSPACES.md.

Get an ingest key in under a minute.