Overview

What is MomoBot?

MomoBot is an enterprise-grade cloud-controlled automation platform that lets you remotely manage, monitor, and automate tasks across any number of devices β€” servers, desktops, laptops, IoT hardware, and edge devices β€” from a single secure control plane.

Organizations use MomoBot to eliminate manual device management, reduce response time to system events, and maintain a complete auditable record of every automated action across their entire fleet.

Two core principles:
  1. Cloud-first control β€” orchestration, policy enforcement, logging, dashboards, and scheduling all live in the cloud.
  2. Thin secure agents β€” lightweight daemons on your devices that execute only explicitly approved actions and report results back.

What MomoBot Does

πŸ–₯️

Fleet Automation

Automate device diagnostics, health checks, file operations, and system maintenance across your entire fleet simultaneously.

πŸ”’

Policy-Gated Execution

Every task passes through the policy engine before it reaches any device. Dangerous commands are blocked automatically β€” no configuration required.

πŸ“‹

Immutable Audit Trail

Every action β€” who ran it, when, on which device, with what result β€” is recorded permanently. Full compliance-ready audit logs available via the dashboard or API.

πŸ”—

Collaboration Triggers

Trigger automation directly from Slack slash commands or Microsoft Teams messages. No context-switching β€” run tasks from where your team already works.

⚑

Multi-Step Workflows

Chain tasks into visual workflows with conditional branching, approval gates, and scheduled execution. Build complex automation without writing code.

🌐

Works Everywhere

Agents run on Linux, Windows, macOS, Raspberry Pi, NVIDIA Jetson, and any ARM Linux device. No inbound firewall ports required.

Features

Key Features

Cloud Control Plane

  • Centralized REST API for all agent, task, workflow, and schedule management
  • Real-time WebSocket gateway for live agent status and task results
  • Visual workflow builder with n8n-compatible DAG format
  • Role-based access control (RBAC) β€” user and admin roles
  • Policy engine that validates every task before dispatch
  • Immutable audit log of every sensitive action
  • Cron-based scheduler for automated recurring tasks
  • Webhook ingress from Slack and Microsoft Teams
  • AI-assisted workflow and task generation

Agent Capabilities

  • Runs as a system service on any supported OS
  • Connects outbound only β€” no inbound ports needed on agent hosts
  • Automatic heartbeat and reconnect with exponential backoff
  • Receives, validates, and executes tasks from the control plane
  • Returns structured results: stdout, stderr, exit code, metadata
  • Queued task delivery β€” tasks dispatched on reconnect after downtime

Security

  • bcrypt password hashing (cost factor 12) + JWT access tokens
  • Optional TOTP two-factor authentication
  • 256-bit random agent API keys and secret keys
  • HMAC-SHA256 signature verification on all webhook payloads
  • 5-minute replay protection on all webhook integrations
  • Automatic redaction of secrets in all log output
  • Shell command deny-list (blocks destructive, exfiltration, and fork-bomb patterns)
  • File path restrictions (blocks credential files, kernel interfaces, and traversal)
  • Rate limiting on all API and auth endpoints
Getting Started

Quick Start

Get MomoBot running in under 5 minutes with this step-by-step guide.

1

Start the Server

Install dependencies and start the MomoBot control plane:

cd momobot-platform
npm run install:all
cp server/.env.example server/.env
# Edit server/.env and set JWT_SECRET and JWT_REFRESH_SECRET
npm run dev

The server runs on http://localhost:4000. The dashboard is available at http://localhost:3000.

2

Create Your Account

Open the dashboard at http://localhost:3000 and register. The first registered user automatically becomes an admin.

3

Register an Agent

In the dashboard, navigate to Settings β†’ Agents β†’ New Agent. Give your agent a name. Copy the API key and Secret key β€” these are shown only once.

4

Start the Agent

On the device you want to manage, configure and start the agent:

cd momobot-platform/momobot-agent
cp .env.example .env
# Edit .env:
#   SERVER_URL=http://localhost:4000
#   AGENT_API_KEY=bot_xxx
#   AGENT_SECRET_KEY=xxx
npm start
5

Run Your First Task

Wait ~30 seconds for the agent to appear as Online in the dashboard. Then:

  1. Go to Tasks β†’ New Task
  2. Select your agent
  3. Choose task type system_info
  4. Click Run
  5. View the result in real time in the task detail view
Platform

Architecture

MomoBot uses a cloud-first, thin-agent architecture. All intelligence, policy, scheduling, and orchestration lives in the cloud control plane. Agents on managed devices are lightweight and do nothing independently β€” they only act when the control plane tells them to.

CLOUD CONTROL PLANE
REST API
Workflow Engine
Policy Engine
Audit Log
Auth / RBAC
Agent Registry
Task Queue
Webhook Ingress
SQLite (dev) / PostgreSQL (prod)
WebSocket (TLS)
πŸ–₯️
Linux / Windows Agent
🍎
macOS / ARM / IoT Agent

Data Flow

User or integration triggers a task via Dashboard, Slack, or Teams
↓
REST API receives the request and authenticates the caller
↓
Policy Engine validates the task type, command, file paths, and timeout
↓
Audit Logger records the action with user ID, IP, and timestamp
↓
Task is written to the Task Queue and dispatched to the target agent via WebSocket
↓
Agent executes the task and returns structured results
↓
Results displayed in real time on the Dashboard
Platform

Cloud Control Plane

The MomoBot server is the central hub of the platform. Every agent connects to it, every task flows through it, and every action is recorded by it.

ComponentWhat It Does
REST APIManages users, agents, tasks, workflows, and schedules. All operations authenticated with JWT.
WebSocket GatewayMaintains real-time connections to all online agents and pushes live updates to the dashboard.
Auth & RBACHandles user login, registration, token issuance, and role-based access control.
Task DispatcherRoutes tasks to the correct agent in real time. Queues tasks for agents that are offline.
Policy EngineValidates every task against the task type allowlist, shell deny patterns, file path restrictions, and timeout limits before dispatch.
Audit LoggerRecords every sensitive action (login, agent creation, task dispatch, webhook events) to an immutable audit log.
Workflow EngineExecutes multi-step DAG workflows with approval gates, conditional branching, and execution traces.
SchedulerRuns tasks or workflows on cron-based schedules.
Webhook IngressAccepts HMAC-verified requests from Slack and Microsoft Teams to trigger tasks from chat.
Platform

Dashboard

The MomoBot dashboard is a React web application that provides complete visibility and control over your automation fleet.

Dashboard Capabilities

Agent Management

  • View all registered agents and their live online/offline status
  • Create new agents and copy their credentials
  • Enable, disable, or permanently delete agents
  • Rotate agent API keys at any time
  • View per-agent task history and logs

Task Management

  • Create tasks of any supported type for any online agent
  • Track task status (pending, running, completed, failed)
  • View full task output including stdout, stderr, and exit codes
  • Filter and search task history across all agents

Visual Workflow Builder

  • Design multi-step automation workflows with a drag-and-drop node editor
  • Connect tasks with conditional branching and approval gates
  • Preview workflow diagrams before execution
  • Export workflows in n8n-compatible JSON format

Audit & Analytics

  • Browse the complete audit log filtered by user, action, or date
  • View agent health trends and task success rates
  • Manage user accounts and their roles (admin only)
Platform

Agent Model

A MomoBot agent is a lightweight daemon installed on each managed device. Agents connect outbound to the control plane β€” no inbound firewall ports are ever needed.

How Agents Work

  • Secure connection: Agents connect to the server over WebSocket with TLS (wss:// in production).
  • API key authentication: Each agent authenticates using its unique 256-bit API key and secret key pair.
  • Heartbeat: Agents send heartbeat pings every 30 seconds. The server marks agents offline if pings stop.
  • Automatic reconnect: If the connection drops, agents reconnect automatically with exponential backoff up to a configurable maximum.
  • Task execution: When a task arrives, the agent validates it, executes it, and sends back structured results.
  • Offline safety: Tasks dispatched while the agent is offline are queued on the server and delivered the moment the agent reconnects.

Agent Isolation

  • Each agent has unique credentials scoped to one owner user
  • Regular users can only manage and task their own agents
  • Admins can view and manage all agents across all users
  • Agents can be individually enabled or disabled without deleting them
  • Secret keys are generated once and shown once β€” not stored in plaintext
Platform

Task Types

MomoBot supports the following task types. Every task is validated by the Policy Engine before it reaches the agent.

Task TypeWhat It DoesParameters
system_info Collects OS name and version, CPU model and core count, total and used RAM, disk usage, hostname, and uptime. None required
shell Executes a shell command on the device. Commands are validated against the deny-pattern list before execution. command, optional timeout (ms), optional cwd
script Executes a script file on the agent's device. path to the script file
file_read Reads and returns the contents of a file. Access to sensitive system paths is blocked. path, optional encoding
file_write Writes content to a file on the agent's device. Sensitive system paths are blocked. path, content, optional append flag
process_list Returns a list of all currently running processes on the device. Optional filter string
screenshot Captures a screenshot of the device's primary display. Optional format, optional quality
custom A custom task type for agent-specific extensions. Validated by the agent's local policy; bypasses server-level shell deny patterns. Agent-defined
Custom task type note: The custom task type bypasses server-level shell deny patterns. If you use custom tasks, your agent must enforce its own local policy controls.
Platform

Workflow Engine

MomoBot includes a built-in workflow engine for multi-step, conditional automation. Workflows are defined as directed acyclic graphs (DAGs) β€” a series of tasks connected by directed edges.

What Workflows Do

  • Chain multiple tasks across one or more agents into a single automated workflow
  • Define conditional branching β€” different paths depending on task results
  • Add approval gates that pause execution until a human approves
  • Schedule workflows to run automatically on a cron schedule
  • Trigger workflows from the dashboard, Slack, Teams, or the REST API
  • View per-execution traces showing the status of every node in the graph
  • Export workflows in n8n-compatible JSON format for use with external tools

Workflow Components

Nodes

Each node in the workflow represents a single task. Nodes carry their task type, parameters, target agent, and description.

Edges

Directed edges connect nodes and define execution order. Edges can carry conditions that determine when the next node runs.

Approval Gates

Special nodes that pause workflow execution until an authorized user approves or rejects. Approval state is stored in the workflow_approvals table.

Execution Traces

Every workflow run creates an execution record showing the start time, end time, final status, and per-node results for that run.

AI-Assisted Generation

MomoBot can generate workflow definitions automatically from a natural-language description using the AI integration endpoint. The generated workflow is returned in n8n-compatible JSON format ready for import into the visual workflow builder.

Platform

AI Task Creator

The AI Task Creator is an admin tool that combines task configuration with AI analysis to help you build, validate, and execute tasks more confidently.

What the AI Task Creator Provides

  • Natural-language task description: Describe what you want to accomplish in plain English. The AI suggests the correct task type, parameters, and configuration.
  • Risk assessment: Before execution, the AI flags potential risks, destructive operations, or edge cases.
  • Step-by-step plan: See a human-readable breakdown of exactly what the task will do on the target device.
  • Time estimate: Understand roughly how long the task will take to complete.
  • Command preview: Review the exact command that will be sent to the agent before you confirm execution.
  • Workflow diagram: Visualize even single tasks as a start-to-finish flow diagram before running them.

Supported AI Models

Premium Models

Require API keys configured in your server environment:

  • Claude 3 Opus (Anthropic) β€” Best reasoning
  • GPT-4o (OpenAI) β€” Most capable
  • GPT-4 Turbo (OpenAI) β€” Balanced
  • GPT-3.5 Turbo (OpenAI) β€” Fast

Free Models

No API keys required:

  • Llama 2 70B (Meta)
  • Mistral 7B (Mistral AI)
  • Local models (llama.cpp / Ollama)
Platform

Scheduler

The MomoBot scheduler lets you run tasks or entire workflows on a recurring cron-based schedule β€” no manual triggering required.

Scheduler Features

  • Schedule any task type to run at any cron interval (minutes, hours, daily, weekly)
  • Schedule full workflows to run automatically
  • View all active schedules and their next run time in the dashboard
  • Enable or disable individual schedules without deleting them
  • All scheduled runs are logged in the audit trail with full task output
Integrations

Slack Integration

MomoBot integrates with Slack so your team can trigger automation directly from any Slack channel using slash commands.

Setup

  1. Create a Slack app in your workspace via the Slack API dashboard.
  2. Add a Slash Command pointing to your MomoBot server at https://your-server/webhooks/slack.
  3. Copy the Signing Secret from your Slack app settings.
  4. Add it to your server environment file:
    SLACK_SIGNING_SECRET=your-signing-secret-here
  5. Add the app to your Slack workspace.

Using Slack Commands

Once configured, anyone in your workspace with access can run:

/momobot run sysinfo on agent-my-laptop
/momobot status
/momobot agents list

Security

  • Every incoming Slack request is verified with HMAC-SHA256 using your SLACK_SIGNING_SECRET.
  • Requests with timestamps older than 5 minutes are automatically rejected (replay protection).
  • Every slash command invocation is recorded in the audit log.
Integrations

Microsoft Teams Integration

MomoBot integrates with Microsoft Teams so your team can trigger automation by mentioning the MomoBot app in any Teams channel.

Setup

  1. In the Microsoft Teams admin center, create an Outgoing Webhook.
  2. Set the webhook callback URL to https://your-server/webhooks/teams.
  3. Copy the HMAC signing secret (base64-encoded) provided by Teams.
  4. Add it to your server environment file:
    TEAMS_WEBHOOK_SECRET=base64encodedSecretHere==

Using Teams Commands

Mention the MomoBot app in any channel to trigger commands:

@MomoBot run diagnostic on server-001
@MomoBot get system info

Security

  • Every incoming Teams request is verified with HMAC-SHA256 using your TEAMS_WEBHOOK_SECRET.
  • Signature comparison uses timing-safe algorithms to prevent timing attacks.
  • Every Teams message that triggers a task is recorded in the audit log.
Integrations

Email (SMTP)

MomoBot can send email notifications at key points in your automation workflows using any SMTP relay.

What Email Notifications Cover

  • Task completion or failure alerts
  • Workflow approval request notifications
  • Diagnostic report delivery

Configuration

Add SMTP settings to your server environment file:

SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=alerts@example.com
SMTP_PASS=yourpassword
SMTP_FROM=MomoBot <alerts@example.com>
Integrations

Webhook Reference

MomoBot exposes webhook endpoints for supported integrations. All endpoints require a valid HMAC signature or return HTTP 401.

EndpointMethodPurpose
POST /webhooks/slack POST Receives Slack slash commands. Verified with X-Slack-Signature header (HMAC-SHA256).
POST /webhooks/teams POST Receives Microsoft Teams outgoing webhook messages. Verified with Authorization: HMAC <sig> header.

Planned Integrations

PlatformStatus
Google ChatπŸ”„ Planned
WhatsApp BusinessπŸ”„ Planned
ZoomπŸ”„ Planned
Google MeetπŸ”„ Planned
Security

Security Overview

MomoBot is built with a defense-in-depth security model. Multiple independent layers of protection ensure that even if one layer is bypassed, others prevent harm.

LayerMechanism
TransportTLS via reverse proxy β€” all traffic over HTTPS / wss://
User Authenticationbcrypt (cost 12) + JWT access tokens (15 min) + refresh tokens (7 days) + optional TOTP 2FA
Agent Authentication256-bit random API key + secret key pair transmitted over TLS WebSocket
AuthorizationRBAC (user / admin) with per-query ownership enforcement at the database level
Task SafetyPolicy Engine validates every task before dispatch β€” type allowlist, shell deny patterns, file path restrictions
Webhook SecurityHMAC-SHA256 signature verification + 5-minute timestamp replay protection
Log SafetyAutomatic redaction of secrets before any audit write
Rate Limiting100 req/15 min on API endpoints; 10 req/15 min on auth endpoints
Input ValidationAll inputs validated with express-validator before processing
Security

Authentication

User Authentication

  • Passwords hashed with bcrypt at cost factor 12 β€” industry-standard one-way hashing
  • JWT access tokens with 15-minute expiry for all API requests
  • Refresh tokens with 7-day expiry, stored in the database and revocable
  • Optional TOTP two-factor authentication (HMAC-based time-based OTP via speakeasy)
  • Sessions tracked in the database β€” individual sessions can be revoked

Agent Authentication

  • Each agent is issued a unique API key and secret key, each generated with 256-bit entropy
  • Agent credentials are transmitted only over TLS WebSocket in production
  • Deactivated agents (is_active = false) are immediately blocked from connecting
  • Secret keys are shown once at creation and not stored in plaintext

Generating Secure Secrets

# Generate JWT secrets (run once during setup)
openssl rand -base64 64   # For JWT_SECRET
openssl rand -base64 64   # For JWT_REFRESH_SECRET
Security

Roles & Permissions

MomoBot uses a two-role access control system.

RoleCapabilities
user
  • Create, view, update, and delete their own agents
  • Create and view tasks for their own agents
  • Build and run workflows using their own agents
  • View their own audit log entries
admin
  • All user capabilities
  • View and manage all agents across all users
  • View and manage all tasks across all users
  • View and manage all workflows across all users
  • View the complete audit log
  • Manage user accounts and their roles
The first user to register automatically receives the admin role. Subsequent users receive the user role by default. Admins can promote users to admin via the dashboard.
Security

Policy Engine

The policy engine is the core safety gate of MomoBot. Every task β€” regardless of how it was triggered β€” passes through the policy engine before being dispatched to any agent. If a task fails policy validation, it is rejected and never reaches the device.

Task Type Allowlist

Only the following task types are permitted. Any other type is automatically blocked:

system_info  |  shell  |  script  |  file_read  |  file_write  |  process_list  |  screenshot  |  custom

Shell Command Deny Patterns

The following shell patterns are blocked regardless of who requests them:

Blocked PatternWhy
rm -rf /Recursive deletion of the root filesystem
mkfs*Disk formatting commands
dd if=Raw disk copy operations
> /dev/Writing directly to device files
curl | bash or wget | shDownload-and-execute attacks
chmod 777 /Root permission escalation
:(){:|:&};Fork bomb (resource exhaustion)
base64 -d | bashObfuscated code execution

File Path Restrictions

The following paths cannot be read or written by any task:

Blocked PathWhy
/etc/shadowSystem password hashes
/etc/passwdUser account database
/proc/*/memDirect process memory access
/sys/Kernel sysfs interface
Any path with ../ or ..\Path traversal prevention

Timeout Limits

  • Minimum timeout: 1 second β€” prevents degenerate zero-timeout tasks
  • Maximum timeout: 5 minutes β€” prevents runaway long-running tasks
Security

Audit Logging

MomoBot maintains an immutable audit log of every sensitive action. Every entry includes who performed the action, what they did, which resource was affected, from which IP, and whether it succeeded.

What Is Logged

EventDescription
user:loginUser login attempts (success and failure)
user:registerNew account registration
agent:createNew agent registered
agent:deleteAgent deleted
agent:rotate-keyAgent credentials rotated
task:createTask dispatched to an agent
webhook:slack:*Slack slash command received and processed
webhook:teams:*Teams webhook message received and processed

Audit Log Fields

FieldDescription
user_idID of the user who performed the action
actionThe action type (e.g., task:create)
resource_typeType of resource affected (agent, task, user)
resource_idID of the affected resource
detailsAction-specific metadata (with secrets redacted)
ip_addressSource IP address of the request
statusOutcome: success or failure
created_atTimestamp of the action

Automatic Secret Redaction

The following fields are automatically redacted before any audit log write, ensuring secrets never appear in logs:

password | password_hash | secret | secretKey | apiKey | api_key | token | refreshToken | access_token
Security

Rate Limiting

MomoBot applies rate limiting to all API and authentication endpoints to protect against abuse and brute-force attacks.

Endpoint GroupLimit
All API endpoints100 requests per 15 minutes per IP address
Auth endpoints (login, register)10 requests per 15 minutes per IP address
Installation

Agent Installation β€” Linux

MomoBot agents run as systemd services on Linux. The automated installer sets everything up for you.

Prerequisites

  • Node.js 18 or later
  • An active MomoBot server (cloud or self-hosted)
  • Agent credentials (API key + Secret key) from the MomoBot dashboard

Automated Install

sudo bash deploy/installers/linux/install.sh
sudo nano /etc/momobot/agent.env   # Add SERVER_URL, AGENT_API_KEY, AGENT_SECRET_KEY
sudo systemctl start momobot-agent
sudo journalctl -u momobot-agent -f   # View logs

Manual Install

cd momobot-platform/momobot-agent
npm install --omit=dev
cp .env.example .env
# Edit .env and fill in your credentials

sudo cp ../../../deploy/installers/linux/momobot-agent.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable momobot-agent
sudo systemctl start momobot-agent
sudo systemctl status momobot-agent

Verifying Connection

After starting the agent, open the MomoBot dashboard and navigate to Settings β†’ Agents β†’ [Your Agent Name]. The agent status should show as Online within 30 seconds.

Troubleshooting

ProblemSolution
Agent shows offline after startVerify SERVER_URL is correct and reachable. Check firewall allows outbound TCP on port 443 (wss://) or your server port.
Authentication errorsVerify AGENT_API_KEY and AGENT_SECRET_KEY match what is shown in the dashboard. Check if the agent has been deactivated.
Tasks not arrivingTasks dispatched while the agent was offline are queued on the server. They dispatch automatically on reconnect. Check task status in the dashboard.
Installation

Agent Installation β€” Windows

The MomoBot agent runs as a Windows service via a PowerShell installer.

Prerequisites

  • Node.js 18 or later (x64)
  • PowerShell with RemoteSigned execution policy
  • An active MomoBot server and agent credentials from the dashboard

Install

# Run as Administrator in PowerShell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\deploy\installers\windows\install.ps1

# Edit configuration
notepad C:\MomoBot\config\agent.env

# Start the service
Start-Service MomoBotAgent
Get-Service MomoBotAgent

Agent Configuration File

Edit C:\MomoBot\config\agent.env and set:

SERVER_URL=https://your-momobot-server.com
AGENT_API_KEY=bot_xxxxxxxxxxxx
AGENT_SECRET_KEY=xxxxxxxxxxxxxxxxxxxx
Installation

Agent Installation β€” macOS

The MomoBot agent runs as a launchd service on macOS, supporting both Intel and Apple Silicon.

Prerequisites

  • Node.js 18 or later
  • An active MomoBot server and agent credentials from the dashboard

Install

bash deploy/installers/macos/install.sh

# Edit configuration with your credentials
nano ~/.momobot-agent/agent.env

# Load and start the agent service
launchctl load ~/Library/LaunchAgents/com.momobot.agent.plist
launchctl start com.momobot.agent

# View logs
tail -f ~/Library/Logs/momobot-agent.log

Platform Support

PlatformStatus
macOS x64 (Intel)βœ… Supported
macOS ARM64 (Apple Silicon)βœ… Supported
Installation

Agent Installation β€” IoT / Raspberry Pi

MomoBot agents run on ARM Linux devices including Raspberry Pi 3/4, NVIDIA Jetson Nano, and industrial edge devices.

Supported Devices

  • Raspberry Pi 4 (ARM64) β€” Recommended
  • Raspberry Pi 3 (ARM32)
  • NVIDIA Jetson Nano (ARM64)
  • Generic ARM Linux devices
  • Industrial Linux edge devices

Install Node.js on Raspberry Pi

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs git
node --version   # Should show v18.x.x

Install the Agent

cd momobot-platform/momobot-agent
npm install --omit=dev

sudo mkdir -p /etc/momobot
cp .env.example /etc/momobot/agent.env
sudo nano /etc/momobot/agent.env
# Set SERVER_URL, AGENT_API_KEY, AGENT_SECRET_KEY

sudo cp ../../../deploy/installers/linux/momobot-agent.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable momobot-agent
sudo systemctl start momobot-agent

Low-Memory Optimization

On resource-constrained devices, add these options to /etc/momobot/agent.env:

NODE_OPTIONS=--max-old-space-size=128
HEARTBEAT_INTERVAL=60000
MAX_RECONNECT_ATTEMPTS=50

Network Requirements

  • Agents connect outbound only β€” no inbound ports required on the device
  • Requires outbound TCP to your MomoBot server (typically port 443 for wss://)
  • UDP is not used for cloud transport

Security on Edge Devices

  • Agent credentials stored in /etc/momobot/agent.env with mode 600, owned by the momobot user
  • Systemd service runs as a dedicated momobot user β€” not root
  • TLS validation enabled by default (do not disable in production)
Deployment

Local Development

Run the full MomoBot platform locally for development and testing.

Prerequisites

  • Node.js 18 or later
  • npm 8 or later

Setup

cd momobot-platform

# Install all dependencies (server + client + agent)
npm run install:all

# Configure the server
cp server/.env.example server/.env
# Edit server/.env β€” set at minimum:
#   JWT_SECRET=<strong random string, min 32 chars>
#   JWT_REFRESH_SECRET=<strong random string, min 32 chars>

# Configure the agent
cp momobot-agent/.env.example momobot-agent/.env
# Edit momobot-agent/.env β€” set:
#   SERVER_URL=http://localhost:4000
#   AGENT_API_KEY=<from dashboard after setup>
#   AGENT_SECRET_KEY=<from dashboard after setup>

# Start server + client
npm run dev

Then in a separate terminal:

cd momobot-platform/momobot-agent
npm start

Dashboard: http://localhost:3000 β€” Server API: http://localhost:4000

Deployment

Docker Deployment

Docker Compose is the recommended way to deploy MomoBot for production on a single host.

Start with Docker Compose

cd momobot-platform

# Build and start all services in the background
docker-compose up -d

# View running containers and logs
docker-compose ps
docker-compose logs -f

# Stop all services
docker-compose down

What Docker Compose Provides

  • MomoBot server on port 4000
  • React client on port 3000
  • Persistent SQLite data volume (data survives container restarts)
Deployment

Kubernetes Deployment

For high-availability production deployments, MomoBot can be deployed to Kubernetes.

Deploy to Kubernetes

# Create namespace
kubectl create namespace momobot

# Create secrets (customize values first)
kubectl create secret generic momobot-secrets \
  --from-literal=JWT_SECRET="$(openssl rand -base64 64)" \
  --from-literal=JWT_REFRESH_SECRET="$(openssl rand -base64 64)" \
  -n momobot

# Apply all manifests
kubectl apply -f momobot-platform/k8s/ -n momobot

# Check status
kubectl get all -n momobot
Multi-instance requirement: When running multiple server instances in Kubernetes, you must use PostgreSQL (not SQLite) and configure Redis for Socket.IO sticky sessions and shared agent registry.
Deployment

AWS / Terraform Deployment

MomoBot includes Terraform configurations for a fully-managed AWS deployment.

What Terraform Provisions

  • ECS Fargate cluster for the MomoBot server
  • S3 + CloudFront for the React client
  • RDS PostgreSQL for the production database
  • Application Load Balancer for HTTPS termination
  • AWS Secrets Manager for credentials storage

Deploy

cd momobot-platform/terraform

terraform init
terraform plan -var="environment=production"
terraform apply -var="environment=production"

Enterprise Architecture

For enterprise scale, MomoBot supports horizontal scaling across multiple server instances:

  • Multiple server instances behind an AWS ALB or nginx load balancer
  • Shared PostgreSQL database across all instances
  • Redis adapter for Socket.IO shared WebSocket state
  • ALB sticky sessions required for WebSocket connections
Deployment

Environment Variables

Server Environment Variables

VariableRequiredDefaultDescription
PORTNo4000Server port
JWT_SECRETYesβ€”JWT signing secret (min 32 characters)
JWT_REFRESH_SECRETYesβ€”Refresh token signing secret (min 32 characters)
JWT_EXPIRES_INNo15mAccess token expiry duration
JWT_REFRESH_EXPIRES_INNo7dRefresh token expiry duration
CLIENT_URLNohttp://localhost:3000Allowed CORS origin (your dashboard URL)
DB_PATHNo./data/momobot.dbSQLite database file path
NODE_ENVNodevelopmentSet to production in production
SLACK_SIGNING_SECRETNoβ€”Slack webhook HMAC signing secret
TEAMS_WEBHOOK_SECRETNoβ€”Teams webhook HMAC secret (base64-encoded)
SMTP_HOSTNoβ€”SMTP relay hostname
SMTP_PORTNo587SMTP relay port
SMTP_USERNoβ€”SMTP relay username
SMTP_PASSNoβ€”SMTP relay password
SMTP_FROMNoβ€”From address for outbound email

Agent Environment Variables

VariableRequiredDefaultDescription
SERVER_URLYesβ€”MomoBot server URL (e.g., https://momobot.example.com)
AGENT_API_KEYYesβ€”Agent API key from the dashboard
AGENT_SECRET_KEYYesβ€”Agent secret key from the dashboard
HEARTBEAT_INTERVALNo30000Heartbeat ping interval in milliseconds
RECONNECT_DELAYNo5000Initial reconnect delay in milliseconds
MAX_RECONNECT_ATTEMPTSNo100Maximum number of reconnect attempts before giving up
Operations

Operations Guide

Health Check

The server exposes a health check endpoint that requires no authentication:

GET https://your-server/health

# Response:
# {"status":"ok","timestamp":"2024-01-15T10:30:00.000Z","version":"1.0.0"}

Rotating Agent Credentials

To rotate an agent's API key and secret key (e.g., after a suspected compromise):

# Via the API
curl -X POST /api/agents/{agent-id}/regenerate-key \
  -H "Authorization: Bearer $YOUR_JWT_TOKEN"

# Via the dashboard
# Agents β†’ [Agent Name] β†’ Rotate Key

The agent's new credentials must be updated in its .env file and the service restarted.

Disabling an Agent

To temporarily prevent an agent from connecting without deleting it:

# Via the dashboard: Agents β†’ [Agent Name] β†’ Disable
# Via the API:
curl -X PATCH /api/agents/{agent-id} \
  -H "Authorization: Bearer $YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"is_active": false}'

Viewing Audit Logs

# Via dashboard: Admin β†’ Audit Logs

# Via SQLite (local/dev only)
sqlite3 momobot-platform/server/data/momobot.db \
  "SELECT * FROM audit_logs ORDER BY created_at DESC LIMIT 50;"

Production Security Checklist

  • βœ… Set strong JWT_SECRET and JWT_REFRESH_SECRET (use openssl rand -base64 64)
  • βœ… Enable TLS via a reverse proxy (nginx, Caddy, or AWS ALB)
  • βœ… Set CLIENT_URL to your actual dashboard domain
  • βœ… Set NODE_ENV=production
  • βœ… Mount the SQLite data directory to persistent storage
  • βœ… Block direct access to port 4000 via firewall
  • βœ… Rotate agent credentials periodically
  • βœ… Review audit logs regularly
  • βœ… Set up log shipping to your SIEM
Operations

Scaling

ScenarioGuidance
Development / small teamSQLite + single server instance. Default configuration works out of the box.
Medium deploymentMigrate to PostgreSQL. Single server instance with Docker Compose.
High-availability productionPostgreSQL (RDS or Cloud SQL) + multiple server instances + Redis Socket.IO adapter + ALB sticky sessions.
Enterprise (Kubernetes)EKS/GKE/AKS + PostgreSQL + Redis + Kubernetes Secrets for credentials + Horizontal Pod Autoscaler.
SQLite limitation: SQLite only supports a single server instance. For any multi-instance deployment, you must migrate to PostgreSQL.
Operations

Monitoring

Recommended Observability Stack

CategoryTools
LogsELK Stack, Datadog, AWS CloudWatch
MetricsPrometheus + Grafana
AlertsPagerDuty or OpsGenie for agent offline / task failure events
APMDatadog APM or AWS X-Ray

Key Metrics to Monitor

  • Agent online/offline status β€” alert when any critical agent goes offline
  • Task failure rate β€” alert when failure rate exceeds threshold
  • Task queue depth β€” alert when tasks are not being dispatched
  • API error rate β€” alert on 5xx response rates
  • Audit log write rate β€” alert on anomalous spikes indicating unusual activity
Operations

Backup & Recovery

SQLite Backup (Single-Instance)

# Create a dated backup
sqlite3 momobot-platform/server/data/momobot.db \
  ".backup 'backup/momobot-$(date +%Y%m%d).db'"

PostgreSQL Backup (Multi-Instance)

# Dump and compress the database
pg_dump momobot | gzip > backup/momobot-$(date +%Y%m%d).sql.gz

# Restore
gunzip -c backup/momobot-20240115.sql.gz | psql momobot

Recovery Checklist

  • Store backups off-site or in object storage (S3, GCS, Azure Blob)
  • Test restore procedures before you need them
  • Back up your .env files securely (AWS Secrets Manager, HashiCorp Vault, or Kubernetes Secrets) β€” they are not included in database backups
  • Agent credentials do not need to be backed up separately β€” they are stored in the database and can be rotated if lost
Reference

API Reference

All REST API endpoints require a valid JWT Bearer token in the Authorization header, unless otherwise noted.

Authentication Endpoints

EndpointMethodDescription
/api/auth/registerPOSTRegister a new user account
/api/auth/loginPOSTLog in and receive JWT access + refresh tokens
/api/auth/refreshPOSTExchange a refresh token for a new access token
/api/auth/logoutPOSTRevoke the current refresh token

Agent Endpoints

EndpointMethodDescription
/api/agentsGETList all agents owned by the current user (admins see all)
/api/agentsPOSTRegister a new agent and receive its credentials
/api/agents/:idGETGet details of a specific agent
/api/agents/:idPATCHUpdate agent name, description, or active status
/api/agents/:idDELETEPermanently delete an agent
/api/agents/:id/regenerate-keyPOSTRotate agent credentials and receive new API key + secret key

Task Endpoints

EndpointMethodDescription
/api/tasksGETList all tasks for the current user's agents (admins see all)
/api/tasksPOSTCreate and dispatch a new task to an agent
/api/tasks/:idGETGet a specific task and its result

Webhook Endpoints

EndpointMethodAuthDescription
/webhooks/slackPOSTHMAC-SHA256Slack slash command receiver
/webhooks/teamsPOSTHMAC-SHA256Microsoft Teams outgoing webhook receiver

System Endpoints

EndpointMethodAuthDescription
/healthGETNoneServer health check β€” returns status, timestamp, and version
The complete interactive API documentation is automatically generated from the codebase and available at http://your-server/api-docs when running in development mode.
Reference

Known Limitations

#LimitationImpact & Workaround
1 SQLite not suitable for high-concurrency production Use PostgreSQL for any multi-instance or high-throughput deployment.
2 mTLS not yet implemented Mutual TLS between agents and server is planned. Use network-level controls (VPC, firewall rules) in the interim.
3 custom task type bypasses server shell deny patterns Agents using custom tasks must enforce their own local policy controls.
4 Secret key shown only once No HSM-backed key storage. Store credentials securely at creation time. Rotate if lost.
5 No local offline queue on agent Tasks queue on the server when the agent is offline. If the server is offline, tasks cannot be queued.
6 Inbound email trigger parsing not yet available Email notifications are outbound only. Inbound email-to-task conversion is planned.
7 Google Chat, WhatsApp, Zoom integrations not yet available Planned on the roadmap. Currently only Slack and Teams are supported.
Reference

Roadmap

Recently Shipped

  • Industrial Automation module β€” SCADA-grade control with OPC-UA, Modbus, MQTT connectors
  • Industrial Scenario Lab β€” 8 built-in physical-world scenarios with replay and learning signals
  • Multi-Agent Control Pipeline β€” 7-role Plannerβ†’Safetyβ†’Simulationβ†’Supervisorβ†’Executorβ†’Verifierβ†’Optimizer
  • Digital-Twin Simulation β€” risk scoring before hardware dispatch
  • Predictive Maintenance β€” health scoring and anomaly-trend monitoring

Near Term

  • PostgreSQL support as a first-class database option
  • mTLS (Mutual TLS) agent authentication
  • Google Chat integration
  • WhatsApp Business integration
  • Inbound email trigger parsing (email β†’ task)

Medium Term

  • Organization / team model (multi-tenant beyond per-user scoping)
  • Redis adapter for multi-instance WebSocket (Socket.IO)
  • ML-powered anomaly detection in the industrial telemetry pipeline (rule-based z-score and range detection already ships; ML-powered pattern recognition is planned)
  • Agent local policy enforcement file (per-device allowlist)

Long Term

  • Full n8n embedding for visual workflow building
  • HSM-backed agent key storage
  • OpenTelemetry integration for distributed tracing
  • Agent auto-update mechanism
Industrial

Industrial Automation & Control

MomoBot Industrial is a SCADA-grade extension that brings the platform's cloud control plane and thin-agent model to manufacturing floors, energy facilities, logistics networks, and any safety-critical operational-technology (OT) environment.

Unlike generic IT automation, industrial operations require cryptographically verified commands, hardware-aware safety rules, digital-twin validation before execution, and full operator-approval workflows for high-risk actions. MomoBot Industrial provides all of these out of the box.

Module location: python-agent-platform/modules/industrial/
All endpoints are mounted under the /v1/industrial prefix and protected by the standard X-Operator-Token header.

Key Capabilities

🤖

Multi-Agent Control Pipeline

A 7-role agent pipeline ensures every command is planned, validated, simulated, supervised, executed, verified, and optimized.

📡

OT Protocol Connectors

Native OPC-UA, Modbus TCP, MQTT, and Simulated connectors. Extend via the IndustrialConnector base class.

🛡️

Safety Policy Engine

Threshold-based rules evaluated before any control action. Supports allow, warn, escalate, block, and emergency_stop tiers.

🔬

Digital-Twin Simulation

Stateless dry-run simulator applies proposed actions to an in-memory machine-state copy and scores risk before any hardware dispatch.

📊

Telemetry Pipeline

Normalized ingestion with per-tag severity classification and z-score / range anomaly detection across all connected protocols.

🔧

Predictive Maintenance

Health scoring, anomaly-trend monitoring, and maintenance recommendations structured for ML integration.

🧪

Scenario Lab

8 built-in physical-world scenarios covering thermal, pressure, connectivity, safety, flow, and maintenance failure modes.

📋

Incident Management

Automated incident creation on safety-rule violations with severity, affected assets, and full audit trail per tenant.

Data Model Overview

EntityDescription
IndustrialSitePhysical site (plant, warehouse, data centre). Top-level container.
IndustrialFacilityFacility or building within a site.
IndustrialZoneZone or area within a facility.
IndustrialMachineIndividual machine or asset with connector type and config.
ProductionLineNamed grouping of machines forming a production flow.
TelemetryEventNormalized telemetry reading with severity and anomaly flag.
SafetyPolicyVersioned threshold-rule set scoped to a machine and tenant.
IndustrialCommandControl action dispatched through the full agent pipeline.
IndustrialIncidentIncident record created automatically on safety violations.
SimulationRunResult of a digital-twin dry-run tied to a specific command.
MaintenanceWindowScheduled maintenance window that blocks commands on affected assets.
Industrial

Multi-Agent Control Pipeline

Every industrial command is processed by a deterministic pipeline of seven specialized agent roles before it is dispatched to hardware.

Safety-first design: Any agent role can veto the pipeline. A Safety agent that returns block or emergency_stop terminates the pipeline immediately — the Executor is never reached.

Pipeline Roles

StepRoleResponsibility
1PlannerDecomposes a high-level intent into concrete actions and parameters.
2SafetyEvaluates safety policies against current machine state; can veto the pipeline.
3SimulationRuns a digital-twin dry-run; produces a risk score (0–1).
4SupervisorReviews the risk score; decides between autonomous execution or human approval.
5ExecutorDispatches the command to the OT connector after all checks pass.
6VerifierReads back machine state after execution and compares expected vs. actual.
7OptimizerRecords outcome metadata for future planning improvements and learning signals.

Operator Approval Flow

When the Supervisor sets requires_approval = True, the command is held in pending_approval state. An authorized operator calls POST /v1/industrial/commands/{id}/approve or POST /v1/industrial/commands/{id}/reject. Only after approval does the Executor run.

All approval decisions are written to the AuditLog table with the operator identity, timestamp, and decision notes.
Industrial

OT Protocol Connectors

Connectors bridge the MomoBot control plane and physical OT devices. All connectors implement the same IndustrialConnector base interface.

Available Connectors

TypeProtocolUse Case
opcuaOPC-UA (IEC 62541)Modern PLCs, SCADA systems, OPC-UA compliant devices
modbusModbus TCPLegacy PLCs, VFDs, sensors using register-based I/O
mqttMQTT v3/v5IoT devices, edge gateways, sensor networks
simulatedIn-memory (test only)Testing, CI, and demo environments — does not connect to real hardware

Connector Interface

python
class IndustrialConnector:
    def get_asset_status(self) -> dict: ...
    def send_command(self, action: str, parameters: dict) -> dict: ...
    def read_telemetry(self, tags: list[str]) -> list[dict]: ...
    def health_check(self) -> bool: ...

Adding a Custom Connector

  1. Create a new file in modules/industrial/connectors/.
  2. Subclass IndustrialConnector from base.py and implement all four methods.
  3. Register it in connectors/__init__.py by adding an entry to _REGISTRY.
  4. No changes to the router, pipeline, or any other module are required.
Industrial

Safety Policy Engine

The Safety Policy Engine evaluates threshold-based rules against live telemetry or command parameters before any control action is dispatched. It is stage 2 of the multi-agent pipeline and can veto execution entirely.

Rule Structure

json
[
  {
    "tag": "temperature",
    "operator": "gt",
    "threshold": 90.0,
    "action": "emergency_stop",
    "description": "Motor temperature critical limit"
  },
  {
    "tag": "temperature",
    "operator": "gt",
    "threshold": 75.0,
    "action": "warn",
    "description": "Motor temperature high warning"
  }
]

Supported Operators

OperatorMeaning
gtGreater than
ltLess than
gteGreater than or equal
lteLess than or equal
eqEqual
neqNot equal

Action Severity Tiers

ActionEffect
allowNo issue — command proceeds normally.
warnProceed with a warning annotation in the execution trace.
escalateSupervisor must review; typically triggers human approval.
blockCommand is rejected; execution does not proceed.
emergency_stopHighest severity; immediately halts all machines in the zone.
Industrial

Telemetry Pipeline

The telemetry pipeline normalizes raw readings from any connector protocol into a uniform NormalizedReading, applies severity classification, and detects statistical anomalies.

Severity Classification

SeverityTrigger
nominalReading is within normal operating bounds.
warningReading exceeds the warning threshold.
criticalReading exceeds the critical threshold.
anomalyStatistical anomaly detected (z-score or range check).

Anomaly Detection Methods

  • Z-score: flags a reading when it deviates more than N standard deviations from a rolling sample mean.
  • Range check: flags a reading outside a configured absolute [min, max] range.

Ingestion API

http
POST /v1/industrial/telemetry/ingest
{
  "machine_id": "uuid",
  "tenant_id": "tenant-1",
  "readings": [
    {"tag": "temperature", "value": 87.5, "unit": "C"},
    {"tag": "speed",       "value": 1450,  "unit": "rpm"},
    {"tag": "vibration",   "value": 0.12,  "unit": "mm/s"}
  ]
}
Industrial

Predictive Maintenance

The maintenance advisor computes machine health scores from recent telemetry and generates maintenance recommendations, designed as a clean hook for future ML integration.

Health Score Bands

Score RangeStatusRecommended Action
0.8 – 1.0HealthyContinue normal operation.
0.5 – 0.79DegradedSchedule inspection at next opportunity.
0.3 – 0.49At RiskPrioritize maintenance within 48 hours.
0.0 – 0.29CriticalImmediate maintenance required.

Machine Health API

http
GET /v1/industrial/machines/{machine_id}/health?tenant_id=tenant-1

# Response
{
  "machine_id": "uuid",
  "health_score": 0.67,
  "status": "degraded",
  "anomaly_fraction": 0.08,
  "recommendations": [
    "Schedule lubrication inspection.",
    "Check bearing temperature."
  ],
  "sample_count": 100
}
Industrial

Digital-Twin Simulation

Before any high-risk action reaches hardware, the simulator runs a stateless dry-run that applies the proposed command to an in-memory copy of machine state and evaluates safety rules on the predicted post-action outcome.

How It Works

  1. Snapshot — take a deep copy of the current machine state.
  2. Apply effect — run the registered action handler on the copy.
  3. Evaluate safety — run the safety policy engine against the predicted state.
  4. Score risk — produce a 0–1 risk score based on the worst safety action triggered.
  5. Return resultSimulationResult includes outcome, risk_score, predicted_state, and safety_violations.

Built-in Action Effects

ActionEffect on Machine State
set_speedSets state["speed"] to the provided value.
stopSets speed to 0 and status to "stopped".
startSets status to "running"; optionally sets speed.
emergency_stopSets speed to 0 and status to "emergency_stop".
adjust_temperatureAdjusts temperature by the specified delta.
set_pressureSets pressure to the provided value.

Risk Score Mapping

Worst Safety ActionRisk ScorePipeline Outcome
allow0.0Autonomous execution
warn0.25Autonomous with warning annotation
escalate0.5Supervisor review; may require approval
block0.75Command blocked
emergency_stop1.0Pipeline vetoed; emergency stop issued
Industrial

Scenario Lab

The Scenario Lab provides a library of built-in physical-world scenarios for end-to-end testing and operator training, each covering a realistic industrial failure mode or safety-critical event.

Built-in Scenarios

ScenarioCategoryDescription
Conveyor Overheating thermal Motor temperature rises above threshold. Tests speed-reduction intervention.
Robotic Arm — Human in Zone human_safety Human-presence sensor fires during robotic motion. Tests immediate halt and safety lockout.
Tank Pressure Breach pressure Tank pressure exceeds safe range. Tests emergency vent activation.
Edge Gateway Network Loss connectivity Gateway disconnects from the cloud. Tests local autonomous fallback and reconnect recovery.
Production Line Blockage flow Downstream jam sensor fires. Tests upstream motor stop and clearance workflow.
Maintenance Lock Conflict maintenance Restart command arrives for machine under maintenance. Tests lock enforcement.
Emergency Stop — Manual Trigger safety Operator triggers e-stop on the floor. Tests zone-wide halt propagation.
Low-Connectivity Edge Execution connectivity Device on intermittent 2G/satellite. Tests local policy caching and deferred sync.

Scenario Lifecycle

  1. SeedPOST /v1/industrial/scenarios/seed-builtins loads all built-in scenarios.
  2. List / GetGET /v1/industrial/scenarios or fetch by ID.
  3. RunPOST /v1/industrial/scenarios/{id}/run executes the scenario.
  4. ResultsGET /v1/industrial/scenarios/runs/{run_id}/results retrieves step results and incidents.
  5. ReplayPOST /v1/industrial/scenarios/runs/{run_id}/replay reproduces a past run deterministically.
  6. FeedbackPUT /v1/industrial/scenarios/runs/{run_id}/feedback for operator notes.
  7. Learning SignalsGET /v1/industrial/scenarios/learning-signals exports structured outcomes for ML pipelines.
Industrial

Industrial API Reference

All industrial endpoints live under /v1/industrial. Mutating operations require the X-Operator-Token header. Read-only operations accept operator or viewer tokens.

Site & Facility Management

MethodEndpointDescription
GET/v1/industrial/sitesList all sites for a tenant.
POST/v1/industrial/sitesCreate a site.
GET/v1/industrial/sites/{id}Get site details.
PATCH/v1/industrial/sites/{id}Update site metadata.
POST/v1/industrial/facilitiesCreate a facility within a site.
POST/v1/industrial/production-linesCreate a production line.

Machine Management

MethodEndpointDescription
POST/v1/industrial/machinesRegister a machine.
GET/v1/industrial/machines/{id}Get machine details.
PATCH/v1/industrial/machines/{id}Update machine state or config.
GET/v1/industrial/machines/{id}/healthGet predictive maintenance health report.

Telemetry

MethodEndpointDescription
POST/v1/industrial/telemetry/ingestIngest a batch of telemetry readings.
GET/v1/industrial/telemetryQuery stored telemetry events.

Safety Policies

MethodEndpointDescription
POST/v1/industrial/safety-policiesCreate a safety policy.
GET/v1/industrial/safety-policiesList safety policies.
POST/v1/industrial/safety-policies/{id}/evaluateEvaluate a policy against a telemetry snapshot.

Commands & Approvals

MethodEndpointDescription
POST/v1/industrial/commandsIssue a command (runs full agent pipeline).
GET/v1/industrial/commands/{id}Get command status and details.
GET/v1/industrial/commands/{id}/traceGet the full execution trace (per-agent results).
POST/v1/industrial/commands/{id}/approveApprove a pending command.
POST/v1/industrial/commands/{id}/rejectReject a pending command.

Incidents & Maintenance

MethodEndpointDescription
GET/v1/industrial/incidentsList incidents for a tenant.
POST/v1/industrial/incidentsCreate an incident manually.
PATCH/v1/industrial/incidents/{id}Update incident status or resolution.
POST/v1/industrial/maintenance-windowsCreate a maintenance window.
GET/v1/industrial/maintenance-windowsList maintenance windows.

Scenario Lab

MethodEndpointDescription
GET/v1/industrial/scenariosList scenarios.
POST/v1/industrial/scenariosCreate a custom scenario.
POST/v1/industrial/scenarios/seed-builtinsLoad all built-in scenarios.
POST/v1/industrial/scenarios/{id}/runExecute a scenario.
GET/v1/industrial/scenarios/runs/{run_id}/resultsGet run results and step details.
POST/v1/industrial/scenarios/runs/{run_id}/replayReplay a past scenario run.
GET/v1/industrial/scenarios/runs/{run_id}/compareCompare two runs side by side.
GET/v1/industrial/scenarios/learning-signalsExport learning signals for ML pipelines.