Skip to main content

SDK Environment Variables

For server database configuration, use the AGENT_CONTROL_DB_* variables in the server section below.

Server Environment Variables

Core Settings

Runtime Token

By default, the SDK sends the runtime token in the Authorization header as Authorization: Bearer <runtime-token>. If a gateway reserves Authorization for its own identity credential, configure the server and SDK to use a dedicated header:
With this setting, Agent Control SDK 8.5.0 or later sends the runtime token in X-Agent-Control-Runtime-Token as a raw token without a Bearer prefix. Authorization remains available for gateway authentication. You can alternatively set the header when initializing the SDK:
If runtime_token_header is not provided, the SDK uses AGENT_CONTROL_RUNTIME_TOKEN_HEADER. If neither is configured, it defaults to Authorization.
Upgrading to version 8.5.0 or later does not change the default header. A dedicated header is used only after you configure the environment variable or the SDK option.

CORS

Database

Observability

Evaluators


Authentication

Agent Control supports API key authentication for production deployments.

Configuration

Usage

Include the API key in the X-API-Key header:
With the Python SDK:

Access Levels

Key Rotation

Agent Control supports multiple API keys for zero-downtime rotation:
  1. Add new key to AGENT_CONTROL_API_KEYS (e.g., key1,key2,new-key)
  2. Deploy the server
  3. Update clients to use the new key
  4. Remove the old key from the variable
  5. Redeploy

UI Environment Variables


Database Setup

Agent Control uses PostgreSQL. The easiest way to run it locally:
Default credentials in docker-compose:
  • User: agent_control
  • Password: agent_control
  • Database: agent_control
  • Port: 5432