Configure Service
Configure PostgreSQL, Redis, S3 object storage, encryption key rings, outbound network policies, Kubernetes sandboxes, and telemetry in service.toml.
Configure Service by connecting its shared backing stores, supplying persistent encryption keys, and starting your control and worker roles (or --role all). See the settings reference for every field and default.
Sources and precedence
Save settings in service.toml and pass --config service.toml before the subcommand (or set A13N_SETTINGS_FILE). Override individual fields via A13N_<SECTION>__<FIELD> (for example, A13N_WORKER__SLOTS=6); maps, lists, and nested sections take a full JSON value (such as A13N_AUTH__MAIL).
[server]
host = "0.0.0.0"
port = 8000
public_url = "https://agents.example.com"
trusted_proxies = ["10.0.0.0/8"]
[database]
url = "postgresql+psycopg://[email protected]:5432/a13n_service"
[redis]
url = "redis://redis.internal:6379/0"
[objects]
backend = "s3"
bucket = "a13n-service-objects"
region = "us-east-1"
[providers]
return_urls = ["https://agents.example.com/connections/callback"]
[telemetry]
log_format = "json"Start and verify readiness:
a13n-service --config service.toml run --role all
curl --fail --silent --show-error https://agents.example.com/readyzOrganization administrators can see stable release and security notices in Settings → Organization → General. For an offline deployment, set A13N_CONTROL__UPDATE_NOTICES_ENABLED=false to stop the checks against PyPI and GitHub.
Required infrastructure
Every role (control, worker, all) must share the same PostgreSQL, Redis, object store, and encryption keys:
- PostgreSQL (
database.url): Durable state (postgresql+psycopg://); see schema migrations. - Redis (
redis.url): Live output streams, wakeups, rate limits, and monitoring coordination. - Object storage (
objects.*): Usebackend = "local"with a sharedrooton single-host setups, orbackend = "s3"across hosts (addressing_stylesupports"auto","path", or"virtual"for providers like Alibaba Cloud OSS; setAWS_REQUEST_CHECKSUM_CALCULATION=when_requiredif an S3-compatible store rejects streaming checksum trailers). - Encryption keys (
encryption.*): AES-GCM protection for stored credentials, tokens, and mail links. Use either a sharedencryption.key_file(0600) or an explicit key ring:
export A13N_ENCRYPTION__ACTIVE_KEY_ID=primary
export A13N_ENCRYPTION__KEYS="{\"primary\": \"$(openssl rand -base64 32)\"}"To rotate keys, add a new ID to keys and switch active_key_id while retaining older keys to decrypt existing records.
HTTP server, identity, and mail
- HTTP server (
[server]): Setpublic_urlto your external HTTPS origin and list reverse proxy IPs/CIDRs intrusted_proxies. Usecontrol_urlin split deployments when workers reachcontrolover an internal address. - Identity and mail (
[auth.mail]): Configure SMTP alongside encryption keys to email invitations, password resets, and email-change links:
[encryption]
key_file = "/var/lib/a13n/encryption.key"
[auth.mail]
smtp_host = "smtp.example.com"
smtp_port = 587
smtp_security = "starttls"
sender = "[email protected]"Outbound requests
Service requires HTTPS by default for provider, MCP, and webhook destinations. Explicitly allow trusted internal HTTP origins when needed:
[providers]
http_origins = ["http://host.docker.internal:11434"]Per-run destination allowlists can be passed via options.configuration.allowed_hosts (see host rules).
Outbound proxies
Set http_proxy, https_proxy, and no_proxy on each Service process/container for outbound model, MCP, connector, web, and webhook traffic. TLS verification remains enabled unless A13N_OUTBOUND_TLS_VERIFY=false is explicitly set for local debugging (see outbound TLS verification).
Execution
Each worker runs up to worker.slots concurrent attempts (default 128, range 1–1024). Tune related limits together in service.toml:
- Retries & leases:
worker.max_attempts,lease_seconds,authority_seconds. - Delegation & inbox:
worker.child_depth,child_count,control.inbox_count,inbox_bytes. - Retained tools & graceful drain:
tool_executions.max_active(default64),shutdown_grace_seconds(300), andfinalization_seconds(10). - Plugins: Allowlist installed Harness plugin factories via
plugins.keys.
Logs, metrics and traces
Configure telemetry.log_level, log_format (json), optional rotating log_file, and a separate telemetry.metrics_port for Prometheus scraping (see monitoring).
telemetry.trace_backend | Required settings |
|---|---|
none | Default (tracing disabled) |
langfuse | trace_url, langfuse_public_key, langfuse_secret_key |
logfire | trace_url, logfire_write_token, logfire_read_token |
Set telemetry.trace_content (none, standard, or full) to control prompt/tool payload export.
Environment monitoring
monitoring.enabled defaults to true. Configure pull collectors under monitoring.collectors.vmagent or .alloy (see collector bootstrap) and optionally publish a preset to selected workspaces:
[monitoring.deployment_preset]
name = "Deployment metrics"
collector = "vmagent"
query_endpoint = "https://metrics.example.com"
workspace_ids = ["ws_example"]Kubernetes environments
Enable Kubernetes sandbox Pods via Helm (kubernetesEnvironments.enabled: true, namespace: agent-sandboxes, allowPlaintextEnvd: true on a trusted private network) or declare identical cluster profiles on both control and worker:
[environments.kubernetes_clusters.in-cluster]
authentication = "in_cluster"
namespaces = ["agent-sandboxes"]
ownership_id = "production-service"
sandbox_service_account = "agent-sandbox"
allow_plaintext_envd = trueFor local kind clusters outside Kubernetes, use authentication = "kubeconfig" with kubeconfig, context, and allow_port_forward = true (kubectl required). Then create the workspace provider and template as shown in Kubernetes sandboxes.
Kubernetes Browsers
Enable managed Chromium Pods in Helm (kubernetesBrowsers.enabled: true, namespace: agent-browsers on Kubernetes 1.32+ with NetworkPolicy and PVC support), then configure the provider in Console (browser guide).
Related guides
- Configure workspace provisioning
- Docker Compose and Helm chart deployments