Skip to main content

Runtime Configuration

Agnitra uses environment variables to keep the CLI, SDK, and control plane stateless. This reference lists the most important settings and when to apply them.

Core Credentials

VariableDescription
AGNITRA_API_KEYRequired credential for CLI, SDK, and API calls. Scope keys per environment and rotate every 90 days.
AGNITRA_API_BASE_URLOverrides the managed control plane hostname (e.g. https://api.agnitra.ai). Use it for staging or self-hosted deployments.
AGNITRA_CONTROL_PLANE_URLInternal service discovery override when deploying the Starlette control plane behind a load balancer.

Telemetry & Usage

VariableDescription
AGNITRA_TELEMETRY_EXPORTComma-separated list of telemetry exporters (s3,stripe,aws,internal).
AGNITRA_DASHBOARD_BASE_URLCustom dashboard endpoint for multi-tenant deployments.
AGNITRA_USAGE_WEBHOOKOptional HTTP endpoint that receives every usage event for auditing or enrichment.
AGNITRA_USAGE_SIGNING_KEYSecret used to sign outbound usage events. Rotate regularly if you rely on downstream verification.

Licensing & Compliance

VariableDescription
AGNITRA_LICENSE_ORG / AGNITRA_LICENSE_SEATExplicit license metadata for on-prem installs and offline validation.
AGNITRA_REQUIRE_LICENSEWhen set to 1, optimization runs abort if license validation fails.
AGNITRA_OFFLINE_MODEForces the CLI/SDK to skip control-plane calls (also available via --offline).

Optimization Behaviour

VariableDescription
AGNITRA_ENABLE_LLM_RLEnable reinforcement-learning passes after Responses API suggestions.
AGNITRA_ONLY_LLMSkip PPO and apply only LLM-suggested kernels (useful for fast iteration).
AGNITRA_LLM_MODELOverride the default Responses API deployment (e.g. gpt-5-codex).
AGNITRA_MAX_BATCH_SIZEUpper bound used by the runtime patcher when auto-tuning Triton kernels.

Logging & Diagnostics

VariableDescription
AGNITRA_LOG_LEVELControls SDK/CLI verbosity (INFO, DEBUG, TRACE).
AGNITRA_PROFILER_SAMPLESNumber of warmup iterations the telemetry collector performs before capturing metrics.
AGNITRA_BENCHMARK_REPEATSOverrides default repeats for agnitra benchmark runs.

Marketplace Credentials

ProviderEnvironment Variables
StripeSTRIPE_API_KEY, STRIPE_PRODUCT_ID, STRIPE_METER_ID
AWS MarketplaceAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AGNITRA_AWS_PRODUCT_CODE
GCP MarketplaceGOOGLE_APPLICATION_CREDENTIALS, AGNITRA_GCP_PRODUCT_ID
Unset provider credentials cause marketplace dispatchers to mark events as skipped or deferred. Use this to rehearse workflows before enabling billing.

Feature Flags in Tests

PyTest suites monkeypatch the CLI to inject lightweight profilers and bypass heavy dependencies. Respect the following hooks when adding new commands:
  • cli.main.profile_model — override profiler behaviour in tests.
  • AGNITRA_TEST_MODE — signal to the SDK that fixture telemetry should be generated instead of real runs.

Further Reading

  • SDK & CLI Guide for command-line equivalents of many flags.
  • Telemetry Playbook to see how configuration changes affect exports.
  • pyproject.toml lists optional extras (openai, rl, nvml, marketplace) that unlock additional features documented here.