Use this repo as a starting point for building an ARP compliant Selection Service.
The Selection Service produces bounded candidate sets for mapping subtasks to NodeTypes. The selection strategy is intentionally implementation-defined; this template provides a small, deterministic baseline.
This minimal template implements the Selection API using only the SDK packages:
arp-standard-server, arp-standard-model, and arp-standard-client.
Implements: ARP Standard spec/v1 Selection API (contract: ARP_Standard/spec/v1/openapi/selection.openapi.yaml).
- Python >= 3.10
python3 -m pip install -e .For local dev convenience, copy the template env file:
cp .env.example .env.localsrc/scripts/dev_server.sh auto-loads .env.local (or .env).
- Selection Service listens on
http://127.0.0.1:8085by default.
python3 -m pip install -e '.[run]'
python3 -m arp_template_selection_serviceTip
Use bash src/scripts/dev_server.sh --host ... --port ... --reload for dev convenience.
To build your own selection service, fork this repository and replace the selection strategy while preserving request/response semantics.
If all you need is to change selection strategy, edit:
src/arp_template_selection_service/service.py
Outgoing client wrapper (selection -> node registry):
src/arp_template_selection_service/node_registry_client.py
- Returns a deterministic candidate set containing
atomic.echo@0.1.0. - Applies
constraints.candidates.max_candidates_per_subtaskas a top-K bound when provided.
curl http://127.0.0.1:8085/v1/healthCLI flags:
--host(default127.0.0.1)--port(default8085)--reload(dev only)
python3 -m pip install arp-conformance
arp-conformance check selection --url http://127.0.0.1:8085 --tier smoke
arp-conformance check selection --url http://127.0.0.1:8085 --tier surface-
src/scripts/dev_server.sh: run the server (flags:--host,--port,--reload). -
src/scripts/send_request.py: generate a candidate set from a JSON file.python3 src/scripts/send_request.py --request src/scripts/request.json
For out-of-the-box usability, this template defaults to auth-disabled unless you set ARP_AUTH_MODE or ARP_AUTH_PROFILE.
To enable JWT auth, set either:
ARP_AUTH_PROFILE=dev-secure-keycloak+ARP_AUTH_SERVICE_ID=<audience>- or
ARP_AUTH_MODE=requiredwithARP_AUTH_ISSUERandARP_AUTH_AUDIENCE
When upgrading to a new ARP Standard SDK release, bump pinned versions in pyproject.toml (arp-standard-*==...) and re-run conformance.