JARVIS Run Coordinator implementation for the ARP Standard (spec/v1).
Project description
JARVIS Run Coordinator
First-party OSS reference implementation of the ARP Run Coordinator service.
This implementation is advanced. The Run Coordinator is correctness-critical and stateful; it is more complex than other JARVIS services.
This reference implementation uses the ARP SDK packages plus arp-auth to call
internal services (Run Store, Event Stream, Artifact Store).
Implements: ARP Standard spec/v1 Run Coordinator API (contract: ARP_Standard/spec/v1/openapi/run-coordinator.openapi.yaml).
Requirements
- Python >= 3.11
Install
python3 -m pip install -e .
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 Coordinator listens on
http://127.0.0.1:8081by default. - Run Store, Event Stream, and Artifact Store must be running and configured.
python3 -m pip install -e .
python3 -m jarvis_run_coordinator
[!TIP] Use
bash src/scripts/dev_server.sh --host ... --port ... --reloadfor dev convenience.
Using this repo
This is a first-party coordinator implementation meant to showcase the ARP lifecycle.
To build your own coordinator, fork this repository and replace the persistence and orchestration logic while keeping request/response semantics stable.
If all you need is to change NodeRun lifecycle behavior and storage, edit:
src/jarvis_run_coordinator/coordinator.py
Outgoing client wrappers (coordinator -> other components):
src/jarvis_run_coordinator/clients/atomic_executor_client.pysrc/jarvis_run_coordinator/clients/composite_executor_client.pysrc/jarvis_run_coordinator/clients/selection_client.py(reserved; not used by coordinator logic in v0.3.3)src/jarvis_run_coordinator/clients/node_registry_client.pysrc/jarvis_run_coordinator/clients/pdp_client.py
Internal service clients:
src/jarvis_run_coordinator/clients/run_store.py(Run + NodeRun persistence)src/jarvis_run_coordinator/clients/event_stream.py(RunEvent append + NDJSON stream proxy)src/jarvis_run_coordinator/clients/artifact_store.py(artifact refs; executors upload blobs)
Default behavior
- System-of-record: Runs + NodeRuns persist via Run Store (HTTP) and RunEvents append via Event Stream (NDJSON).
- Root creation:
start_runcreates the Run + root NodeRun, emitsrun_started+node_run_assigned, enforcesrun.start, then optionally dispatches. - Composite ingestion:
create_node_runsonly allows composite parents, persists metadata (candidate_set_id,binding_decision) inNodeRun.extensions, and emitscomposite_decomposed/candidate_set_generated/subtask_mappedwhen present. - Constraint enforcement (mechanical): structural limits (
max_depth,max_children_per_composite,max_total_nodes_per_run,max_decomposition_rounds_per_node) are enforced duringcreate_node_runs; candidate allow/deny lists are enforced at dispatch. - Idempotent child creation: when
NodeRunCreateSpec.idempotency_keyis set, repeated calls return the same NodeRun (or 409 if the spec differs). - Best-effort dispatch: when
JARVIS_RUN_COORDINATOR_AUTO_DISPATCH=true, queued NodeRuns are dispatched in-process viaasyncio.create_task. - Policy posture: PDP is optional; when unconfigured, policy is deny-by-default unless
JARVIS_POLICY_PROFILE=dev-allow.
Extensions
The ARP Run / NodeRun models include an extensions field used for non-normative metadata.
This coordinator persists several spec-adjacent values into extensions so they are queryable later.
Written/consumed by the coordinator:
constraints(on bothRun.extensionsandNodeRun.extensions): persisted effectiveConstraintEnvelopeused for later structural enforcement.decomposition_rounds(onNodeRun.extensionsfor composite nodes): increments when the coordinator accepts decomposition and is used formax_decomposition_rounds_per_node.completion_error(onNodeRun.extensions): copied fromcomplete_node_runerror payload for post-mortem debugging.
Written by callers (e.g., Composite Executor) and persisted by the coordinator on NodeRun.extensions:
candidate_set_id(Selection linkage)binding_decision(chosen candidate + rationale)idempotency_key(mirrors create spec idempotency; used for deterministic child IDs)
Full cross-stack list: https://github.com/AgentRuntimeProtocol/BusinessDocs/blob/main/Business_Docs/JARVIS/Extensions.md.
Notes on API surface
- In
spec/v1, Run lifecycle endpoints (start/get/cancel) are defined on both Run Gateway (client-facing) and Run Coordinator (run authority). - The coordinator focuses on the standardized NodeRun APIs. Execution hierarchy is derived from NodeRuns and is an internal coordinator concern.
Implementation overview
Run start flow:
- Run Gateway (or a client) calls
POST /v1/runs:starton the coordinator. - Coordinator persists the
Runand rootNodeRun, emitsrun_startedandnode_run_assigned. - Coordinator enforces
run.startvia PDP (if configured), emitspolicy_decided, and denies by default when unconfigured. - If auto-dispatch is enabled, coordinator dispatches the root NodeRun based on NodeKind (atomic vs composite).
Composite decomposition flow:
- Coordinator dispatches a composite NodeRun to Composite Executor (
begin_composite_node_run). - Composite Executor decomposes the work and calls
create_node_runsto create child NodeRuns. - Coordinator validates the composite parent relationship, persists child NodeRuns as queued, and (optionally) auto-dispatches them.
NDJSON streaming:
stream_run_events: proxies Event Stream’s NDJSON for a Run.stream_node_run_events: filters the Run’s NDJSON to the requested NodeRun and its descendants.
Quick health check
curl http://127.0.0.1:8081/v1/health
Configuration
CLI flags:
--host(default127.0.0.1)--port(default8081)--reload(dev only)
Environment variables: Internal services (required):
JARVIS_RUN_STORE_URLJARVIS_EVENT_STREAM_URLJARVIS_ARTIFACT_STORE_URL
Internal service audiences (optional):
JARVIS_RUN_STORE_AUDIENCE(defaultarp-jarvis-runstore)JARVIS_EVENT_STREAM_AUDIENCE(defaultarp-jarvis-eventstream)JARVIS_ARTIFACT_STORE_AUDIENCE(defaultarp-jarvis-artifactstore)
Downstream services (optional; enable features when set):
JARVIS_ATOMIC_EXECUTOR_URL(enables atomic dispatch)JARVIS_COMPOSITE_EXECUTOR_URL(enables composite dispatch)JARVIS_NODE_REGISTRY_URL(improves NodeKind resolution)JARVIS_PDP_URL(enables centralized policy)JARVIS_SELECTION_URL(reserved; coordinator does not call Selection in v0.3.3)
Downstream audiences (optional):
JARVIS_ATOMIC_EXECUTOR_AUDIENCE(defaultarp-jarvis-atomicexecutor)JARVIS_COMPOSITE_EXECUTOR_AUDIENCE(defaultarp-jarvis-compositeexecutor)JARVIS_NODE_REGISTRY_AUDIENCE(defaultarp-jarvis-noderegistry)JARVIS_PDP_AUDIENCE(defaultarp-jarvis-pdp)JARVIS_SELECTION_AUDIENCE(defaultarp-jarvis-selection)
Coordinator behavior:
JARVIS_RUN_COORDINATOR_PUBLIC_URL(required only to dispatch composites; passed to Composite Executor)JARVIS_RUN_COORDINATOR_AUTO_DISPATCH(default true; if false, NodeRuns remain queued in v0.3.3)
Policy posture:
JARVIS_POLICY_PROFILE=dev-allow(explicitly allow for local dev; otherwise deny-by-default when PDP is unset)
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-coordinator --url http://127.0.0.1:8081 --tier smoke
arp-conformance check run-coordinator --url http://127.0.0.1:8081 --tier surface
Helper scripts
-
src/scripts/dev_server.sh: run the server (flags:--host,--port,--reload). -
src/scripts/send_request.py: create NodeRuns from a JSON file and fetch one 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.
Incoming JWT validation is configured via ARP_AUTH_PROFILE plus optional overrides (issuer/audience/JWKS).
Because this service requires outbound STS credentials (ARP_AUTH_CLIENT_ID/ARP_AUTH_CLIENT_SECRET), you will typically
have ARP_AUTH_* variables set; ensure you also set the inbound issuer/audience (or JWKS settings) for validation.
To enable local Keycloak defaults, set:
ARP_AUTH_PROFILE=dev-secure-keycloakARP_AUTH_AUDIENCE=arp-run-coordinatorARP_AUTH_ISSUER=http://localhost:8080/realms/arp-dev
Outbound service auth (Run Store / Event Stream / Artifact Store):
ARP_AUTH_CLIENT_IDARP_AUTH_CLIENT_SECRETARP_AUTH_TOKEN_ENDPOINT(orARP_AUTH_ISSUER)
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_run_coordinator-0.3.3.tar.gz.
File metadata
- Download URL: arp_jarvis_run_coordinator-0.3.3.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56b837cc2271556f94b9701de8e6afbfd39d2ac09aa4ebbc95469588af8f4b8c
|
|
| MD5 |
d88682287c4c4e290e2f52739eb84236
|
|
| BLAKE2b-256 |
35e60a833486928dcef30bddcc513be91052cafde5a83bcada9abf86030aa465
|
Provenance
The following attestation bundles were made for arp_jarvis_run_coordinator-0.3.3.tar.gz:
Publisher:
release.yml on AgentRuntimeProtocol/JARVIS_RunCoordinator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arp_jarvis_run_coordinator-0.3.3.tar.gz -
Subject digest:
56b837cc2271556f94b9701de8e6afbfd39d2ac09aa4ebbc95469588af8f4b8c - Sigstore transparency entry: 786362355
- Sigstore integration time:
-
Permalink:
AgentRuntimeProtocol/JARVIS_RunCoordinator@6a552350ad6aa55b96e45273f411c15aab1a51d3 -
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@6a552350ad6aa55b96e45273f411c15aab1a51d3 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file arp_jarvis_run_coordinator-0.3.3-py3-none-any.whl.
File metadata
- Download URL: arp_jarvis_run_coordinator-0.3.3-py3-none-any.whl
- Upload date:
- Size: 33.4 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 |
227f7346919cd637e0985d46dfbde12b291fb606f8b2695834efe7a0d9914d4a
|
|
| MD5 |
1054662470dc581eac9574b940d9e654
|
|
| BLAKE2b-256 |
b5589e414f5e1bdc4a4ca9367bb4d86c49687b9701df3d9c9e8a6c7ef952ea38
|
Provenance
The following attestation bundles were made for arp_jarvis_run_coordinator-0.3.3-py3-none-any.whl:
Publisher:
release.yml on AgentRuntimeProtocol/JARVIS_RunCoordinator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arp_jarvis_run_coordinator-0.3.3-py3-none-any.whl -
Subject digest:
227f7346919cd637e0985d46dfbde12b291fb606f8b2695834efe7a0d9914d4a - Sigstore transparency entry: 786362360
- Sigstore integration time:
-
Permalink:
AgentRuntimeProtocol/JARVIS_RunCoordinator@6a552350ad6aa55b96e45273f411c15aab1a51d3 -
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@6a552350ad6aa55b96e45273f411c15aab1a51d3 -
Trigger Event:
workflow_run
-
Statement type: