Environment inventory
This page lists the configuration values Cloud Agent reads: which component reads each one, its default, and where to set it. Where the application default differs from the supported Compose deployment, both are given.
A deployment needs no hand-written configuration. A new control plane starts
without a .env (Settings and bootstrap configuration),
and Admin → Servers → Add server writes each host’s configuration
(Compute resources). The variables below
are optional overrides. For local setup, start with the
developer guide; the
release contract describes the packaged artifacts.
Keep deployment values outside this public repository.
Keep secrets in the operator’s private environment or unit files, or in read-only key mounts, and back them up with the data they protect. Keep real identifiers, hostnames, port allocations, tunnel topology and app registrations in the private deployment overlay. Public examples use placeholders such as
agents.example.org.
Settings and bootstrap configuration
Set a value where it belongs:
Admin → Settings: application behavior, integration URLs and credentials, web appearance, operational intervals, upload and skill limits, task titles, and global sandbox and workspace limits.
A server’s page under Servers: sandbox and workspace values for that server only.
Deployment files: bootstrap configuration, which gives access to the database or configures processes outside the control plane.
Bootstrap configuration covers database access, the settings encryption root
(AGENT_SETTINGS_ENCRYPTION_KEY),
recovery access (ADMIN_TOKEN), host enrollment and sandbox manager
provisioning, networking, tunnels and listeners, host isolation, image and
build routing, mounted paths, and trusted compute deployment profiles.
Deployment keys
A new installation has no .env and no keys to make up. The values the stack
needs before it can read a setting (AGENT_DATABASE_URL,
AGENT_POSTGRES_PASSWORD, AGENT_LOCAL_SESSION_SECRET and
AGENT_SETTINGS_ENCRYPTION_KEY) live in the agent-keys Docker volume, one file
each, readable only by the user that needs it. The Compose keys service
(cloud_agent.deployment.deployment_keys) runs before anything that needs one:
The value is |
The |
|---|---|
Set in the environment or |
Stores it. After one start you can delete the line. |
A settings root that differs from the stored one |
Stops the start: the stored root may be the only copy of the key every saved secret needs. |
Already stored |
Keeps it. |
Missing, and the bundled database volume holds no database |
Generates it. |
Missing, with an existing database or an |
Stops the start and names what to set. A missing settings root is only a warning: the control plane then reports the key as missing setup. |
|
Stops the start: it is no longer read as the settings root. Set |
Each control-plane process fills these variables from their files when the
environment leaves them unset, so docker compose exec and docker compose run
see them too; Postgres reads its password through POSTGRES_PASSWORD_FILE.
Back the keys up apart from the database
(Disaster recovery). This command prints
them as single-quoted .env lines that restore them byte for byte on another
machine (unquoted, Compose would read a $ as interpolation):
docker exec <project>-control-plane-1 python -m cloud_agent.deployment.deployment_keys export
The control plane then creates its first settings row with random
AGENT_CONTROL_TOKEN_SECRET, AGENT_SOURCE_CONTROL_ENCRYPTION_KEY,
AGENT_COMPUTE_SECRET_KEY and AGENT_SANDBOX_MANAGER_TOKEN values where the
environment supplies none. Server setup writes that sandbox manager credential
into each host it deploys. An existing settings row never gets generated values.
Saved settings
Saved settings live in the Agent database and stay in force across restarts.
A row marked Initial import is such a setting: its environment value is
imported once, and later .env changes are ignored.
Run alembic upgrade head before starting this release; the
upgrade notes say what an upgrade needs. The main listener then imports the
settings from its environment. On an upgrade it imports only fields a new
migration added and never overwrites a saved value, even an empty one. The
other listeners wait for that import and use the same saved values.
After that, edit values in Admin → Settings. Reset restores the built-in default (empty for a credential), never an old environment value. Listeners pick up changes within five seconds, and the web server reads saved appearance on every request, with no rebuild or restart. Existing user and compute encryption keys cannot be replaced or reset in the editor; that needs a separate re-encryption procedure.
The Settings page shows missing required fields and incomplete integrations.
A new deployment’s first administrator signs in with the one-time setup code
the control plane logs and completes them there. When no administrator can sign
in, an operator with ADMIN_TOKEN can open /setup, which uses the same
audited settings API and keeps the token in page memory only.
Host sandbox and workspace settings have their own precedence (Sandbox settings from the admin pages), and sandbox archives are configured in Admin only (Sandbox archives).
Sandbox Manager naming
The service is Sandbox Manager (sandbox-manager in Compose,
cloud_agent_host.sandbox_manager in Python), configured by the
AGENT_SANDBOX_MANAGER_* variables. A few old names stay on purpose: the
broker_url database column (the API takes a host’s address only as
sandbox_manager_url), the storage keys of the two saved settings, the
telemetry producer ID, and the paths /var/lib/freeinference-broker (in
retained sandboxes) and /var/lib/hybridinference/broker-archives (in the
manager), which hold lifecycle fences and pending deletion receipts.
The one rule
The HybridInference Gateway’s
API_KEY_SECRETandJWT_SECRET_KEY, and its database credentials, must never appear in this repository, in its configuration, or on any host that runs it.
Cloud Agent keeps its own accounts and signs its own tokens with its own secrets; it does not depend on the Gateway. An SMTP credential an operator chooses to share is configuration: keep it in the operator’s secret store, never in this repository.
Local development tools
Local tooling reads these; they are not saved settings.
Variable |
Value / who provisions |
|---|---|
|
Optional log directory for |
Local and CI permission regression
AGENT_PERMISSION_TEST_IMAGE turns on the opt-in Linux UID regression in
tests/external/test_shared_member_permissions.py. It names an already-pulled
Docker image with Python 3 and GNU find/stat, such as python:3.12-slim:
AGENT_PERMISSION_TEST_IMAGE=python:3.12-slim \
uv run pytest -q -m external tests/external/test_shared_member_permissions.py
The test runs the production normalizer as separate member UIDs without capabilities, in disposable containers with no network or mounts. CI runs it before deployment; it needs no model API key or deployed service.
Local and CI restore regression
AGENT_RESTORE_TEST_IMAGE names the base image for
tests/external/test_checkpoint_restore_roundtrip.py, python:3.12-slim by
default; pull it first. In real Docker, the test stops a chat container as the
Sandbox Manager does, checkpoints it, loads the checkpoint as a later generation
and starts it through the archive start fence; only S3 is a local file:
uv run pytest -q -m external tests/external/test_checkpoint_restore_roundtrip.py
CI runs it before deployment; it needs no S3 bucket, model API key or deployed service.
Control plane (cloud_agent)
Database
Variable |
Value / who provisions |
|---|---|
|
Postgres DSN of a database only Cloud Agent uses. A new deployment starts on an empty one. A database from before the independent-accounts release is refused and kept as an archive (cutover). |
|
The bundled |
|
The bundled Postgres’s page cache, |
|
The bundled Postgres’s |
|
The bundled Postgres container’s |
|
Read by |
The bundled postgres service also sets work_mem=16MB,
checkpoint_timeout=15min, wal_compression=lz4 and random_page_cost=1.1
on its command line
(why each), and leaves durability
at PostgreSQL’s defaults. Command-line settings override postgresql.conf
and ALTER SYSTEM, so neither changes these four, nor shared_buffers and
max_wal_size, which only their variables set; a changed variable restarts
Postgres on the next deploy. A database setting does override work_mem and
random_page_cost, for example
ALTER DATABASE cloudagent SET work_mem = '64MB' on the database
AGENT_POSTGRES_DB names, or random_page_cost = 4 on a spinning disk. It
applies to connections opened after it, so restart the control-plane services
to apply it at once.
pgAdmin database administration
The optional pgadmin Compose profile adds Admin → Database → Open pgAdmin.
The service has no published port. Every request needs a current agent.admin
decision, and pgAdmin asks for its own login too. Its accounts, sessions and
saved connections persist in agent-pgadmin.
Variable |
Value / who provisions |
|---|---|
|
Initial import, as Private pgAdmin URL: the private origin, |
|
Initial import. Optional public proxy URL ending in |
|
Required for dashboard setup. |
|
Required for dashboard setup. Private origin used only to initialize the bundled service, normally |
|
Optional. Public proxy URL for first-time setup, ending in |
|
Optional. Startup wrapper that waits for dashboard setup, then runs pgAdmin’s entrypoint. Defaults to the bundled |
|
Optional. Read-only server definitions, imported on first initialization. The bundled |
|
Optional. pgAdmin Python boolean, default |
Public addresses
Variable |
Value / who provisions |
|---|---|
|
Initial import. Public web-app URL, for example |
|
Initial import. This API’s public base URL with its prefix, for example |
Retired Gateway variables
Cloud Agent no longer supports HybridInference Gateway sign-in, admission or
inference. Each variable below is refused: the control plane stops at startup
and names it, and deploy/control-plane/deploy.sh stops before pulling
anything (cutover).
Variable |
Status |
|---|---|
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
~~ |
removed, refused |
Own secrets
Variable |
Value / who provisions |
|---|---|
|
The settings root key, at least 32 bytes, which encrypts the secrets saved in Admin. Every listener must use the same root; keep it with every database backup. Changing it requires re-encrypting the saved settings first. The |
|
Initial import, generated into the first settings row when unset. Encrypts the credentials users store, each kind in its own domain: source-control credentials, MCP connections, environment variables and Secrets, SSH server keys and model connection keys. The control plane refuses to start without it. Use 32 random bytes, unique per environment; a shorter value saved earlier still loads, and startup logs |
|
Initial import, generated into the first settings row when unset. Signs host and worker control tokens. Use 32 random bytes, unique per environment; a shorter value saved earlier still loads, and startup logs |
|
Initial import. Isolation policy for new conversations. Application default |
|
Initial import. An operator-owned JSON webhook for queue incidents and recoveries (queue monitoring) and compute replacement events. Unset, events go only to the structured logs. Payloads carry the event, deployment SHA and aggregate counts; compute events add the Host identity and reason codes. Delivery times out after five seconds. The URL never reaches runners or sandboxes. |
|
Initial import. How long a member’s live-process residency survives between host heartbeats, default 1800 seconds. It governs credential and process ownership only: |
|
Optional machine-to-machine admin credential, and the way into |
Accounts
Every control-plane listener reads AGENT_LOCAL_SESSION_SECRET from the process
environment only. Every other variable here is the initial value of a setting in
Admin → Settings → Accounts, imported once and edited there afterwards. Saved
secrets are encrypted and never shown again. See
accounts.
Variable |
Value / who provisions |
|---|---|
|
Required: at least 32 random bytes; the |
|
Defaults to on. |
|
Defaults to |
|
|
|
Mail administrators when a sign-up waits for approval (default on). Recipients are the comma-separated list, or every local administrator with a verified email when it is empty. |
|
Optional link to the Terms of Service the sign-up forms ask every new account to accept. Acceptance is required either way. |
|
Phone sign-up, sign-in and binding with a code sent by text message. Off ( |
|
Digits prepended to a number typed without |
|
Tencent Cloud CAM credentials of the |
|
The Tencent SMS application, its approved signature and its approved template, which takes the code and its lifetime in minutes. Region defaults to |
|
Cloudflare Turnstile for sign-up and phone codes. With no secret key nothing is checked; with one, a missing or rejected token, or no answer from Cloudflare, refuses. |
|
Comma-separated, as HybridInference’s |
|
Plain-text Terms of Service shown at |
|
Lifetime of a new sign-in, default 30 days, never extended by use. |
|
Sign-in windows: per account per address (5, also a recognized browser’s own window), per account from every address (50, counting only attempts the per-address windows let through) and per address (20 an hour). |
|
Sign-ups per client address, 5 an hour and 10 a day. |
|
Sign-ups whose client address is unknown share one budget, 5 an hour and 10 a day. With the first set to |
|
|
|
Tencent SES region ( |
|
Approved SES template ids (0: none). Verification and password reset are required; any other mail without its own template goes through the notice template. |
|
Mail relay for verification, password-reset and address-change links and the account notices. Port defaults to 587, or 465 with |
|
|
|
Optional relay credentials. Never logged. |
|
Sender address of account mail, e.g. |
Sandbox archives
Automatic lifecycle archives and Archive to S3 and delete share one policy,
set only in Admin → Settings → Sandbox; no environment variable sets it or
its destination. Archives go to s3://<bucket>/cloud-agent/sandbox, and the
bucket defaults to freeinference. The policy holds the bucket, region, upload
size limits, and either an AWS access key, whose secret is encrypted with the
settings key and never returned by the admin API, or workload identity fields
(a customer-managed KMS key ARN and the expected bucket owner). Without an
access key, sandbox managers use the standard AWS SDK credential chain. Each
Sandbox Manager keeps the local state of both, restorable checkpoints included,
in AGENT_SANDBOX_ARCHIVE_STATE_DIR. See
Sandbox archives for IAM,
bucket versioning and rollout.
Variable |
Value / who provisions |
|---|---|
|
Optional. Absolute path to a private Compose override, kept outside the checkout and limited to the main |
Standard AWS SDK credentials |
Needed only when the policy has no saved access key: the main control plane then signs and verifies deletion archives through the SDK chain, preferably with an IAM workload role. The base Compose file forwards no AWS variables, so put environment or shared-profile credentials in |
Sandbox archive storage lists the permissions, retention and verification requirements.
Behaviour switches read by the control plane
Variable |
Value / who provisions |
|---|---|
|
Read by |
|
Where the edge listens; defaults |
|
Compose main-API binding, defaults |
|
Compose MCP-only listener binding, defaults |
|
Compose model relay binding, defaults |
|
Compose web-server binding, defaults |
|
Host-side nginx configuration mounted read-only by the edge service. Default |
|
Host-side directory of site content files mounted read-only by the control plane at |
|
Control-plane Compose network name, default |
|
Initial import, default on. Set |
|
Initial import. Saved as Serve API documentation in Admin → Settings → Operations, under Advanced; default off, checked on every request. On, the main API serves |
|
Initial import. Saved as Live streams per account in Admin → Settings → Operations, under Advanced (default |
|
Initial import, default off. Set |
|
Initial import. Saved as Agent package registry in Admin → Settings → Agent versions; empty is |
|
The exact commit this API serves. The production Compose stack requires it and |
Source control
Every variable here except AGENT_GITHUB_APP_PRIVATE_KEY_PATH and
AGENT_GITHUB_APP_PRIVATE_KEY_FILE is an initial import into Admin → Settings
→ Source control (AGENT_GITHUB_API under Advanced).
Variable |
Value / who provisions |
|---|---|
|
The GitHub App used for repository access. Setting it turns on key loading; an unreadable key makes GitHub unavailable and is retried every 30 seconds. Set the App’s Callback URL for this deployment; it needs no Setup URL (credentials). |
|
GitHub App OAuth client ID for users connecting their own GitHub account. |
|
GitHub App OAuth client secret. Store outside Git; rotate when changing the App’s audience. |
|
Bootstrap. Path inside the container to a read-only PEM key; the supported Compose file mounts it at |
|
Host-side key file mounted read-only by control-plane Compose at |
|
Inline PEM, imported once where a deployment already supplies it. Compose does not forward it. Set or replace an inline key in Admin Settings, where it is encrypted and never returned to the browser. |
|
|
|
The co-author agents name in their commits, as |
|
Default |
|
GitLab.com OAuth application client ID for user connections. The application needs only the |
|
GitLab.com OAuth client secret; store outside Git. |
|
Public OAuth callback URI registered with GitLab, normally |
|
Comma-separated |
MCP
Cloud Agent owns MCP discovery, per-user credentials, authorization and attempt
fencing. Users add remote URLs, imported mcpServers snippets or stdio launch
specs; templates only prefill the form, and environment variables neither add
servers nor grant access to them. Credentials live per user in
agent_mcp_connections, encrypted with
AGENT_SOURCE_CONTROL_ENCRYPTION_KEY. The public base URL,
GitHub sign-in and both ALLOW switches below are initial imports into
Admin → Settings → MCP, all but GitHub sign-in under Advanced; the switches apply to new MCP transports after the MCP
listener restarts. The MCP tunnel is a host setting
(Tunnels and relays).
Variable |
Value / who provisions |
|---|---|
|
Optional override of the public API base for MCP OAuth callbacks, including the API prefix, for example |
|
Optional legacy import for GitHub MCP browser sign-in. Register a service-owned GitHub OAuth App or GitHub App with callback |
|
Whether a user-added MCP connection may dial private and loopback addresses. Off by default: a connection that reaches loopback reaches this service. Turn it on only for MCP servers on a private network you trust. The ranges the platform never dials, such as the cloud metadata service, stay refused. |
|
Whether a user-added MCP connection may use |
|
Not operator-set. The runner publishes the relay endpoints under this name, as one JSON object of |
|
Not operator-set. The generated sandbox runtime config references |
Model connections
Variable |
Value / who provisions |
|---|---|
|
Whether owners may add model connections (OpenAI Chat Completions or Responses, Anthropic Messages) and start turns on them, and whether turns start on connections the deployment provides. On unless set to |
Web search
Variable |
Value / who provisions |
|---|---|
|
Optional initial import. Provider behind the built-in |
|
Optional initial import. Provider keys for the built-in |
Sandbox settings from the admin pages
These host settings are set from the admin pages, not in each host’s .env:
AGENT_TIMEOUT_S, AGENT_LEASE_TTL, AGENT_CHAT_IDLE_TIMEOUT_S,
AGENT_SOURCE_IMPORT_MAX_MIB, AGENT_SHARED_RESIDENT_CAPACITY,
AGENT_STORAGE_MIN_AVAILABLE_MIB, AGENT_SANDBOX_CPU_MILLICORES,
AGENT_SANDBOX_MEMORY_MIB, AGENT_SANDBOX_DISK_MIB,
AGENT_TERMINAL_IDLE_TTL_SECONDS, AGENT_TERMINAL_HARD_TTL_SECONDS,
AGENT_TERMINAL_MAX_SESSIONS and the limits in the table below. Admin →
Settings → Sandbox sets a value for every server (PUT /admin/agent/host-settings),
with the terminal, workspace and storage limits and Turn lease under
Advanced, and a server’s details on Servers set one for that server alone
(PUT /admin/agent/runner-hosts/<host>/settings). A host uses, highest first:
the value set for that server;
the value set for every server;
the built-in default.
Each heartbeat answer carries the complete effective values, so a host applies a
change within about 30 seconds, without a redeploy; clearing a value falls back
to the next level. A host’s environment values apply only until its first
settings answer. Its first complete heartbeat also imports its non-default values
once as that server’s values, unless an administrator has already set or reset
them. The registry, units and bounds are in
cloud_agent_shared/host_settings.py;
the bounds are typo guards, not capacity statements.
Nothing running is interrupted. A turn keeps the time limit it started with, and a sandbox keeps the session capacity and CPU, memory and disk limits it was created with; Fork members share them. The sandbox manager applies terminal limits from its next sweep. The page shows a value as applying until the host confirms it.
CPU is entered in vCPU and stored in millicores (1 vCPU = 1000); memory and disk
take MiB or GiB. The defaults are AGENT_SANDBOX_CPU_MILLICORES=2000,
AGENT_SANDBOX_MEMORY_MIB=4096 and AGENT_SANDBOX_DISK_MIB=0 (no disk quota).
A positive disk limit sets Docker’s --storage-opt size=<MiB>M on the writable
layer: the workspace, caches and installed files, not the image or memory-backed
temporary files. It needs Docker overlay2 on XFS mounted with project quotas
(pquota or prjquota); otherwise Docker refuses to create the container. A
positive limit is recommended on every server that runs untrusted-kata-v1,
whose sandboxes otherwise share one unbounded disk. A server at 0 still takes
untrusted work; it logs a warning, and the Servers page shows No container
disk quota. Apart from this limit, disk is guarded only at admission, by
AGENT_STORAGE_MIN_AVAILABLE_MIB.
Variable |
Initial default / purpose |
|---|---|
|
4 open terminals per shared workspace. |
|
60 seconds for workspace commands and Git inspection. |
|
2 MiB for one workspace file replacement. |
|
512 KiB for one file preview. |
|
2 MiB of workspace command output. |
|
5,000 entries per directory listing. |
|
1,024 MiB for one whole-workspace download, measured before compression. |
|
2 MiB / 4,096 events retained for terminal reconnects. |
|
32 MiB of output over one terminal’s lifetime. |
|
64 KiB of input per terminal request. |
|
4 concurrent viewers per terminal. |
The Sandbox Manager runs at most 16 workspace commands and Git inspections at once per host and 4 per workspace; one more is refused with 429. A command that times out or overflows its output limit is stopped with its own process group, so other sessions and terminals in the shared container keep running. A native CLI record over 8 MiB stops its member process. Events are capped at 256 KiB, and text Postgres cannot store (a NUL or an unpaired surrogate) becomes U+FFFD.
Optional compute-resource management
These values belong only to the stable main control plane, not its MCP-only listener, any Host or any sandbox. See the compute runbook for deployment profiles, verified SSH access and CloudLab setup. Without them, manual Host management still works.
Variable |
Meaning |
|---|---|
|
Where automatic Server setup looks for this release’s sandbox image, |
|
Initial import, generated when unset: the key, at least 32 bytes, for stored compute connections and Admin-managed deployment profiles, itself stored encrypted under the settings root key. Later |
|
First-time Server setup address of the service node. The supported deployer defaults it to the node’s FQDN, else its hostname; set it for another deployment system or SSH alias. Saved setups take precedence. |
|
Initial import. CloudLab’s HTTPS Portal API, |
|
Initial import. Optional HTTPS address new CloudLab nodes post their SSH host keys to, ending in |
Host agent (cloud_agent_host)
The stack’s own identity
deploy/host/deploy.sh and deploy/host/sandbox_host.sh read these, not
Compose: they name the stack rather than configure it.
Variable |
Value / who provisions |
|---|---|
|
Required host-stack project name, with no host default. It prefixes containers, images and networks, and reusing a name lets a second deployment recreate the first stack, so give sibling environments distinct names such as |
|
Host path for enrollment state and readiness markers; host Compose default |
|
Compose shutdown windows, defaults |
|
Comma-separated projects on this machine that belong to the other environment. The deploy guard reports containers shaped like this stack under any project it does not know, so name each legitimate sibling here. Setting it makes |
|
Seconds the deploy scripts wait for the two parallel rollout halves, default 900: the host for cold-start MCP and control endpoints, the control deploy for a fresh exact-SHA heartbeat and reverse sandbox manager probes. A rollout watchdog, not a chat timeout. |
Scheduling
Variable |
Notes |
|---|---|
|
What |
|
Attempt lease length, default 120 seconds. Host bootstrap: the admin Turn lease setting (41 to 900 seconds, for all servers or one) replaces it from the next heartbeat, and a host imports this value once as its own server setting. A turn renews with the lease it was claimed with. See Runner lease failures. |
|
Hard limit on one running Agent CLI turn, default 3600 seconds. Reaching it fails and fences the turn; it has nothing to do with chat idleness or the sandbox lifecycle. The admin pages override it. |
|
Execution environment name redeemed by |
Sandbox Manager, runtime and reporting
Variable |
Notes |
|---|---|
|
How a runner reaches its sandbox manager, normally the Compose service URL. The control plane always finds a sandbox manager through the attempt’s enrolled host row, never through this. |
|
The sandbox manager URL the runner reports at enrollment, when it differs from the one it dials. |
|
The pool-wide sandbox manager credential: the control plane and every host hold the same value. The control plane generates it into its first settings row (or imports it), and server setup writes it into each host. Host records hold URLs, not separate credentials, so a compromised host’s token authenticates to every other sandbox manager. When provisioning by hand, compare SHA-256 fingerprints rather than display the secret; a mismatch shows as 401 answers. |
|
Required reverse listener for a standalone host. Bind the control plane’s stable Docker bridge gateway address, never loopback or |
|
Host-side target of that reverse forward, defaults |
~~ |
removed, refused by the host: the inference tunnel is gone. |
~~ |
removed, refused by the host. |
|
Initial import. Comma-separated allowlist of the addresses hosts may register as their sandbox manager, which then receive the pool credential. A bare hostname admits that host on any scheme and port; a |
|
Runner URL for registration, claims and heartbeats. Standalone Compose derives it from the main-API tunnel alias |
|
Worker-name prefix, default |
|
Base the trusted runner builds source clone URLs from, default |
|
Largest repository a new chat’s first turn may import, in MiB; default 1024, accepted 1 to 65536. It counts the working tree and the fetched commit’s Git objects, which store most content a second time, so 600 MB of files can already exceed 1024. Past it the turn fails before the agent starts with |
|
Closes an interactive terminal after this long with no input or output, default 1800 seconds. It never stops the chat container. The admin pages override it. |
|
Longest lifetime of one terminal, even while in use, default 8 hours; it bounds how long a terminal’s credentials stay exposed. The admin pages override it. |
|
Interactive terminals the sandbox manager holds open at once across all chats, default 64, accepted 1 to 4096. The admin pages override it. |
|
Expected daemon |
|
Where the Sandbox Manager sees containerd’s content store, read-only. Code and host Compose default |
|
Attachment-import receipts, shared read-write by the runner and sandbox manager. Host Compose sets |
|
Sandbox Manager-only directory for stopped-container exports, deletion receipts and checkpoint state ( |
|
Member slots (separate UIDs and private tmpfs) built into each new shared container, default 8, accepted 2 to 128. Fork reserves a free slot first. It bounds the chats in one group; |
|
The one inactivity clock for a retained chat group, default 1800 seconds. Turns, file and Git operations and terminal activity all advance it. When it expires, the host runs |
|
One-time enrollment token, minted at |
|
Where the host credential persists, written mode 0600. The code default is |
|
The rolling-deployment fence, managed by the deploy scripts; never set them to choose behavior. |
|
How many turns this host runs at once until an admin sets a number on the Servers page ( |
|
Free-text version for the pool listing; never a compatibility gate. |
|
Whether the runner samples its Docker host’s CPU, memory and retained-container count for the Servers page; default on, |
|
How the Servers page’s Storage column measures the filesystem under the sandbox writable layers. |
|
Free space a host keeps for new sandboxes, in MiB; default 1024, accepted 1 to 1048576. Before a turn creates a sandbox, the runner reads available space through the attested storage probe and declines the turn when less remains; its launch error suggests freeing storage or changing this setting. Existing sandboxes still resume. Unknown or unverified capacity never counts as pressure. An admission guard, not a quota (storage measurement). The admin pages override it. |
|
Log level, default |
|
|
|
The static run environment mode collects for, as a JSON descriptor: |
|
Optional JSONL path for finished measurements, which are logged as well. Delivery to Postgres and Admin does not need it. |
|
Optional override of who controls collection: |
|
Which deployment’s control row this control plane commands, default |
The Compose files pass these through to each producer. Collection starts
disabled on a fresh database. The Turn on/Turn off switch on
Admin → Measurements controls the persisted run without a restart, and a
restart resumes an unexpired run. While collection is disabled no operation
reads the database, though the background policy sync still runs. A run started
from the page collects until it is turned off, with no sample cap
(budget_scope=unlimited) beyond bounded export queues, and a host that cannot
sync keeps collecting until sync resumes. A timed run started through the Admin
API is capped per process by max_operations
(budget_scope=producer_instance).
Tunnels and relays
A host reaches the control plane only through SSH tunnels, each with its own narrowly restricted key.
Variable |
Notes |
|---|---|
|
MCP-only SSH tunnel. Required suffixes: |
|
The relay’s alias on both container networks. Defaults to |
|
Host only. The MCP relay as this host’s sandboxes reach it. Host Compose derives it from the MCP tunnel ( |
|
Runner-only SSH tunnel to the main API. Required suffixes: |
|
That tunnel’s alias, on the runner network only. Defaults to |
|
Host only. The GitHub relay CA’s certificate on this host, made by |
|
The GitHub relay’s SSH tunnel, started by the |
|
Host only; written by Admin → Servers → Add server. Where this host’s sandboxes reach the model relay: |
|
Written by Add server. The model relay’s SSH tunnel. Its |
Physical servers and execution environments
AGENT_RUNNER_HOST identifies one enrolled execution environment. Two stacks on
one physical server that talk to one control plane need distinct names,
credentials, state roots and sandbox manager URLs. Do not rename or re-enroll an
existing environment to merge its retained chats with another.
AGENT_PHYSICAL_HOST names the physical server in the admin inventory: give
every environment on it the same name, unique within the control plane.
deploy/host/sandbox_host.sh defaults it to the short hostname; direct Compose
deployments must set it. Runners send it at registration and on each heartbeat
(labels.physical_host). Set it before host activation and follow the
rolling deployment order.
The Servers table shows, for each physical server, the executor that matches the new-chat execution policy. Keep one placement executor per physical server, and retire extra old deployments once their retained conversations are no longer needed. Slots are an environment’s concurrency limit, not GPU counts. The global sandbox location is described in Compute resources.
Sandbox isolation (host agent reads, sandbox inherits)
Variable |
Notes |
|---|---|
|
Defaults to |
|
Unset selects |
|
Required sandbox image, with no application default. Use distinct tags for sibling environments, such as |
|
|
|
Required. Stable deployment namespace stamped onto retained containers and group bridges, so sibling stacks on one Docker daemon cannot discover, stop or prune each other’s chats. It also names this deployment’s nftables table and bridge-interface prefix; a runner or sandbox manager without one refuses to start. The host stack uses its Compose project; the complete local stack derives it from |
|
Docker executable used by the host backend, default |
|
Sandbox user home, default |
|
Sandbox non-root identity, defaults |
|
Additional Docker arguments parsed with |
|
Isolation escape hatch. It only opens the |
|
Required. This deployment’s RFC1918 IPv4 pool; Docker allocates one |
|
Required. The one IPv4 resolver sandboxes may use, on TCP and UDP 53. It is the only exception to the protected ranges, so a site resolver on a private address, or on this host, works. Under runc Docker’s embedded resolver forwards to it; a Kata guest is given it in |
|
Comma-separated IPv4 blocks sandboxes must not reach, on top of the built-in host, private, link-local/metadata, CGNAT, multicast and reserved ranges, for example an institution’s services on public addresses. It can only add protection. The control plane reads the same variable when it checks an owner’s SSH server, so set it there to the hosts’ value. |
|
The route-less network the MCP relay is discovered on; no sandbox joins it. Group lifecycle attaches the relay found here, under its alias, to each group’s bridge. The host stack derives |
~~ |
Removed with the network tiers and the Squid proxy: sandboxes have one network (the sandbox network). Server setup refuses a deployment profile that sets one; nothing else reads them. |
|
Not operator-set. What a host hands the protocol compatibility launcher when Codex or Claude Code runs on a Chat Completions connection: the CLI’s protocol, the upstream URL and key, the model, the member’s loopback token from the claim, and the turn’s reasoning level (sent upstream as |
|
Internal. Generated by the runtime adapter for the private OpenCode/Kilo stdio bridge. Operators must not set these. They select the already-authorized native session and fixed |
|
Internal. Generated by the host plugin installer for pi, OpenCode, and Kilo. A JSON array of absolute paths to the selected plugins installed in the member’s private home; defaults to |
|
Internal. Set by the sandbox manager on a repository environment action it starts in a member’s terminal: the scoped UID (31000–31063) the action runs as. Operators must not set it. |
|
Internal. Passed by the sandbox manager to the wrapper that runs one repository environment script ( |
Kata runtime qualification generation
The supported host deployment mounts /var/lib/freeinference/kata-runtime
read-only at /run/agent-kata-runtime in the runner. After a verified install,
its root-owned epoch.json holds
{ "version": 1, "state": "ready", "generation": "<UUID>" }.
setup_kata_runtime.sh takes a host-wide lock, publishes updating before it
changes the runtime, links or configuration, and publishes a new ready
generation only after installation and verification succeed. A failed update
stays updating; rerun the installer to repair it. --check only verifies.
Every deployment on the host sees the same generation.
On an existing host, deployment verifies Kata and creates only a missing marker;
it never replaces a generation or clears an incomplete update. A missing epoch
means full probes, and a malformed or updating one fails closed. Change the
runtime or its configuration only through the supported installer, so every
runner invalidates qualification before the first changed file.
Complete local stack database recovery
deploy/local/dev.sh keeps the local Postgres password and matching
AGENT_DATABASE_URL in the gitignored deploy/local/.env.local; back it up with
any retained local Docker volume. If the file is missing while the Compose
project still owns agent-postgres, the script refuses to generate a new
password: PostgreSQL applies POSTGRES_PASSWORD only when it initializes an
empty data directory, so a new value cannot unlock the old volume. Restore the
original AGENT_POSTGRES_PASSWORD and AGENT_DATABASE_URL; the script never
deletes the volume or resets its password.
up builds the images first. up and start then start Postgres alone, wait
for it, check the DSN from the control-plane image and run Alembic before
starting the rest.
Claude inference retry policy
For each resident Claude Code process the runtime adapter sets
CLAUDE_CODE_MAX_RETRIES=15 and CLAUDE_CODE_RETRY_WATCHDOG=0. These are fixed
launch settings, not host .env options. The CLI retries transient inference
errors with exponential backoff and jitter within the native turn;
AGENT_TIMEOUT_S still bounds the whole turn, and exhaustion fails the turn
but keeps its native context. See
Runtime boundaries.
Agent CLI version pins (image build)
The five default versions are pinned in both
deploy/sandbox/Dockerfile.agent-sandbox and
apps/backend/cloud_agent_shared/shared_protocol.py. The image installs and
labels them, and runners and the control plane use the matching constants to
decide whether shared-sandbox-v1 may be advertised or claimed, so they are
source pins, not .env settings. Change both together and rerun the agent-loop
conformance suite. The Dockerfile checks each exact version against the
installed binary; a dist-tag (latest) or range (^2.1) fails the build.
Updating an agent without a rebuild. Claude Code, Codex, OpenCode and pi can be updated from the admin Settings page (Agent versions → Update to …). Every host downloads that exact npm release into a local image beside the sandbox image, checks it with one real turn against a model on loopback, and reports progress on its heartbeat. Once every online host holds it, new chats use it and existing chats keep their version; Roll back returns new chats to the previous one. Kilo runs only its pin, a source build carrying a reviewed isolation patch.
Variable |
Notes |
|---|---|
|
Host side of the control-plane row above: the registry a host uses before its first heartbeat answer. Default |
|
The Docker network the download step runs on. Default |
Changing a pin claims that the new version’s event stream still fits its adapter
in cloud_agent_host/runtimes/. tests/external/test_runtime_stream_conformance.py
tests that claim for claude-code only; the other four runtimes have contract
fixtures and adapter unit tests, so their pin changes need careful review. The
suite reads the candidate from the Dockerfile’s ARG line and runs that exact
version with npx against a fake model provider, so put the version on the
ARG line first:
# deploy/sandbox/Dockerfile.agent-sandbox
ARG CLAUDE_CODE_VERSION=2.2.0
# then, from the checkout — no image build and no deployment needed
uv run pytest -m external tests/external/test_runtime_stream_conformance.py
A pass shows that the normalizer understands the version’s events. It does not exercise the deployed image, the sandbox or the dropdown.
Web (apps/frontend/)
Frontend configuration is public and may not contain secrets. Build-time routing settings are baked into the bundle and need a rebuild. Appearance is saved in Admin → Settings and read by the web server per request. Deployment time and release identity are runtime metadata.
Build-time: the image variant
A NEXT_PUBLIC_* variable is substituted into the bundle at next build, so it
must be an ARG in deploy/control-plane/Dockerfile.web and a key under the
web service’s build.args; test_web_build_arguments_are_wired fails
otherwise. Changing one means a rebuild.
The web app is served at the root of its own hostname and calls the control
plane at /api on the same origin, which the edge routes. Path-prefix mounting
is not supported. The build rejects a relative API value other than /api; an
absolute URL is accepted for cross-origin routing.
Variable |
Compose build argument |
Notes |
|---|---|---|
|
Set to |
Browser API base, fixed at |
|
|
Optional build identity, baked in by the deploy script. |
|
|
Optional build identity. |
Runtime: the deployment’s identity
The main control plane imports the first six variables below into Admin →
Settings when it first initializes its settings: set them before the first
start, then change them in Admin. The web server reads the saved values on every
request through GET /v1/agent/site-config, so one image serves any deployment.
A web server without AGENT_CONTROL_PLANE_URL reads them from its own
environment, for standalone development.
Variable |
Notes |
|---|---|
|
Product name in the header and the document title. Empty shows |
|
Optional organisation name beside the product name. Empty hides it. |
|
Link target for |
|
Status page, opened in a new tab from the header. Empty hides the link. |
|
The deployment’s user documentation, opened in a new tab from Help in the account menu and from the My Settings page. Empty hides the link. |
|
Where users reach the deployment’s operators: an http(s) support page, or |
|
ISO timestamp with a timezone for the deployment footer. The control-plane deploy script sets the activation time in UTC and records it in |
The web service also receives AGENT_DEPLOYMENT_SHA for the footer, which shows
the first seven characters with the full commit in a tooltip. Saved URLs and
booleans are validated before an admin update is committed; the standalone
fallback validates them when rendering.
Site content files
A deployment’s Terms of Service, Team page and source link are files in the
deployment’s own repository, not environment variables or Admin settings, so a
change is reviewed there and goes live with the next deployment. Copy the
directory to the control-plane host and point AGENT_SITE_CONTENT_DIR at it.
The control plane picks up a changed file on the next request, without a
restart. Every file is optional:
File |
Contents |
|---|---|
|
Terms of Service in English, plain UTF-8 text; blank lines separate paragraphs. |
|
The same in Simplified Chinese. |
|
|
Any Terms file replaces the AGENT_LOCAL_TERMS_URL and AGENT_LOCAL_TERMS_TEXT
settings, which Admin then shows read-only. Without site.yaml the footer
hides the Team and GitHub links.
source_url: https://github.com/example/cloud-agent
members:
- name: Ada Lovelace
website: https://ada.example.org/ # optional
badge: {en: Lead, zh-CN: 负责人} # optional
roles: # optional, at most 10
- {en: Professor, zh-CN: 教授}
- Visiting scholar # one text for every language
A label is either text or a mapping of en and zh-CN to text. URLs must be
absolute http(s). An unknown key, an invalid value or a file over 256 KiB is
logged as site_content_ignored and the file is treated as absent, so check
the files before deploying them.
Infrastructure (not environment variables)
Decide these per deployment; record the answers in the private overlay.
Domains: one host for the web app and the control-plane API, the API under
/api, for exampleagents.example.organd a staging sibling. The names go inAGENT_WEB_BASE_URLandAGENT_PUBLIC_API_URL.What a sandbox reaches: its MCP relay, the resolver in
AGENT_EGRESS_DNS_SERVERand public IPv4 on TCP 80/443, the same during setup and the agent run. Model calls go to each owner’s provider over that public HTTPS; tool calls stay on the MCP-only listener. A sandbox holds its owner’s provider key for the turn it runs; that exposure is accepted and limited to the owner’s own key and quota.Sandbox image registry: where hosts pull
AGENT_SANDBOX_IMAGEfrom.
Adding a variable
Add a row here, in the right section, marked NEW.
Say who provisions it and whether it differs per environment.
For a secret, say where it is stored, never the value.
Classify it in
tests/support/env_inventory.py.tests/unit/test_environment_inventory.pyandtests/unit/test_env_classification.pyfail on a variable the code reads without a row here or an entry there.