Operations Configuration
This page is grouped by operations side (what deployment engineers/SREs will change). Config files live under deploy/config/; env is in .env (single-node) or ConfigMap (K8s). For business side (what customer ops/administrators will change), see Business Configuration; for the first-deploy minimum see Basic Configuration.
Configuration File Inventory
| File | Purpose |
|---|---|
services.yaml | Service discovery SSOT, ports/URLs/health endpoints (371 lines) |
ai-infra.yaml | AI runtime quotas, execution boundaries, tool exposure, sandbox posture |
ai-infra.confined.yaml | confined posture override (merged onto ai-infra.yaml) |
identity-service.yaml | Identity service configuration |
skill-service.yaml | Skill service configuration |
a2a-gateway.yaml | A2A gateway configuration |
dev.yaml | Development environment override |
mcp-servers.yaml.example | MCP server configuration template |
nats-diffusion.yaml | NATS diffusion configuration |
persona-templates.json | Persona template index |
ai-infra-rs Runtime
Concurrency and Quotas
| Variable | Default | Description |
|---|---|---|
AI_INFRA_RS_GLOBAL_CONCURRENCY | 128 | Global concurrency limit |
AI_INFRA_RS_PER_USER_CONCURRENCY | 10 | Per-user concurrency limit |
AI_INFRA_RS_RPM_PER_USER | 120 | Per-user requests-per-minute limit |
AI_INFRA_RS_ENFORCE_WORKSPACE_LANE | false | Whether to enforce the workspace lane |
AI_INFRA_RS_DEFAULT_MAX_CONCURRENT_REQUESTS | 10 | Default max concurrency per instance |
AI_INFRA_RS_DEFAULT_TEMPERATURE | 1 | Default temperature |
Agent loop
| Variable | Default | Description |
|---|---|---|
AI_INFRA_RS_AGENT_LOOP_TIMEOUT_MS | 900000 (15min) | Agent loop timeout |
AI_INFRA_RS_CODING_AGENT_LOOP_TIMEOUT_MS | 1800000 (30min) | Coding agent loop timeout |
AI_INFRA_RS_AGENT_LOOP_MAX_TOOL_CALLS | 80 | Maximum number of tool calls in the agent loop |
AI_INFRA_RS_AGENT_LOOP_CONTINUATION_ENABLED | true | Whether to enable continuation (there are also AI_INFRA_RS_CODING_AGENT_LOOP_CONTINUATION_ENABLED / AI_INFRA_RS_READ_ONLY_AGENT_LOOP_CONTINUATION_ENABLED variants) |
AI_INFRA_RS_LLM_INFER_TIMEOUT_MS | 180000 | LLM inference timeout |
AI_INFRA_RS_HTTP_REQUEST_TIMEOUT_SECS | - | HTTP request timeout |
AI_INFRA_RS_MAX_BODY_BYTES | 20971520 (20MiB) | Maximum request body bytes |
AI_INFRA_RS_MAX_IMAGE_CHARS | 20000000 | Maximum image chars (base64/data-URL) |
AI_INFRA_RS_QUOTA_MAX_ITERATIONS | 100 | quota max iterations |
AI_INFRA_RS_AGENT_LOOP_MONOTONIC_FIXATION_THRESHOLD | 24 | monotonic fixity threshold |
Execution Posture and FinSAFE/Hermes Mixed Fleet
The platform claw (ai-infra-rs) defaults to naked; Hermes tenants default to confined (embedded finsafe-server).
| Variable | Default | Description |
|---|---|---|
AI_INFRA_RS_HOST_PROFILE | empty (Tier A) | Production hard gate: must explicitly inject linux-cloud; otherwise silently degrades to Tier A and the sandbox stops working |
AI_INFRA_RS_EXECUTION_POSTURE | naked | Platform claw execution posture; confined requires FinSAFE |
AI_INFRA_RS_FINSAFE_URL | - | FinSAFE service URL (required for confined) |
AI_INFRA_RS_FINSAFE_CELL_POLICY | - | FinSAFE cell policy (required for confined) |
AI_INFRA_RS_IMAGE | - | ai-infra-rs image (can switch to finsafe-hermes-adapter) |
HERMES_EXECUTION_POSTURE | confined | Hermes tenant claw execution posture |
FINSAFE_SKIP_LOCAL_SERVER | 0 | Embedded finsafe-server switch; do not comment out (skipping the embedded daemon breaks Hermes terminal/file tools) |
FINSAFE_HERMES_ADAPTER_IMAGE | local/chatkit/finsafe-hermes-adapter:local | hermes-adapter image (must be written out fully expanded; .env does not support ${CHATKIT_VERSION} nested expansion) |
FINSAFE_AUTH_TOKEN | - | FinSAFE auth token |
FINSAFE_LICENSE_MITM | - | dev only (TLS MITM license bypass); never enable in production |
Cron / Restate
| Variable | Description |
|---|---|
AI_INFRA_RS_CRON_BACKEND | restate / builtin (default restate) |
RESTATE_INGRESS_URL | Restate ingress URL |
RESTATE_ADMIN_URL | Restate admin URL |
RESTATE_ENDPOINT_URI | Restate endpoint URI |
RESTATE_ENDPOINT_BIND | Restate endpoint bind |
RESTATE_ENDPOINT_PORT | Restate endpoint port |
RESTATE_REGISTER_FORCE | Whether to force registration |
RESTATE_REGISTER_MAX_ATTEMPTS | Maximum retry attempts for registration (default 12) |
AI_INFRA_RS_CRON_INTERNAL_TOKEN | Internal cron token (matches the X-Internal-Cron-Token contract header) |
Memory / Embedding
| Variable | Description |
|---|---|
AI_INFRA_RS_MEMORY_EMBEDDING_PROVIDER | embedding provider |
AI_INFRA_RS_MEMORY_EMBEDDING_ENDPOINT | embedding endpoint (TEI default 26117) |
AI_INFRA_RS_MEMORY_EMBEDDING_BASE_URL | OpenAI-compatible embedding base URL (Claw auto-appends /embeddings) |
AI_INFRA_RS_MEMORY_EMBEDDING_API_KEY | embedding endpoint Bearer key (empty means no auth) |
AI_INFRA_RS_MEMORY_EMBEDDING_MODEL | embedding model (default BAAI/bge-base-zh-v1.5) |
AI_INFRA_RS_MEMORY_EMBEDDING_DIMS | vector dimensions |
AI_INFRA_RS_MEMORY_EMBEDDING_TIMEOUT_MS | embedding timeout |
AI_INFRA_RS_MEMORY_INDEX_PATH | SQLite index path |
AI_INFRA_RS_HISTORY_TIMEOUT_MS | GET /conversation/messages single call timeout (default 8000) |
AI_INFRA_RS_HISTORY_FETCH_RETRIES | GET /conversation/messages retry count (max 3, default 1) |
AI_INFRA_RS_CROSS_SESSION_TIMEOUT_MS | GET /conversation/search single call timeout (default 3000) |
AI_INFRA_RS_ONBOARDING_TIMEOUT_MS | onboarding profile fetch timeout (default 5000) |
Host SPI and Internal Services
| Variable | Description |
|---|---|
CONVERSATION_STORE_URL | conversation-store URL |
IDENTITY_SERVICE_URL | identity-service URL (fallback when persona-service is missing) |
PERSONA_SERVICE_URL | persona-service URL (optional; falls back to IDENTITY_SERVICE_URL when absent) |
Authentication and Internal Tokens
| Variable | Description |
|---|---|
INTERNAL_SERVICE_TOKEN | Internal service-to-service call token (uniformly injected into all services at deployment) |
AI_INFRA_RS_ADMIN_API_KEY | Administrator API key (matches the x-admin-api-key contract header) |
AI_INFRA_RS_TRUST_TOOL_POLICY_HEADER | Trust the X-Tool-Policy header (default false; the Host must strip or control this header first) |
AI_INFRA_RS_TRUST_JWT_SUB | Trust JWT sub (default false) |
USER_SECRETS_KEK | User key encryption key (base64, 32 bytes; recommend openssl rand -base64 32; shipped default in the offline package; recommend replacing in production) |
USER_SECRETS_KEK_PREVIOUS | Old KEK (for compatible decryption during rotation) |
USER_SECRETS_KEK_VERSION | KEK version number |
SERVICE_API_KEYS | Service API keys (e.g. push-service:push-service-key,delivery:delivery-service-key) |
SERVICE_TIMEOUT_MS | Service call timeout (default 10000) |
Four Contract Headers
| Header | Purpose |
|---|---|
x-admin-api-key | Machine-to-machine administrator auth (/admin/runtime/*); legacy may use Authorization: Bearer <admin-api-key> |
Authorization: Bearer <token> | Administrator user bearer; identity-service /users/me verifies is_admin=true |
X-Internal-Cron-Token | Internal cron loopback auth; must match AI_INFRA_RS_CRON_INTERNAL_TOKEN |
X-Tool-Policy | Tool policy override; only effective when AI_INFRA_RS_TRUST_TOOL_POLICY_HEADER=true |
claw-fleet-manager
| Variable | Default | Description |
|---|---|---|
CLAW_FLEET_MANAGER_BASE_PORT | 26463 | claw instance base port, dynamically occupies the 26463-26549 range |
CLAW_RUNTIME_MODE | per_tenant_instance | claw runtime mode |
CLAW_FLEET_SHARED_AI_INFRA_URL | - | Shared platform claw (PoC only); unset = default per-tenant Docker claws |
CLAW_FLEET_MANAGER_PUBLIC_HOST | - | Externally exposed host address (used to build URLs reachable by claw instances) |
CLAW_FLEET_DOCKER_WORKSPACES_VOLUME | chatkit_workspaces | Named volume for /app/data/workspaces under Docker Compose / offline deployment |
CLAW_FLEET_MANAGER_HEALTH_POLL_TIMEOUT_MS | 180000 | Health poll timeout |
CLAW_FLEET_MANAGER_HEALTH_POLL_INTERVAL_MS | 2000 | Health poll interval |
CLAW_FLEET_MANAGER_REQUEST_TIMEOUT_MS | 240000 | Request timeout |
CLAW_FLEET_MANAGER_STARTING_MAX_AGE_MS | 300000 | starting state downgrade threshold (must be greater than health poll timeout + cold start overhead) |
CLAW_FLEET_MANAGER_STARTING_SWEEP_INTERVAL_MS | 60000 | starting state sweep interval |
CLAW_DEPLOYMENT_HEALTH_GRACE_TIMEOUT_MS | 30000 | Deployment health grace timeout |
CLAW_DEPLOYMENT_HEALTH_GRACE_INTERVAL_MS | 2000 | Deployment health grace interval |
CLAW_DEPLOYMENT_HEALTH_PER_ATTEMPT_MS | 3000 | Deployment health single-attempt timeout |
CLAW_RECONCILE_PARALLEL | 3 | reconcile concurrency (set to 1 when resources are tight) |
CLAW_RECONCILE_CURL_MAX_TIME | 240 | reconcile curl timeout |
Deployment and Images
| Variable | Description |
|---|---|
CHATKIT_REGISTRY | Image registry (default local/chatkit) |
CHATKIT_VERSION | Image version (default local) |
AGENT_MODE | Agent mode (default orchestrator) |
AI_INFRA_BACKEND | AI backend (default rs) |
License (
DEPLOYMENT_LICENSE_KEY/DEPLOYMENT_LICENSE_CIPHER) is auto-generated by init-env.sh on first deployment; for renewal see License Update.
Services and Profiles
The default stack has 21 services in total: api-gateway, identity-service, orchestrator, ag-ui-server, persona-service, skill-service, claw-fleet-manager, a2a-gateway, feishu-connector, dingtalk-connector, wecom-connector, auth-fabric, auth-fabric-proxy, conversation-store, delivery, inbox-service, document-service, doc-toolkit, push-service, ai-infra-rs, searxng.
Infrastructure: postgres, timescaledb, nats, redis, tei, restate.
Profile validation: scripts/validate-profiles.sh. The auth-fabric profile is gated; dingtalk/wecom have no profile restrictions. claw-fleet-manager belongs to the default stack (identity-service and ai-infra-rs depend on its routing endpoint); its profile label is kept only for explicitly starting the single service. The port allocation SSOT is config/services.yaml.
Underlying and Browser (As Needed)
| Variable | Description |
|---|---|
AI_INFRA_RS_LOG | claw tracing filter (dev default ai_infra_rs_claw=debug,ai_infra_rs_tools=debug,ai_infra_rs_llm=info,tower_http=info; prod defaults to info level; shared and tenant claws inherit the same value) |
AI_INFRA_RS_BROWSER_NO_SANDBOX | Browser without sandbox (testing only; disable in production) |
CHROME_PATH | Chrome path |
AI_INFRA_RS_WEB_SEARCH_PROVIDER | Search provider (default searxng; alternatively bocha) |
AI_INFRA_RS_WEB_SEARCH_SEARXNG_URL | SearXNG URL (default in-cluster http://chatkit-searxng:8080) |
AI_INFRA_RS_WEB_SEARCH_SEARXNG_LANGUAGE | SearXNG language (default zh-CN) |
AI_INFRA_RS_WEB_SEARCH_API_KEY | API key for commercial search providers (e.g. bocha) |
AI_INFRA_RS_TOOL_EXEC_TIMEOUT_MS | Tool execution timeout (default 300000) |
AI_INFRA_RS_EXEC_ENABLED | Whether to enable the exec tool (default false) |
Tool-result retention and plugin timeouts (optional overrides; defaults need no configuration): the AI_INFRA_RS_TOOL_RESULT_* family (inline char caps / guard ceilings / spill switch and TTL), AI_INFRA_RS_PLUGIN_TIMEOUT_MS / AI_INFRA_RS_PLUGIN_TIMEOUT_OVERRIDES, AI_INFRA_RS_TOOL_EXEC_TIMEOUT_OVERRIDES, AI_INFRA_RS_HTTP_ALLOWED_DOMAINS.
Observability
| Variable | Default | Description |
|---|---|---|
LOG_FILES | empty | List of log file paths (space-separated) |
LANGFUSE_SECRET_KEY / LANGFUSE_PUBLIC_KEY | - | Langfuse tracing keys |
LANGFUSE_BASE_URL | https://cloud.langfuse.com | Langfuse service URL |
