Environment Variables
Reference for AgentCube environment variables. Inbound authentication (Layer 1) is configured on the Context Engine; each connector carries its backend credentials and, for SSO, the Oracle token-exchange settings (Layer 2).
Common Variables
Section titled “Common Variables”| Variable | Required | Default | Description |
|---|---|---|---|
AGENTCUBE_CE_LOG_LEVEL | No | INFO | Context Engine logging level: DEBUG, INFO, WARNING, ERROR. |
AGENTCUBE_LOG_LEVEL | No | INFO | Connector logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL. The Context Engine does not read this variable. |
Context Engine — Core
Section titled “Context Engine — Core”Set on the Context Engine.
| Variable | Required | Default | Description |
|---|---|---|---|
AGENTCUBE_CE_DATABASE_URL | Yes | — | PostgreSQL connection URL for the Context Engine database. The Context Engine refuses to start without it. The database must have the pgvector extension installed (CREATE EXTENSION vector;, run once by your database administrator) before the Context Engine first starts; its schema setup fails without it. |
AGENTCUBE_CE_CREDENTIAL_KEY | Yes | — | Encryption key for the secrets the Context Engine stores in its database: the service-account credentials you enter for connected systems, and the installed license key. Without it you cannot register connected systems or install a license. Generate it once (below) and back it up with your database backups. |
AGENTCUBE_CE_ADMIN_USERNAME | First start | — | Username of the first admin console account. Required only while no admin account exists; after the first start it can be removed. |
AGENTCUBE_CE_ADMIN_PASSWORD | First start | — | Password of the first admin console account. Same rule as the username. |
AGENTCUBE_CE_INTERNAL_SIGNING_KEY | For internal connectors | — | PEM-encoded RSA private key the Context Engine uses to sign the internal tokens it sends to internal-mode connectors. The Context Engine refuses to start if a connected system uses auth mode internal and this is unset. internal connectors also need inbound SSO on the Context Engine (AGENTCUBE_CE_AUTH_MODE=oidc). |
AGENTCUBE_CE_INTERNAL_AUDIENCE | No | agentcube-internal | aud claim of the internal tokens for connectors that have no audience of their own. Every such connector shares this value, so a connector could reuse a token meant for another. Give each internal connector its own audience instead (admin portal, or PUT /api/v1/admin/connectors/{connector_id}/internal-audience); see Upgrades. |
Generate AGENTCUBE_CE_CREDENTIAL_KEY once and store it in your secret manager. A database restored without the matching key cannot decrypt stored credentials; if the key is lost or changed, re-enter each connected system’s credentials and install the license again.
$b = [byte[]]::new(32); [System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($b)[Convert]::ToBase64String($b).Replace('+','-').Replace('/','_')openssl rand -base64 32 | tr '+/' '-_'The license itself is not an environment variable: install it in the admin console under Admin & Security → License.
Context Engine — Backups
Section titled “Context Engine — Backups”Set on the Context Engine. The Context Engine runs a nightly database_backup job that writes a compressed pg_dump of its database to Azure Blob Storage. The job does nothing until AGENTCUBE_CE_BACKUP_BLOB_ACCOUNT_URL is set. See Backup & recovery for setup.
| Variable | Required | Default | Description |
|---|---|---|---|
AGENTCUBE_CE_BACKUP_BLOB_ACCOUNT_URL | For backups | — | Blob endpoint of the storage account, https://{storage_account}.blob.core.windows.net, with no trailing slash. Without it the backup job cannot run, and the admin console dashboard flags backups as an issue. |
AGENTCUBE_CE_BACKUP_BLOB_CONTAINER | No | agentcube-ce-backups | Blob container the exports are written to. Create it before the first run. |
AGENTCUBE_CE_BACKUP_BLOB_KEY | No | — | Storage account access key. Leave it unset to authenticate with the Context Engine’s managed identity instead, which needs the Storage Blob Data Contributor role on the storage account. When set, the key is used and the identity is ignored. |
AGENTCUBE_CE_BACKUP_ENABLED | No | true | Whether the backup job starts enabled. Read only when the Context Engine first creates the job; after that, enable or pause it on the Jobs page. |
AGENTCUBE_CE_BACKUP_SCHEDULE_CRON | No | 0 3 * * * | The job’s first schedule (daily at 03:00 UTC). Read only when the job is first created; after that, the schedule is edited on the Jobs page. |
AGENTCUBE_CE_BACKUP_TIMEOUT_SECONDS | No | 1800 | Longest one export may run before it is stopped. |
The job is created the first time the Context Engine starts, and it starts enabled only if the storage account URL is already set. If you add backup storage to a running deployment, open Jobs → database_backup and enable it after the Context Engine restarts.
Context Engine — Inbound Auth (Layer 1)
Section titled “Context Engine — Inbound Auth (Layer 1)”Set on the Context Engine. These control how it validates inbound MCP requests from your AI platform. With AGENTCUBE_CE_AUTH_MODE=basic (the default) the /mcp endpoint is unauthenticated, so use basic only on a private network or behind a gateway; oidc turns it into an OAuth 2.1 resource server.
| Variable | Required | Default | Description |
|---|---|---|---|
AGENTCUBE_CE_AUTH_MODE | No | basic | basic (unauthenticated) or oidc |
AGENTCUBE_CE_OIDC_PROVIDER | When oidc | azure | azure (Entra) or oidc (generic) |
AGENTCUBE_CE_OIDC_CLIENT_ID | When oidc | — | IdP application client ID |
AGENTCUBE_CE_OIDC_CLIENT_SECRET | When oidc | — | IdP application client secret |
AGENTCUBE_CE_OIDC_TENANT_ID | When oidc + azure | — | Entra directory (tenant) ID |
AGENTCUBE_CE_OIDC_CONFIG_URL | When oidc + generic | — | IdP discovery URL (.well-known/openid-configuration) |
AGENTCUBE_CE_OIDC_AUDIENCE | No (generic only) | The client ID | Audience the access token’s aud claim must carry. Set it only when your IdP issues tokens for a separate API identifier. Rejected with azure. |
AGENTCUBE_CE_OIDC_BASE_URL | When oidc | — | The Context Engine’s public HTTPS URL (used as the OAuth redirect base and as the issuer of internal tokens) |
AGENTCUBE_CE_OIDC_SCOPES | No | access (azure) / openid,profile,email (generic) | Comma-separated required scopes |
AGENTCUBE_CE_OIDC_JWT_SIGNING_KEY | No | The client secret | Key used to sign the session tokens the Context Engine issues to MCP clients |
Connector — Backend Connection
Section titled “Connector — Backend Connection”Set on each connector. The _USERNAME and _PASSWORD variables are Oracle service-account credentials, used only with AGENTCUBE_AUTH_MODE=basic. With delegated_basic, leave them unset: you enter the credentials when you register the connector in the Context Engine, which stores them encrypted and forwards them on each call, and the connector refuses to start if they are present. With internal or oidc they are not used.
Essbase Connector
Section titled “Essbase Connector”| Variable | Required | Description |
|---|---|---|
ESSBASE_SERVER_URL | Yes | Essbase REST API base URL (e.g., https://{essbase_host}) |
ESSBASE_USERNAME | With basic | Service account username |
ESSBASE_PASSWORD | With basic | Service account password |
ESSBASE_VERIFY_SSL | No | Verify the server’s TLS certificate. Default true; set false only for a self-signed on-premise server. |
ESSBASE_TIMEOUT | No | Request timeout in seconds. Default 30. |
ESSBASE_MAX_CACHED_MEMBERS | No | Total outline members the connector caches across cubes. Default 400000. Raise it for very large outlines. |
Planning Connector
Section titled “Planning Connector”| Variable | Required | Description |
|---|---|---|
PLANNING_SERVER_URL | Yes | Planning base URL (e.g., https://{planning_host}) — the connector appends the REST path |
PLANNING_USERNAME | With basic | Service account username |
PLANNING_PASSWORD | With basic | Service account password |
PLANNING_IDENTITY_DOMAIN | No | Identity domain name, for non-default identity domains. Applied only with basic; with delegated_basic, enter the username in the Context Engine as identity_domain.username. |
PLANNING_APP_NAME | No | Application name hint. The connector can discover it. |
PLANNING_VERIFY_SSL | No | Verify the server’s TLS certificate. Default true. |
PLANNING_TIMEOUT | No | Request timeout in seconds. Default 30. |
FCCS Connector
Section titled “FCCS Connector”| Variable | Required | Description |
|---|---|---|
FCCS_SERVER_URL | Yes | FCCS base URL (e.g., https://{fccs_host}) |
FCCS_USERNAME | With basic | Service account username |
FCCS_PASSWORD | With basic | Service account password |
FCCS_IDENTITY_DOMAIN | No | Identity domain name, for non-default identity domains. Applied only with basic; with delegated_basic, enter the username in the Context Engine as identity_domain.username. |
FCCS_APP_NAME | No | Application name hint. The connector can discover it. |
FCCS_VERIFY_SSL | No | Verify the server’s TLS certificate. Default true. |
FCCS_TIMEOUT | No | Request timeout in seconds. Default 30. |
Connector — Auth Mode & Connector Mode
Section titled “Connector — Auth Mode & Connector Mode”Set on each connector. AGENTCUBE_AUTH_MODE selects how the connector authenticates to Oracle; AGENTCUBE_CONNECTOR_MODE selects which tool surface it exposes.
| Variable | Required | Description |
|---|---|---|
AGENTCUBE_AUTH_MODE | No | basic | oidc | internal | delegated_basic. Default basic. See Auth Mode Management. |
AGENTCUBE_CONNECTOR_MODE | Planning/FCCS: Yes | admin | user. Required for Planning and FCCS — no default; the connector refuses to start without it. admin exposes the metadata/service-account surface; user exposes the user-scoped data surface. Essbase defaults to user; admin is optional and registers only a restricted metadata and test lane for the Context Engine’s background calls (metadata refresh, Test binding), typically with delegated_basic. |
The connector refuses to start with AGENTCUBE_CONNECTOR_MODE=user and AGENTCUBE_AUTH_MODE=basic, so an Essbase connector left on both defaults does not start. The recommended pairing, for all three products, is an admin connector with delegated_basic and a user connector with internal.
Federated SSO (internal mode)
Section titled “Federated SSO (internal mode)”Required when AGENTCUBE_AUTH_MODE=internal — the connector verifies a Context-Engine-issued JWT instead of running its own OAuth (Layer 1). Internal mode also requires the Oracle token exchange variables.
| Variable | Required | Description |
|---|---|---|
AGENTCUBE_INTERNAL_ISSUER | Yes | Expected iss claim of CE-issued internal JWTs. Must equal the Context Engine’s AGENTCUBE_CE_OIDC_BASE_URL exactly (e.g., https://{ce_hostname}, no trailing-slash difference). |
AGENTCUBE_INTERNAL_AUDIENCE | Yes | The aud claim this connector accepts on CE-issued internal JWTs. Set it to the audience you gave this connector in the Context Engine, for example {connector_url}. It also accepts a comma-separated list; use two values only while moving a connector from the shared audience to its own (see Upgrades). |
AGENTCUBE_INTERNAL_JWKS_URL | Yes | CE’s JWKS endpoint (RS256 public keys): https://{ce_hostname}/.well-known/jwks.json |
AGENTCUBE_INTERNAL_JWKS_CACHE_TTL | No | How long the connector caches the JWKS, in seconds. Default 3600. |
Legacy connector OIDC (oidc mode, Layer 1)
Section titled “Legacy connector OIDC (oidc mode, Layer 1)”Required when AGENTCUBE_AUTH_MODE=oidc — the connector terminates the MCP OAuth flow itself. Most deployments use internal mode (above) instead.
| Variable | Required | Description |
|---|---|---|
OIDC_PROVIDER | No | oidc (generic, the default) or azure (Entra) |
OIDC_CONFIG_URL | Yes* | OIDC discovery URL (e.g., Entra .well-known/openid-configuration) |
OIDC_TENANT_ID | With azure | Entra directory (tenant) ID |
OIDC_CLIENT_ID | Yes | App registration client ID (Layer 1 — not the OCI client ID) |
OIDC_CLIENT_SECRET | Yes | App registration client secret |
OIDC_BASE_URL | Yes | Public URL of this connector (e.g., https://{connector_host}) |
OIDC_SCOPES | No | Comma-separated OAuth scopes. Defaults to openid,profile,email. |
OIDC_JWT_SIGNING_KEY | No | Key used to sign the session tokens the connector issues to MCP clients |
*OIDC_CONFIG_URL is required unless OIDC_PROVIDER=azure, which uses OIDC_TENANT_ID instead. oidc mode also requires the Oracle token exchange variables below.
Connector — Oracle Token Exchange (Layer 2)
Section titled “Connector — Oracle Token Exchange (Layer 2)”Set on each connector that uses internal or oidc mode, regardless of identity provider. For an SSO call, the connector exchanges the user identity the Context Engine validated for a user-scoped Oracle access token.
| Variable | Required | Description |
|---|---|---|
AGENTCUBE_SIGNING_KEY_BASE64 | Yes* | Base64-encoded RSA private key for JWT signing |
AGENTCUBE_SIGNING_KEY_PATH | Yes* | Path to PEM file (alternative to BASE64) |
AGENTCUBE_SIGNING_KID | No (default agentcube-mcp) | Alias of the certificate in OCI trusted partner certificates. Must match the alias you uploaded. |
OCI_TOKEN_ENDPOINT | Yes | OCI Identity Domain URL (e.g., https://idcs-{guid}.identity.oraclecloud.com:443) |
OCI_CLIENT_ID | Yes | OCI confidential application client ID |
OCI_CLIENT_SECRET | Yes | OCI confidential application client secret |
OCI_RESOURCE_SCOPE | Planning/FCCS: Yes; Essbase: No | Scope requested in the token exchange: urn:opc:serviceInstanceID={service_instance_id}urn:opc:resource:consumer::all. Without it, Oracle rejects Planning and FCCS SSO calls. See OCI Identity Domain for the Oracle-side setup. |
*Either AGENTCUBE_SIGNING_KEY_BASE64 or AGENTCUBE_SIGNING_KEY_PATH must be provided. BASE64 is recommended for container deployments.
Example Configurations
Section titled “Example Configurations”# Set on the Essbase admin connectorAGENTCUBE_CONNECTOR_MODE=adminAGENTCUBE_AUTH_MODE=delegated_basicESSBASE_SERVER_URL=https://{essbase_host}# No ESSBASE_USERNAME / ESSBASE_PASSWORD: enter the service-account# credentials when you register this connector in the Context Engine# Core (always required)AGENTCUBE_CE_DATABASE_URL=postgresql://{db_user}:{db_password}@{db_host}:5432/{db_name}AGENTCUBE_CE_CREDENTIAL_KEY={credential_key}AGENTCUBE_CE_ADMIN_USERNAME={admin_username} # first start only; remove after the first admin signs inAGENTCUBE_CE_ADMIN_PASSWORD={initial_admin_password} # first start only; remove after the first admin signs inAGENTCUBE_CE_INTERNAL_SIGNING_KEY={pem_rsa_private_key} # required when any connected system uses auth mode internal# Set on the Context Engine — inbound Layer 1AGENTCUBE_CE_AUTH_MODE=oidcAGENTCUBE_CE_OIDC_PROVIDER=azureAGENTCUBE_CE_OIDC_CLIENT_ID={entra_client_id}AGENTCUBE_CE_OIDC_CLIENT_SECRET={entra_client_secret}AGENTCUBE_CE_OIDC_TENANT_ID={entra_tenant_id}AGENTCUBE_CE_OIDC_BASE_URL=https://{ce_hostname}# Core (always required)AGENTCUBE_CE_DATABASE_URL=postgresql://{db_user}:{db_password}@{db_host}:5432/{db_name}AGENTCUBE_CE_CREDENTIAL_KEY={credential_key}AGENTCUBE_CE_ADMIN_USERNAME={admin_username} # first start only; remove after the first admin signs inAGENTCUBE_CE_ADMIN_PASSWORD={initial_admin_password} # first start only; remove after the first admin signs inAGENTCUBE_CE_INTERNAL_SIGNING_KEY={pem_rsa_private_key} # required when any connected system uses auth mode internal# Set on the Context Engine — inbound Layer 1AGENTCUBE_CE_AUTH_MODE=oidcAGENTCUBE_CE_OIDC_PROVIDER=oidcAGENTCUBE_CE_OIDC_CONFIG_URL=https://{idp_host}/.well-known/openid-configurationAGENTCUBE_CE_OIDC_CLIENT_ID={idp_client_id}AGENTCUBE_CE_OIDC_CLIENT_SECRET={idp_client_secret}AGENTCUBE_CE_OIDC_BASE_URL=https://{ce_hostname}# Set on the Planning user connector (FCCS: same, with FCCS_SERVER_URL)AGENTCUBE_CONNECTOR_MODE=userAGENTCUBE_AUTH_MODE=internalPLANNING_SERVER_URL=https://{planning_host}# Layer 1: trust the Context Engine's internal tokensAGENTCUBE_INTERNAL_ISSUER=https://{ce_hostname}# The audience you set for this connector in the Context EngineAGENTCUBE_INTERNAL_AUDIENCE={connector_url}AGENTCUBE_INTERNAL_JWKS_URL=https://{ce_hostname}/.well-known/jwks.json# Layer 2: Oracle token exchangeAGENTCUBE_SIGNING_KEY_BASE64={base64_private_key}AGENTCUBE_SIGNING_KID={oci_cert_alias}OCI_TOKEN_ENDPOINT=https://idcs-{guid}.identity.oraclecloud.com:443OCI_CLIENT_ID={oci_client_id}OCI_CLIENT_SECRET={oci_client_secret}OCI_RESOURCE_SCOPE=urn:opc:serviceInstanceID={service_instance_id}urn:opc:resource:consumer::all