Skip to content
中文

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 ​

FilePurpose
services.yamlService discovery SSOT, ports/URLs/health endpoints (371 lines)
ai-infra.yamlAI runtime quotas, execution boundaries, tool exposure, sandbox posture
ai-infra.confined.yamlconfined posture override (merged onto ai-infra.yaml)
identity-service.yamlIdentity service configuration
skill-service.yamlSkill service configuration
a2a-gateway.yamlA2A gateway configuration
dev.yamlDevelopment environment override
mcp-servers.yaml.exampleMCP server configuration template
nats-diffusion.yamlNATS diffusion configuration
persona-templates.jsonPersona template index

ai-infra-rs Runtime ​

Concurrency and Quotas ​

VariableDefaultDescription
AI_INFRA_RS_GLOBAL_CONCURRENCY128Global concurrency limit
AI_INFRA_RS_PER_USER_CONCURRENCY10Per-user concurrency limit
AI_INFRA_RS_RPM_PER_USER120Per-user requests-per-minute limit
AI_INFRA_RS_ENFORCE_WORKSPACE_LANEfalseWhether to enforce the workspace lane
AI_INFRA_RS_DEFAULT_MAX_CONCURRENT_REQUESTS10Default max concurrency per instance
AI_INFRA_RS_DEFAULT_TEMPERATURE1Default temperature

Agent loop ​

VariableDefaultDescription
AI_INFRA_RS_AGENT_LOOP_TIMEOUT_MS900000 (15min)Agent loop timeout
AI_INFRA_RS_CODING_AGENT_LOOP_TIMEOUT_MS1800000 (30min)Coding agent loop timeout
AI_INFRA_RS_AGENT_LOOP_MAX_TOOL_CALLS80Maximum number of tool calls in the agent loop
AI_INFRA_RS_AGENT_LOOP_CONTINUATION_ENABLEDtrueWhether 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_MS180000LLM inference timeout
AI_INFRA_RS_HTTP_REQUEST_TIMEOUT_SECS-HTTP request timeout
AI_INFRA_RS_MAX_BODY_BYTES20971520 (20MiB)Maximum request body bytes
AI_INFRA_RS_MAX_IMAGE_CHARS20000000Maximum image chars (base64/data-URL)
AI_INFRA_RS_QUOTA_MAX_ITERATIONS100quota max iterations
AI_INFRA_RS_AGENT_LOOP_MONOTONIC_FIXATION_THRESHOLD24monotonic 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).

VariableDefaultDescription
AI_INFRA_RS_HOST_PROFILEempty (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_POSTUREnakedPlatform 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_POSTUREconfinedHermes tenant claw execution posture
FINSAFE_SKIP_LOCAL_SERVER0Embedded finsafe-server switch; do not comment out (skipping the embedded daemon breaks Hermes terminal/file tools)
FINSAFE_HERMES_ADAPTER_IMAGElocal/chatkit/finsafe-hermes-adapter:localhermes-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 ​

VariableDescription
AI_INFRA_RS_CRON_BACKENDrestate / builtin (default restate)
RESTATE_INGRESS_URLRestate ingress URL
RESTATE_ADMIN_URLRestate admin URL
RESTATE_ENDPOINT_URIRestate endpoint URI
RESTATE_ENDPOINT_BINDRestate endpoint bind
RESTATE_ENDPOINT_PORTRestate endpoint port
RESTATE_REGISTER_FORCEWhether to force registration
RESTATE_REGISTER_MAX_ATTEMPTSMaximum retry attempts for registration (default 12)
AI_INFRA_RS_CRON_INTERNAL_TOKENInternal cron token (matches the X-Internal-Cron-Token contract header)

Memory / Embedding ​

VariableDescription
AI_INFRA_RS_MEMORY_EMBEDDING_PROVIDERembedding provider
AI_INFRA_RS_MEMORY_EMBEDDING_ENDPOINTembedding endpoint (TEI default 26117)
AI_INFRA_RS_MEMORY_EMBEDDING_BASE_URLOpenAI-compatible embedding base URL (Claw auto-appends /embeddings)
AI_INFRA_RS_MEMORY_EMBEDDING_API_KEYembedding endpoint Bearer key (empty means no auth)
AI_INFRA_RS_MEMORY_EMBEDDING_MODELembedding model (default BAAI/bge-base-zh-v1.5)
AI_INFRA_RS_MEMORY_EMBEDDING_DIMSvector dimensions
AI_INFRA_RS_MEMORY_EMBEDDING_TIMEOUT_MSembedding timeout
AI_INFRA_RS_MEMORY_INDEX_PATHSQLite index path
AI_INFRA_RS_HISTORY_TIMEOUT_MSGET /conversation/messages single call timeout (default 8000)
AI_INFRA_RS_HISTORY_FETCH_RETRIESGET /conversation/messages retry count (max 3, default 1)
AI_INFRA_RS_CROSS_SESSION_TIMEOUT_MSGET /conversation/search single call timeout (default 3000)
AI_INFRA_RS_ONBOARDING_TIMEOUT_MSonboarding profile fetch timeout (default 5000)

Host SPI and Internal Services ​

VariableDescription
CONVERSATION_STORE_URLconversation-store URL
IDENTITY_SERVICE_URLidentity-service URL (fallback when persona-service is missing)
PERSONA_SERVICE_URLpersona-service URL (optional; falls back to IDENTITY_SERVICE_URL when absent)

Authentication and Internal Tokens ​

VariableDescription
INTERNAL_SERVICE_TOKENInternal service-to-service call token (uniformly injected into all services at deployment)
AI_INFRA_RS_ADMIN_API_KEYAdministrator API key (matches the x-admin-api-key contract header)
AI_INFRA_RS_TRUST_TOOL_POLICY_HEADERTrust the X-Tool-Policy header (default false; the Host must strip or control this header first)
AI_INFRA_RS_TRUST_JWT_SUBTrust JWT sub (default false)
USER_SECRETS_KEKUser key encryption key (base64, 32 bytes; recommend openssl rand -base64 32; shipped default in the offline package; recommend replacing in production)
USER_SECRETS_KEK_PREVIOUSOld KEK (for compatible decryption during rotation)
USER_SECRETS_KEK_VERSIONKEK version number
SERVICE_API_KEYSService API keys (e.g. push-service:push-service-key,delivery:delivery-service-key)
SERVICE_TIMEOUT_MSService call timeout (default 10000)

Four Contract Headers ​

HeaderPurpose
x-admin-api-keyMachine-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-TokenInternal cron loopback auth; must match AI_INFRA_RS_CRON_INTERNAL_TOKEN
X-Tool-PolicyTool policy override; only effective when AI_INFRA_RS_TRUST_TOOL_POLICY_HEADER=true

claw-fleet-manager ​

VariableDefaultDescription
CLAW_FLEET_MANAGER_BASE_PORT26463claw instance base port, dynamically occupies the 26463-26549 range
CLAW_RUNTIME_MODEper_tenant_instanceclaw 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_VOLUMEchatkit_workspacesNamed volume for /app/data/workspaces under Docker Compose / offline deployment
CLAW_FLEET_MANAGER_HEALTH_POLL_TIMEOUT_MS180000Health poll timeout
CLAW_FLEET_MANAGER_HEALTH_POLL_INTERVAL_MS2000Health poll interval
CLAW_FLEET_MANAGER_REQUEST_TIMEOUT_MS240000Request timeout
CLAW_FLEET_MANAGER_STARTING_MAX_AGE_MS300000starting state downgrade threshold (must be greater than health poll timeout + cold start overhead)
CLAW_FLEET_MANAGER_STARTING_SWEEP_INTERVAL_MS60000starting state sweep interval
CLAW_DEPLOYMENT_HEALTH_GRACE_TIMEOUT_MS30000Deployment health grace timeout
CLAW_DEPLOYMENT_HEALTH_GRACE_INTERVAL_MS2000Deployment health grace interval
CLAW_DEPLOYMENT_HEALTH_PER_ATTEMPT_MS3000Deployment health single-attempt timeout
CLAW_RECONCILE_PARALLEL3reconcile concurrency (set to 1 when resources are tight)
CLAW_RECONCILE_CURL_MAX_TIME240reconcile curl timeout

Deployment and Images ​

VariableDescription
CHATKIT_REGISTRYImage registry (default local/chatkit)
CHATKIT_VERSIONImage version (default local)
AGENT_MODEAgent mode (default orchestrator)
AI_INFRA_BACKENDAI 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) ​

VariableDescription
AI_INFRA_RS_LOGclaw 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_SANDBOXBrowser without sandbox (testing only; disable in production)
CHROME_PATHChrome path
AI_INFRA_RS_WEB_SEARCH_PROVIDERSearch provider (default searxng; alternatively bocha)
AI_INFRA_RS_WEB_SEARCH_SEARXNG_URLSearXNG URL (default in-cluster http://chatkit-searxng:8080)
AI_INFRA_RS_WEB_SEARCH_SEARXNG_LANGUAGESearXNG language (default zh-CN)
AI_INFRA_RS_WEB_SEARCH_API_KEYAPI key for commercial search providers (e.g. bocha)
AI_INFRA_RS_TOOL_EXEC_TIMEOUT_MSTool execution timeout (default 300000)
AI_INFRA_RS_EXEC_ENABLEDWhether 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 ​

VariableDefaultDescription
LOG_FILESemptyList of log file paths (space-separated)
LANGFUSE_SECRET_KEY / LANGFUSE_PUBLIC_KEY-Langfuse tracing keys
LANGFUSE_BASE_URLhttps://cloud.langfuse.comLangfuse service URL

Reference Documentation ​

Digital Ecosystem Infrastructure.