Quickstart
MIG Quick Start
Section titled “MIG Quick Start”This quick start gets you to a working MIG runtime and a successful HELLO / DISCOVER / INVOKE flow.
Estimated time: about 10 minutes.
Prerequisites
Section titled “Prerequisites”- Running MIG runtime (
migd) curl
1) Start the runtime
Section titled “1) Start the runtime”Start your MIG runtime on http://localhost:8080.
2) Check runtime health
Section titled “2) Check runtime health”curl -sS http://localhost:8080/admin/v0.1/health/conformanceExpected shape:
{"core":true,"streaming":true,"evented":true,"full":true}3) Run core MIG calls
Section titled “3) Run core MIG calls”curl -sS -X POST http://localhost:8080/mig/v0.1/hello \ -H 'Content-Type: application/json' \ -H 'X-Tenant-ID: acme' \ -d '{ "header": {"tenant_id": "acme"}, "supported_versions": ["0.1"], "requested_bindings": ["http"] }'DISCOVER
Section titled “DISCOVER”curl -sS -X POST http://localhost:8080/mig/v0.1/discover \ -H 'Content-Type: application/json' \ -H 'X-Tenant-ID: acme' \ -d '{"header": {"tenant_id": "acme"}}'INVOKE
Section titled “INVOKE”curl -sS -X POST http://localhost:8080/mig/v0.1/invoke/observatory.models.infer \ -H 'Content-Type: application/json' \ -H 'X-Tenant-ID: acme' \ -d '{ "header": {"tenant_id": "acme"}, "payload": {"input": "hello MIG"} }'4) Optional: verify event flow
Section titled “4) Optional: verify event flow”Open an SSE subscription:
curl -N http://localhost:8080/mig/v0.1/subscribe/observatory.inference.completed \ -H 'X-Tenant-ID: acme'Publish an event:
curl -sS -X POST http://localhost:8080/mig/v0.1/publish/observatory.inference.completed \ -H 'Content-Type: application/json' \ -H 'X-Tenant-ID: acme' \ -d '{ "header": {"tenant_id": "acme"}, "payload": {"status": "done", "job_id": "job-1"} }'The subscription terminal should receive the event.
5) Optional: JWT mode
Section titled “5) Optional: JWT mode”Start runtime with JWT auth enabled and a strong secret value:
MIGD_AUTH_MODE=jwt \MIGD_JWT_HS256_SECRET=<set-a-strong-secret> \migdIn JWT mode, include:
Authorization: Bearer <token>X-Tenant-ID: <tenant>
Troubleshooting
Section titled “Troubleshooting”tenant_id is required: include tenant in header and request body.missing bearer tokenorinvalid bearer token: check JWT mode and token claims.capability not found: runDISCOVERand invoke an advertised capability ID.