JARVIS Run Gateway implementation for the ARP Standard (spec/v1).
Project description
JARVIS Run Gateway
First-party OSS reference implementation of the ARP spec/v1 Run Gateway.
This JARVIS component implements the Run Gateway API using the SDK packages:
arp-standard-server, arp-standard-model, and arp-standard-client.
Implements: ARP Standard spec/v1 Run Gateway API (contract: ARP_Standard/spec/v1/openapi/run-gateway.openapi.yaml).
Requirements
- Python >= 3.11
Install
python3 -m pip install arp-jarvis-rungateway
Local configuration (optional)
For local dev convenience, copy the example env file:
cp .env.example .env.local
src/scripts/dev_server.sh auto-loads .env.local (or .env).
Run
- Run Gateway listens on
http://127.0.0.1:8080by default.
python3 -m pip install -e .
arp-jarvis-rungateway
[!TIP] Use
bash src/scripts/dev_server.sh --host ... --port ... --reloadfor dev convenience.
Using this repo
This repo is the maintained JARVIS reference for the Run Gateway.
To customize behavior, edit:
src/jarvis_run_gateway/gateway.py(incoming API handlers)src/jarvis_run_gateway/run_coordinator_client.py(gateway → coordinator client behavior)
Default behavior
- The gateway requires a configured Run Coordinator at startup.
- All run lifecycle methods forward to the coordinator (no local fallback).
- The gateway validates inbound JWTs and exchanges them for coordinator-scoped tokens.
Common extensions
- Customize outbound auth (token caching, mTLS) between gateway and coordinator.
- Add gateway-side validation/quotas before forwarding.
Implementation overview
Request flow:
- Inbound request hits the Run Gateway (
arp-standard-server). - Auth middleware validates the
Authorization: Bearer <JWT>header. - Gateway captures the inbound bearer token and forwards the call to the coordinator.
- Gateway exchanges the inbound token for a coordinator-scoped token (or uses client-credentials when no token is present in dev/optional mode).
- Coordinator processes the request and the gateway returns the response.
Key implementation details:
- Stateless gateway: no local run storage or caching.
- Coordinator is required at startup; the gateway fails fast if missing.
- Token exchange uses
arp-auth(OIDC client credentials + RFC 8693 token exchange). - NDJSON streams are proxied as opaque bytes (no rewrite).
Quick health check
curl http://127.0.0.1:8080/v1/health
Configuration
CLI flags:
--host(default127.0.0.1)--port(default8080)--reload(dev only)
Environment variables:
JARVIS_RUN_COORDINATOR_URL: base URL for the Run Coordinator (example:http://127.0.0.1:8081). Required at startup.JARVIS_RUN_COORDINATOR_AUDIENCE: audience for token exchange (default:arp-run-coordinator).ARP_AUTH_CLIENT_ID/ARP_AUTH_CLIENT_SECRET: required for STS token exchange for outbound coordinator calls.ARP_AUTH_ISSUER: OIDC issuer (required unlessARP_AUTH_TOKEN_ENDPOINTis set).ARP_AUTH_TOKEN_ENDPOINT: optional override for the STS token endpoint.
Validate conformance (arp-conformance)
Once the service is running, validate it against the ARP Standard:
python3 -m pip install arp-conformance
arp-conformance check run-gateway --url http://127.0.0.1:8080 --tier smoke
arp-conformance check run-gateway --url http://127.0.0.1:8080 --tier surface
Helper scripts
-
src/scripts/dev_server.sh: run the server (flags:--host,--port,--reload).bash src/scripts/dev_server.sh --host 127.0.0.1 --port 8080
-
src/scripts/send_request.py: start a run from a JSON file and fetch the run back.python3 src/scripts/send_request.py --request src/scripts/request.json
Authentication
Auth is enabled by default (JWT). To disable for local dev, set ARP_AUTH_PROFILE=dev-insecure.
If no ARP_AUTH_* env vars are set, the gateway defaults to required JWT auth with the dev Keycloak issuer.
To enable local Keycloak defaults, set:
ARP_AUTH_PROFILE=dev-secure-keycloakARP_AUTH_AUDIENCE=arp-run-gatewayARP_AUTH_ISSUER=http://localhost:8080/realms/arp-dev
Gateway → Coordinator token exchange
The gateway exchanges the incoming bearer token for a coordinator-scoped token before forwarding.
This uses arp-auth and requires ARP_AUTH_CLIENT_ID/ARP_AUTH_CLIENT_SECRET.
If no inbound token is present (only possible when ARP_AUTH_MODE=optional or disabled),
the gateway falls back to client-credentials to obtain a service token. This is intended for
dev/internal usage only; production should keep ARP_AUTH_MODE=required.
External user tokens (Keycloak broker)
If user tokens come from an external IdP but exchange should happen at Keycloak STS:
ARP_AUTH_MODE=required
ARP_AUTH_ISSUER=https://idp.example.com/oidc
ARP_AUTH_TOKEN_ENDPOINT=https://keycloak.example.com/realms/arp-dev/protocol/openid-connect/token
ARP_AUTH_CLIENT_ID=arp-run-gateway
ARP_AUTH_CLIENT_SECRET=...
JARVIS_RUN_COORDINATOR_AUDIENCE=arp-run-coordinator
JARVIS_RUN_COORDINATOR_URL=https://coordinator.example.com
Keycloak must be configured to trust the external IdP and allow token exchange for the subject token.
Upgrading
When upgrading to a new ARP Standard SDK release, bump pinned versions in pyproject.toml (arp-standard-*==...) and re-run conformance.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arp_jarvis_rungateway-0.3.8.tar.gz.
File metadata
- Download URL: arp_jarvis_rungateway-0.3.8.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb7b86cad9d5b887f35196e7b479ee7fbeff602059d937c4b8f5969765c359f9
|
|
| MD5 |
83cd8dbe31dd0319f2821789112d84cd
|
|
| BLAKE2b-256 |
73a783c8ca6949e227bda8ffd6396f1735fef096eb33f02258fe24bd457871a9
|
Provenance
The following attestation bundles were made for arp_jarvis_rungateway-0.3.8.tar.gz:
Publisher:
release.yml on AgentRuntimeProtocol/JARVIS_RunGateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arp_jarvis_rungateway-0.3.8.tar.gz -
Subject digest:
eb7b86cad9d5b887f35196e7b479ee7fbeff602059d937c4b8f5969765c359f9 - Sigstore transparency entry: 790412180
- Sigstore integration time:
-
Permalink:
AgentRuntimeProtocol/JARVIS_RunGateway@eefa2e8aa1025bcfe18e7d058a08d2187877d23f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AgentRuntimeProtocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eefa2e8aa1025bcfe18e7d058a08d2187877d23f -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file arp_jarvis_rungateway-0.3.8-py3-none-any.whl.
File metadata
- Download URL: arp_jarvis_rungateway-0.3.8-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33714d4bc5a41f11399fa2ee88b346aad4dc52872c7461d3d805294133e18b46
|
|
| MD5 |
3298f670d8dba51572dd30cfde74dfb0
|
|
| BLAKE2b-256 |
15fd0981e4047e1b7456d91e5b6bb151dd5aa11833307a16b34216952f8be5af
|
Provenance
The following attestation bundles were made for arp_jarvis_rungateway-0.3.8-py3-none-any.whl:
Publisher:
release.yml on AgentRuntimeProtocol/JARVIS_RunGateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arp_jarvis_rungateway-0.3.8-py3-none-any.whl -
Subject digest:
33714d4bc5a41f11399fa2ee88b346aad4dc52872c7461d3d805294133e18b46 - Sigstore transparency entry: 790412182
- Sigstore integration time:
-
Permalink:
AgentRuntimeProtocol/JARVIS_RunGateway@eefa2e8aa1025bcfe18e7d058a08d2187877d23f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AgentRuntimeProtocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eefa2e8aa1025bcfe18e7d058a08d2187877d23f -
Trigger Event:
workflow_run
-
Statement type: