Configuration
The playground reads settings from environment variables (and a .env file) via
pydantic-settings (playground/config.py). get_settings() is cached. Copy
.env.example to .env to start.
Doppler: where the real values live
Doppler is the source of truth for secrets and
config. Each service has its own project with the configs dev,
dev_personal, stg and prd:
| Doppler project | Runs as (Railway acdp-runner, production) | Allowlist |
|---|---|---|
acdp-playground | acdp-playground | deploy/doppler-keys/playground.txt |
acdp-registry-a | registry-a | deploy/doppler-keys/registry-a.txt |
acdp-registry-b | registry-b | deploy/doppler-keys/registry-b.txt |
acdp-playground/dev holds the local development values. Run against them
without a .env file:
doppler setup --project acdp-playground --config dev # once per checkout
doppler run -- make run
doppler run -- make test-live # or any other targetReal environment variables take precedence over .env in pydantic-settings,
so doppler run works with every target, and a local .env still works as a
fallback without Doppler. Use dev_personal for values only you need.
Production values move from Doppler prd into Railway with
deploy/doppler-sync.sh; see
Deployment.
Core settings
Registries
| Variable | Default | Notes |
|---|---|---|
REGISTRY_A_URL | http://localhost:8100 | Registry-a base URL |
REGISTRY_B_URL | http://localhost:8200 | Registry-b base URL |
REGISTRY_A_AUTHORITY | registry-a.playground.local | DID authority for registry-a |
REGISTRY_B_AUTHORITY | registry-b.playground.local | DID authority for registry-b |
Settings.registry_url_for(authority) and authority_url_map() map either
authority back to its base URL — this is how cross-registry resolution routes
retrievals.
Registry receipts (ACDP 0.2, RFC-ACDP-0010)
registry-a hosts the receipts profile (alongside its legacy did:key/pinned- did:web traffic). The playground owns only the verify-side seed it uses to check registry-a's receipts; the receipts profile itself (what the registry signs, and when) is the registry's — see its RECEIPTS.md.
| Variable | Default | Notes |
|---|---|---|
RECEIPT_SIGNING_SEED_B64 | (demo seed baked in) | Base64 Ed25519 seed for registry-a's receipts profile. Must equal [receipt].signing_key_seed_b64 in config/registry-a.toml; receipt_verification_public_key_b64() derives the verify key from it. Set it empty to disable receipts (Settings.receipts_enabled is bool(...) of it) — the receipt-backed scenarios then degrade |
LLM provider
| Variable | Default | Notes |
|---|---|---|
LLM_PROVIDER | openai | openai | anthropic | mock |
LLM_MODEL | gpt-4o-mini | Passed straight to the provider — set an Anthropic model id when LLM_PROVIDER=anthropic |
OPENAI_API_KEY | — | Required for openai |
ANTHROPIC_API_KEY | — | Required for anthropic |
Use LLM_PROVIDER=mock for fully offline runs (deterministic echo, no key).
Webhook signing
| Variable | Default | Notes |
|---|---|---|
WEBHOOK_SECRET | playground-dev-secret | Must match the value the registries are launched with; used to verify inbound X-ACDP-Signature. Empty disables verification — every webhook is accepted unsigned |
Control plane (optional)
| Variable | Default | Notes |
|---|---|---|
CONTROL_PLANE_URL | (empty) | Empty disables all CP forwarding; set it to enable |
CONTROL_PLANE_HMAC_SECRET | (empty) | Must match the CP's WEBHOOK_SECRET; signs forwarded webhooks and run notifications. Empty sends them unsigned |
CONTROL_PLANE_ADMIN_TOKEN | (empty) | Admin bearer for the CP calls introspect, revocations, events, declare_capability and reload_pinned_keys (each returns None without it); matches a CP AUTH_ADMIN_API_KEYS entry. Domain-pack listing does not need it |
Settings.control_plane_enabled is simply bool(control_plane_url).
V2 protocol features
| Variable | Default | Notes |
|---|---|---|
DEFAULT_SIGNATURE_ALG | ed25519 | ed25519 | ecdsa-p256 — intended default signer |
TENANCY_ENABLED | false | Intended switch for tenant context in tenancy-aware scenarios |
JWT_SIGNING_ALG | HS256 | HS256 | EdDSA — informational only |
These three are declared and validated (an invalid value fails startup) but
no code currently reads them: scenarios pick their algorithm per call
(producer_for(..., algorithm=...)) and their tenancy explicitly, so changing
them has no effect on a run today.
Access gate, limits and quotas
| Variable | Default | Notes |
|---|---|---|
PLAYGROUND_API_KEY | (empty) | Shared secret callers send as x-api-key |
PLAYGROUND_REQUIRE_API_KEY | false | true → 401 without a valid key; startup fails if the key or WEBHOOK_SECRET is empty |
DATABASE_URL | (empty) | Postgres DSN for durable LLM-quota counters; empty → in memory |
LLM_QUOTA_PER_IP_PER_DAY / _PER_MONTH | 30 / 300 | Real LLM calls per client IP per UTC day / month |
LLM_QUOTA_GLOBAL_PER_DAY / _PER_MONTH | 1000 / 10000 | Real LLM calls, all callers |
RUN_RATE_LIMIT_PER_IP | 5 | POST /runs per client IP per window |
RUN_RATE_LIMIT_WINDOW_SECONDS | 600 | Sliding window for the line above |
MAX_CONCURRENT_RUNS | 3 | Runs in flight at once |
RUN_TIMEOUT_SECONDS | 600 | Wall-clock cap on one run; past it the run errors and frees its slot |
REGISTRY_PROXY_TIMEOUT_SECONDS | 10 | Upstream timeout for /registries/* |
All limits must be positive integers. Semantics, the client-IP header and the rollout rule are in HTTP API → Limits.
Logging
| Variable | Default | Notes |
|---|---|---|
LOG_FORMAT | pretty | pretty (human) | json (structured) |
LOG_LEVEL | INFO | Standard Python log level name; case-insensitive (upper-cased before use) |
The consumer SSRF guard
There is no env toggle — acdp_client.safe_http is always enforced on the
data_refs[].location fetch path (RFC-ACDP-0008 §4.9): https-only,
private/loopback/IMDS blocked, same-authority redirects only, mixed-DNS-answer
rejection — orchestration only; the policy itself is the SDK's. See
Client SDK → safe_http.
Optional: ACDP_RFC_DIR (default ../agentcontextdistributionprotocol) points
the JCS-vectors test at the sibling RFC repo; the test skips if absent.
Downstream service configuration (not owned here)
docker-compose.full.yml also sets a number of CONTROL_PLANE_* and
ACDP_REGISTRY_* variables that configure the registry and control plane,
not the playground. The compose file bakes in secure-but-demo-friendly defaults;
.env.example lists the overrides (audience binding, strict tenancy, ingest DoS
caps, outbound-webhook SSRF policy, federation feeds, the CP default-tenant
fail-fast rule, the registry loopback-bind rule, the CP's DOMAIN_PACKS and
POLICY_BACKEND, …). None of them is a playground setting.
These are documented by the projects that own them — don't treat the playground as their reference:
- Control plane: CONFIGURATION.md · AUTH.md · TENANCY.md · INGEST.md · POLICY.md
- Registry: CONFIGURATION.md · AUTHENTICATION.md · MULTI-TENANCY.md
The only playground-relevant facts about them are the shared secrets that must line up across services — see Deployment → Secrets that must line up.