Start a Run via Run Gateway
Goal
You will start a Run via the ARP Standard Run Gateway POST /v1/runs.
When to use this
- You want to kick off a workflow via the public entrypoint.
- You are validating that
Run Gateway→Run Coordinatorforwarding works.
Standard vs. implementation
- Normative contract: ARP Standard: Run Gateway
- Reference implementation: JARVIS Run Gateway
Prerequisites
- A Run Gateway URL
- Example (CLI/dev):
http://127.0.0.1:8080 - Example (
JARVIS_Release):http://localhost:8081(defaultRUN_GATEWAY_HOST_PORT)
- Example (CLI/dev):
- A root
NodeTypeRefto start from- Default JARVIS composite planner:
jarvis.composite.planner.general@<stack-version>
- Default JARVIS composite planner:
- If auth is enabled, a bearer token that passes gateway JWT validation (
iss+aud). - If you are using
JARVIS_Release, thearp-jarvisCLI is the preferred entrypoint.
Steps
-
Preferred (JARVIS_Release): start a run via the CLI:
arp-jarvis runs start --goal "Generate a UUID, then return it."If auth is enabled, log in once:
arp-jarvis auth login -
Raw HTTP: set your Run Gateway URL:
# Default `JARVIS_Release` stack port (RUN_GATEWAY_HOST_PORT)
export RUN_GATEWAY_URL=http://127.0.0.1:8081 -
Start a run (no auth / dev-insecure):
curl -sS -X POST "$RUN_GATEWAY_URL/v1/runs" \
-H 'Content-Type: application/json' \
-d '{
"root_node_type_ref": {"node_type_id": "jarvis.composite.planner.general", "version": "0.3.3"},
"input": {"goal": "Generate a UUID, then return it."}
}' -
(Optional) Start a run with a bearer token:
If you are using the Keycloak dev STS, mint a token via the CLI:
TOKEN="$(arp-jarvis auth token --audience arp-run-gateway)"
curl -sS -X POST "$RUN_GATEWAY_URL/v1/runs" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TOKEN" \
-d '{
"root_node_type_ref": {"node_type_id": "jarvis.composite.planner.general", "version": "0.3.3"},
"input": {"goal": "Generate a UUID, then return it."}
}'If you are a service (client credentials), use your STS client ID/secret and mint a token at the token endpoint.
Verify
- You get an HTTP
200response with a JSONRunbody containing at least:run_idroot_node_run_id
Troubleshooting
401/403→ auth is enabled and your token is missing/invalid → setARP_AUTH_MODE=disabled(dev only) or mint a valid JWT and includeAuthorization: Bearer ....503withrun_coordinator_missing→ gateway is not configured → setJARVIS_RUN_COORDINATOR_URL(and optionallyJARVIS_RUN_COORDINATOR_AUDIENCE).400validation errors → payload shape is wrong → confirm you’re sendingroot_node_type_refandinputwith correct JSON types.
Cleanup / Rollback
- Not required. (Cancellation is a separate operation via
Run Gateway/Run Coordinator.)
Next steps
- Concept: Capabilities and nodes
- Reference: ARP Standard: Run Coordinator
- How-to: Stream run events (NDJSON)