Skip to content
PaloNexus
Request access Request

Configuration & environment variables

A palonexus_agent pod is configured entirely through the environment. All values have sane defaults pointed at in-cluster service names, so a pod with only PALONEXUS_AGENT_NAME set is functional. Most are read in palonexus_agent/config.py (Settings); a few are read directly by the egress middleware, the egress-proxy helpers, and the sidecar.

Settings is a process-wide singleton: use get_settings() to read it and reload_settings() to force a fresh read (tests monkeypatch env then reload).

Separately from the agent-pod settings below, the palonexus SDK facade reads its own small set of PALONEXUS_* variables in PaloNexus.from_env() (client.py). These are the values to set when embedding the SDK in application code or CI. Every value falls back to the local-dev topology in platform/CLAUDE.md, and PALONEXUS_OFFLINE is the master switch: when truthy (1 / true / yes) from_env() returns PaloNexus.offline() and every other variable below is ignored — the facade routes through the in-memory FakeControlPlane, so the same code path runs in CI with no cluster, no keys, and no network.

Env varDefaultLiveOfflinePurpose
PALONEXUS_OFFLINE""master switchTruthy → PaloNexus.offline() (in-memory FakeControlPlane); ignores every var below.
PALONEXUS_CONTROL_PLANE_URLhttp://localhost:9191usedignoredBase URL of the /authz egress decision listener (:9191).
PALONEXUS_MGMT_URLhttp://localhost:8181usedignoredControl-plane management API (:8181) — registry + /v1/audit (used by pn.audit).
PALONEXUS_IDP_URLhttp://localhost:8090usedignoredagent-idp base URL (:8090) — register, provision, delegations, revocation, directory.
PALONEXUS_API_KEYunset (None)usedignoredThe SDK API key (pn_live_… / pn_test_…), sent as a Bearer on idp + management calls.
PALONEXUS_TENANT_ID""used"offline"Default org/tenant id for governance calls (e.g. 7gdgqfu5j0oo, the seeded sample organization’s org id).
PALONEXUS_AGENT_TOKEN""usedignoredWorkload token presented as Authorization on egress /authz calls; absent → anonymous, and private targets deny.

The PALONEXUS_API_KEY the client presents is created, scoped, rotated, and revoked from the operator portal’s SDK API keys console (/settings/keys). Keys are deny-by-default: a new key carries only the scopes toggled on, are hashed at rest, and fail closed the moment they are revoked — the next call the SDK makes with a revoked key is rejected. Use a pn_test_ key against a sandbox tenant and a pn_live_ key in production.

SDK API-keys console: a new-key form with an environment selector and deny-by-default scope toggles, above a keys table listing a revoked test key with its scopes and last-used time.

Create, scope, rotate and revoke the SDK keys the palonexus client presents as PALONEXUS_API_KEY; keys are hashed at rest and fail closed when revoked.

Env varDefaultRead byPurpose
PALONEXUS_AGENT_NAMEunnamed-agentconfig.py, middlewareThe agent’s name — its identity at agent-idp, the X-Palonexus-Actor header, and the x-palonexus-actor broker meter tag.
PALONEXUS_AGENT_ROLE"" (falls back to name)config.pyThe role sent at registration.
PALONEXUS_OFFLINE""config.pyWhen truthy (1/true/yes), bootstrap mints a local did:key with no agent-idp calls — for tests/dev.
Env varDefaultPurpose
PALONEXUS_IDP_URLhttp://agent-idp.agent-idp.svc:8090The agent-idp base URL — register, provision, delegation, and did:web resolution.
AGENTDID_ISSUER_DIDdid:web:agent-idp.agent-idp.svcThe issuer/root Decentralized Identifier (DID) used to verify issuer-signed Verifiable Credentials (VCs).

PALONEXUS_IDP_URL is also the base URL the bundled enterprise identity-and-access-management (IAM) CLIs (directory_cli, identity_cli, governance_cli, authority_cli, revocation_cli, sts_cli) read — point them at a local server or a DigitalOcean Kubernetes (DOKS) port-forward with the same var.

The enterprise-IAM layer (directory sync, employee identity resolution, agent governance, human-authority delegation, revocation cascade, and the agent Security Token Service, STS) is configured on the agent-idp side, not in the agent pod. It adds no new required env vars: it persists through the same IDP_STORE_BACKEND / IDP_DB_URL as the rest of the identity provider (IdP), and the STS signer reuses the existing ISSUER_PRIVATE_KEY_B64 issuer key — no separate signing key.

The knobs an operator would tune are module constants today (MVP; a future release may move them to env):

ConstantWherePurpose
RESOURCE_OWNERSapp/authority.pyresource → owner map for the resource_owner authority basis
ADMIN_GROUPS / ADMIN_ROLEapp/authority.pywho counts as the PaloNexus platform admin
AUDIENCE_ALLOWLISTapp/sts.pythe only aud values the STS will bind a token to
MAX_TTL / DEFAULT_TTLapp/sts.pyagent-token lifetime cap (900s) and default (600s)

The features create their tables (idp_employees, idp_groups, idp_syncs, idp_agent_governance, idp_gov_delegations, idp_revocations_log, idp_tokens) automatically on any non-memory backend.

See Environment variables § agent-idp for the full table and the Enterprise IAM API for the endpoints; the Connect agents to enterprise authority — hands-on walks the CLIs.

Env varDefaultRead byPurpose
PALONEXUS_EGRESS_URLhttp://egress.palonexus.svc.cluster.localconfig.py, middlewareThe egress gateway the middleware asks at /authz. In dev/tests it can point straight at the control-plane /authz on :9191.
PALONEXUS_TOKEN_PATH/var/run/secrets/palonexus/tokenconfig.py, middlewareFile the agent’s bearer token is read from for the Authorization header on /authz calls.
Env varDefaultPurpose
PALONEXUS_BROKER_URLhttp://model-broker.palonexus.svc.cluster.local:8080The model broker base URL. In sidecar mode, point this at the localhost sidecar so model calls can’t bypass the gate. build_llm appends /v1.
BROKER_API_KEYsk-broker-devThe broker master key (not an OpenAI key) — the agent never holds a provider key.
PALONEXUS_MODELmodel-openaiThe default (cheap) logical model name; also the model-egress target the middleware authorizes.
PALONEXUS_MODEL_LARGEmodel-openai-largeThe model selected by build_llm(large=True).
Env varDefaultRead byPurpose
PALONEXUS_USE_EGRESS_SIDECARunsetllm.pyWhen set, build_llm uses a plain HTTP client (the broker base_url already targets the sidecar, which owns the proxy + verifiable presentation, VP). When unset, the in-process proxied client is used.
PALONEXUS_IDENTITY_FILE(agent: unset; sidecar: /var/run/palonexus-identity/identity.json)app.py, sidecarThe shared identity file the agent writes ({did, privateKeyB64, membershipVc}) and the sidecar reads to mint fresh VPs. The agent only writes it when this is set.
REAL_BROKER_URLhttp://model-broker.palonexus.svc.cluster.local:8080sidecarThe real broker the sidecar forwards to.
EGRESS_PROXY_URLhttp://egress-proxy.palonexus.svc.cluster.localsidecarThe egress proxy the sidecar routes through, with the VP as Proxy-Authorization.
VP_TTL_S43200 (12h)sidecarSidecar VP lifetime (revocation still enforced per-call at /authz).
PALONEXUS_PROXY_VP_TTL_S43200 (12h)egress_proxy.pyTTL of the proxy-auth VP minted by proxied_client/proxied_async_client (PROXY_VP_TTL_S).
HTTPS_PROXY / HTTP_PROXY (and lowercase)injected by k8segress_proxy.pyPoint at egress-proxy.palonexus.svc; the pod NetworkPolicy permits egress only here, forcing all outbound calls through /authz. proxy_url() reads these.
NO_PROXYinjected by k8senv-respecting clientsExempts the agent-idp bootstrap (and other in-cluster control traffic) from the proxy, so identity provisioning doesn’t loop through the gate.
Env varDefaultPurpose
PALONEXUS_RUNBOOKS_URLhttp://runbooks-api.apps.svc:8081The regulated DID/VC runbooks-api the runbook tool calls (gated egress + challenge-response).
PALONEXUS_PROMETHEUS_URLhttp://lgtm.observability.svc:9090Prometheus endpoint for the diagnostics agent.
PALONEXUS_LOKI_URLhttp://lgtm.observability.svc:3100Loki endpoint for the diagnostics agent.
Env varDefaultPurpose
PALONEXUS_AGENT_DB_URL""Postgres URL for the LangGraph checkpointer; empty selects an in-memory checkpointer.
OTEL_EXPORTER_OTLP_ENDPOINT""OTLP endpoint; empty disables span export.
Env varDefaultRead byPurpose
LANGCHAIN_OPENAI_TCP_KEEPALIVEunsetlangchain_openai transportEnables TCP keep-alive on the OpenAI client connection — useful for long-lived broker connections under enforcement (set in the agent Deployment).
env:
- name: PALONEXUS_AGENT_NAME
value: incident-triage
- name: PALONEXUS_USE_EGRESS_SIDECAR
value: "1"
- name: PALONEXUS_BROKER_URL
value: http://localhost:8788 # the in-pod egress sidecar
- name: PALONEXUS_IDENTITY_FILE
value: /var/run/palonexus-identity/identity.json
- name: HTTPS_PROXY
value: http://egress-proxy.palonexus.svc.cluster.local:3128
- name: NO_PROXY
value: agent-idp.agent-idp.svc,localhost,127.0.0.1
- name: LANGCHAIN_OPENAI_TCP_KEEPALIVE
value: "1"