Technical description
Node 20+, no dependencies. The gateway is a micro-router (`node:http`) with SSE; routes are declared as `{ method, path, auth, rate, requiredRole }`. Tenants, keys, budgets and policies live in `config/`, data in `data/`. The model is swappable (openai-compatible provider, fallback chain or mock).
How to run it
node scripts/serve.mjs # gateway (NMQ_PORT, default 8787)
NMQ_LLM_PROVIDER=mock node scripts/serve.mjs # demo without an API key ($0)
node scripts/smoke.mjs # 40/42 in this environment (2 known: selfplay, swarm UDP)
curl -X POST http://127.0.0.1:8800/v1/agents/support/run \
-H "content-type: application/json" -d '{"input":"Kako da resetujem lozinku?"}'
API
| method | path | what it does |
|---|---|---|
GET | / | landing (SR) — this demo |
GET | /watch | the live agent demo (widget + API) |
GET | /healthz | liveness + version |
GET | /metrics | Prometheus metrics |
GET | /v1/agents | agent catalogue |
GET | /v1/agents/:id | one agent |
POST | /v1/agents/:id/run | run an agent |
GET | /v1/tools | tools and risk levels |
GET | /v1/patterns | orchestration patterns |
Data
- config/tenants.json — tenants, budgets, allowed agents (the demo has one tenant, “demo”)
- config/tools.json — which tools are enabled; the demo disables http_fetch, email_send, notify and all MCP servers
- config/autonomy.json — autonomy levels (demo: L0/L1, no self-scheduling)
- data/ — sessions, history, vector store, audit, cost (per tenant)
Limits — what this demo does not do
- The demo uses a mock model: the text is not from a real model, the machinery is.
- The demo disables http_fetch, email_send, notify, invoice_create and MCP; admin, keys, chaos, worker and audit routes are blocked at nginx.
- One demo tenant, a small budget, a 20/min rate limit — the demo is not for load.
- Without a key there is no live model; mock is deliberate so the demo cannot spend money.
How it is deployed
One Node process behind nginx, a systemd unit, Let’s Encrypt, demo configuration from `demo-config/`. Recipe: E:\poslovi\DEMO-REGISTAR.md.
Smoke in this environment: 40/42 (selfplay and the swarm UDP test fail — known, unrelated to the demo).