Application Configuration
JSON Schema for application configuration
Server
auth
Auth configures API authentication settings.
cors
CORS configures Cross-Origin Resource Sharing policies.
Only applies when CORSEnabled is true.
cors_enabled
CORSEnabled enables Cross-Origin Resource Sharing headers.
Set to true
when the API is accessed from web browsers on different origins.
host
Host specifies the network interface to bind the server to.
Common values:
"0.0.0.0"
: Listen on all interfaces (default)"127.0.0.1"
or"localhost"
: Local access only- Specific IP: Bind to a specific network interface
port
Port specifies the TCP port for the HTTP server.
Valid range: 1-65535. Common ports:
8080
: Default development port80
: Standard HTTP (requires privileges)443
: Standard HTTPS (requires privileges)
reconciler
Reconciler configures the workflow reconciler subsystem.
seed_from_repo_on_empty
SeedFromRepoOnEmpty controls whether builder mode seeds the store from repository YAML once when the store is empty. Disabled by default.
source_of_truth
SourceOfTruth selects where the server loads workflows from.
Values:
- "repo": load YAML from repository and index to store (default)
- "builder": load workflows from ResourceStore (compile-from-store)
timeout
Timeout sets the maximum duration for processing requests.
Applies to all HTTP operations including request reading, processing, and response writing. Default: 30s. Increase for long-running operations.
timeouts
Timeouts contains operator-tunable timeouts and retry/backoff settings for server startup, shutdown, and HTTP behavior.
.timeouts
CLI
APIKey
APIKey authenticates CLI requests to the Compozy API.
Security: Always use environment variables for API keys. Never commit API keys to version control.
BaseURL
BaseURL specifies the Compozy API endpoint.
Default: "https://api.compozy.com" Use custom endpoints for self-hosted or development environments.
ColorMode
ColorMode controls terminal color output.
Options:
"auto"
: Detect terminal color support (default)"on"
: Force color output"off"
: Disable all color output
ConfigFile
ConfigFile specifies a custom configuration file path.
Default: "./compozy.yaml" or "~/.compozy/config.yaml"
Debug
Debug enables verbose debug logging.
Shows detailed API requests, responses, and internal operations.
DefaultFormat
DefaultFormat sets the default output format.
Options:
"json"
: JSON format for programmatic consumption"tui"
: Terminal UI with tables and formatting (default)"auto"
: Automatically detect based on terminal capabilities
EnvFile
EnvFile specifies a .env file to load environment variables from.
Variables in this file are loaded before processing configuration.
Interactive
Interactive enables interactive prompts and confirmations.
Default: true Set to false for non-interactive environments.
Mode
Mode controls the CLI execution behavior.
Available modes:
"normal"
: Standard interactive mode (default)"batch"
: Non-interactive batch processing"script"
: Optimized for scripting (minimal output)
NoColor
NoColor disables all color output regardless of terminal support.
Overrides ColorMode when set to true.
OutputFormatAlias
OutputFormatAlias allows custom output format aliases.
Used internally for format customization.
PageSize
PageSize sets the number of results per page in list operations.
Default: 50 Range: 1-1000
PortReleasePollInterval
PortReleasePollInterval sets how often to check if a port has become available.
Default: 100ms
PortReleaseTimeout
PortReleaseTimeout sets the maximum time to wait for a port to become available.
Default: 5s
Quiet
Quiet suppresses all non-error output.
Useful for scripting and automation.
ServerURL
ServerURL overrides the server URL for local development.
This takes precedence over BaseURL when set. Example: "http://localhost:8080" for local server
Timeout
Timeout sets the maximum duration for API requests.
Default: 30s Increase for long-running operations like workflow execution.
Database
auto_migrate
AutoMigrate enables automatic database migrations on startup.
When enabled, the system will automatically apply any pending database migrations when establishing a database connection. This eliminates the need for manual migration commands.
Default: true
conn_string
ConnString provides a complete PostgreSQL connection URL.
Format: postgres://user:password@host:port/database?sslmode=mode
Takes precedence over individual connection parameters.
host
Host specifies the database server hostname or IP address.
Default: "localhost"
migration_timeout
MigrationTimeout sets the maximum allowed time for applying database migrations during startup. It must be equal to or greater than the advisory lock acquisition window used by ApplyMigrationsWithLock (45s).
Default: 2m
name
DBName specifies the database name to connect to.
Default: "compozy"
password
Password specifies the database password for authentication.
Security: Use environment variables in production.
port
Port specifies the database server port.
Default: "5432" (PostgreSQL default)
ssl_mode
SSLMode configures SSL/TLS connection security.
Options:
"disable"
: No SSL (development only)"prefer"
: Try SSL, fallback to non-SSL"require"
: SSL required (recommended)"verify-ca"
: SSL with CA verification"verify-full"
: SSL with full verification
user
User specifies the database username for authentication.
Temporal
host_port
HostPort specifies the Temporal server endpoint.
Format: host:port
Default: "localhost:7233"
namespace
Namespace isolates workflows within Temporal.
Use different namespaces for:
- Environment separation (dev, staging, prod)
- Multi-tenant deployments
- Workflow versioning Default: "default"
task_queue
TaskQueue identifies the queue for workflow tasks.
Workers poll this queue for tasks to execute. Use different queues for:
- Workflow type separation
- Priority-based routing
- Resource isolation Default: "compozy-tasks"
Runtime
async_token_counter_buffer_size
AsyncTokenCounterBufferSize sets the token counter queue size.
Larger buffers handle traffic spikes better but use more memory. Default: 100
async_token_counter_workers
AsyncTokenCounterWorkers sets the number of token counting workers.
More workers improve throughput for high-volume token counting. Default: 4
bun_permissions
BunPermissions defines runtime security permissions for Bun.
Default: ["--allow-read"]
dispatcher_heartbeat_interval
DispatcherHeartbeatInterval sets how often dispatchers report health.
Lower values provide faster failure detection but increase load. Default: 30s
dispatcher_heartbeat_ttl
DispatcherHeartbeatTTL sets heartbeat expiration time.
Must be greater than heartbeat interval to handle network delays. Default: 90s
dispatcher_stale_threshold
DispatcherStaleThreshold defines when a dispatcher is considered failed.
Triggers reassignment of dispatcher's workflows. Default: 120s
entrypoint
Entrypoint specifies the path to the JavaScript/TypeScript entrypoint file. Overrides global runtime.entrypoint_path setting if specified.
entrypoint_path
EntrypointPath specifies the path to the JavaScript/TypeScript entrypoint file.
Default: "./tools.ts"
environment
Environment specifies the deployment environment.
Affects:
- Error verbosity and stack traces
- Performance optimizations
- Debug endpoints availability
- Default timeouts and limits
Values: "development", "staging", "production"
log_level
LogLevel controls logging verbosity.
Levels (least to most verbose):
"error"
: Critical errors only"warn"
: Warnings and errors"info"
: General operational info (default)"debug"
: Detailed debugging information
native_tools
NativeTools configures native cp__ tool behavior and guards.
permissions
Permissions defines runtime security permissions. Overrides global runtime.bun_permissions setting if specified.
runtime_type
RuntimeType specifies the JavaScript runtime to use for tool execution.
Values: "bun", "node" Default: "bun"
task_execution_timeout_default
TaskExecutionTimeoutDefault controls the fallback timeout applied when direct task executions omit a timeout value. Applies to synchronous and asynchronous direct executions triggered via API. Default: 60s
task_execution_timeout_max
TaskExecutionTimeoutMax caps the maximum timeout allowed for direct task executions. Client-specified or configuration-derived timeouts exceeding this value are rejected. Default: 300s
tool_execution_timeout
ToolExecutionTimeout sets the maximum time for tool execution.
Prevents runaway tools from blocking workflows. Default: 60s
type
Type specifies the JavaScript runtime to use for tool execution. Overrides global runtime.runtime_type setting if specified.
Limits
max_config_file_nesting_depth
MaxConfigFileNestingDepth limits nesting depth when parsing configuration files.
Prevents stack overflow from deeply nested YAML documents supplied by users. Default: 100
max_config_file_size
MaxConfigFileSize limits configuration file size during loads.
Prevents memory exhaustion when loading large YAML/JSON documents. Default: 10MB (10485760 bytes)
max_message_content
MaxMessageContent limits LLM message content size.
Prevents excessive API costs and timeouts. Default: 50MB (52428800 bytes)
max_nesting_depth
MaxNestingDepth limits JSON/YAML structure nesting.
Prevents stack overflow from deeply nested data. Default: 20
max_string_length
MaxStringLength limits individual string values.
Applies to all string fields in requests and responses. Default: 10MB (10485760 bytes)
max_task_context_depth
MaxTaskContextDepth limits task execution stack depth.
Prevents infinite recursion in workflow execution. Default: 10
max_total_content_size
MaxTotalContentSize limits total request/response size.
Prevents memory exhaustion from large payloads. Default: 100MB (104857600 bytes)
parent_update_batch_size
ParentUpdateBatchSize controls database update batching.
Larger batches improve throughput but increase memory usage. Default: 100
Memory
max_entries
MaxEntries limits memory entries per conversation.
Prevents unbounded memory growth. Default: 10000
prefix
Prefix namespaces memory keys in Redis.
Prevents key collisions when sharing Redis. Default: "compozy:memory:"
ttl
TTL sets memory entry expiration time.
Balances context retention with storage costs. Default: 24h
LLM
allowed_mcp_names
AllowedMCPNames restricts which MCP servers/tools are considered eligible for advertisement and invocation. When empty, all discovered MCP tools are eligible.
context_compaction_cooldown
ContextCompactionCooldown specifies how many loop iterations to wait between compaction attempts.
context_compaction_threshold
ContextCompactionThreshold expresses the context usage ratio (0-1) that triggers compaction.
denied_mcp_names
DeniedMCPNames excludes MCP servers/tools from advertisement and invocation. Entries take precedence over the allow list.
enable_context_compaction
EnableContextCompaction toggles summary-based compaction when context usage nears limits.
enable_dynamic_prompt_state
EnableDynamicPromptState toggles inclusion of orchestrator loop state inside the system prompt.
enable_loop_restarts
EnableLoopRestarts toggles whether the orchestrator may restart the loop when no progress is detected.
enable_progress_tracking
EnableProgressTracking toggles loop progress tracking to detect stalled conversations or repeated tool usage without advancement. Default: false
fail_on_mcp_registration_error
FailOnMCPRegistrationError enforces fail-fast behavior when registering MCP configurations sourced from agents/projects. When true, MCP registration failures cause service initialization to error.
finalize_output_retries
FinalizeOutputRetryAttempts overrides the number of retries allowed when final structured output is invalid.
max_concurrent_tools
MaxConcurrentTools limits the number of tools that can execute in parallel.
Controls resource usage and prevents overwhelming downstream services. Higher values improve throughput, lower values reduce resource contention. Default: 10
max_consecutive_successes
MaxConsecutiveSuccesses controls how many consecutive successful tool calls without progress are tolerated before the orchestrator halts the loop. Default: 3 (orchestrator default)
max_loop_restarts
MaxLoopRestarts caps how many restarts are attempted per loop execution.
max_sequential_tool_errors
MaxSequentialToolErrors caps how many sequential tool execution/content errors are tolerated for the same tool before aborting the task. Set to 0 to use the orchestrator's built-in default. Default: 10 (registry default)
max_tool_iterations
MaxToolIterations caps the maximum number of tool-iteration loops per request.
This acts as a global default and can be overridden by model-specific configuration in project files. Set to 0 to use the orchestrator's built-in default. Default: 100 (registry default)
mcp_client_timeout
MCPClientTimeout sets the HTTP client timeout for MCP proxy communication.
mcp_header_template_strict
MCPHeaderTemplateStrict enables strict template validation for MCP HTTP headers. When true, allows only simple lookups (no pipelines/function calls/inclusions). Default: false
mcp_readiness_poll_interval
MCPReadinessPollInterval sets how often to poll the proxy for MCP connection status. Default: 200ms
mcp_readiness_timeout
MCPReadinessTimeout bounds how long to wait for MCP clients to connect during setup. Default: 60s
no_progress_threshold
NoProgressThreshold configures how many loop iterations without progress are tolerated before the orchestrator considers the interaction stalled. Default: 3 (orchestrator default)
proxy_url
ProxyURL specifies the MCP proxy server endpoint.
The proxy handles:
- MCP server connections
- Tool discovery and routing
- Protocol translation Default: "" (empty; supply MCP proxy URL explicitly or derive from MCPProxy.BaseURL)
register_mcps
RegisterMCPs contains additional MCP configurations to be registered with the MCP proxy at runtime. Represented as a generic slice to avoid import cycles with engine packages.
restart_stall_threshold
RestartStallThreshold controls how many stalled iterations trigger a loop restart. Values greater than no_progress_threshold are automatically clamped to match the no progress limit and emit a warning event.
retry_attempts
RetryAttempts configures the number of retry attempts for LLM operations.
Controls how many times the orchestrator will retry failed LLM requests before giving up. Higher values improve reliability but may increase latency. Default: 3
retry_backoff_base
RetryBackoffBase sets the base delay for exponential backoff retry strategy.
The actual delay will be calculated as base * (2 ^ attempt) with optional jitter. Lower values retry faster, higher values reduce server load. Default: 100ms
retry_backoff_max
RetryBackoffMax limits the maximum delay between retry attempts.
Prevents exponential backoff from creating extremely long delays. Should be set based on user tolerance for response time. Default: 10s
retry_jitter
RetryJitter enables random jitter in retry delays to avoid thundering herd.
When enabled, adds randomness to retry delays to prevent all clients from retrying simultaneously. Improves system stability under load. Default: true
retry_jitter_percent
RetryJitterPercent controls jitter strength when retry_jitter is enabled.
tool_call_caps
ToolCallCaps configures per-tool invocation caps enforced during orchestration.
Rate Limit
api_key_rate
APIKeyRate applies per API key.
Ensures fair usage across different clients.
global_rate
GlobalRate applies to all requests system-wide.
Protects against total system overload.
max_retry
MaxRetry sets retry attempts for rate-limited requests.
Default: 3
prefix
Prefix namespaces rate limit keys in Redis.
Default: "ratelimit:"
Redis
db
DB selects the Redis database number.
Default: 0
dial_timeout
DialTimeout sets timeout for establishing new connections.
Default: 5s
host
Host specifies the Redis server hostname or IP address.
Default: "localhost"
max_idle_conns
MaxIdleConns sets the maximum number of idle connections.
Default: 0
max_retries
MaxRetries sets the maximum number of retries before giving up.
Default: 3
max_retry_backoff
MaxRetryBackoff sets maximum backoff between retries.
Default: 512ms
min_idle_conns
MinIdleConns sets the minimum number of idle connections.
Default: 0
min_retry_backoff
MinRetryBackoff sets minimum backoff between retries.
Default: 8ms
notification_buffer_size
NotificationBufferSize sets buffer size for pub/sub notifications.
Default: 100
password
Password authenticates with Redis.
Security: Use environment variables in production.
ping_timeout
PingTimeout sets timeout for ping command.
Default: 1s
pool_size
PoolSize sets the maximum number of socket connections.
Default: 10 per CPU
pool_timeout
PoolTimeout sets timeout for getting connection from pool.
Default: ReadTimeout + 1s
port
Port specifies the Redis server port as a string.
Format: String representation of port number (1-65535) YAML: Both "6379" (quoted) and 6379 (numeric) are accepted Breaking Change: Changed from int to string in v2.0.0
Default: "6379"
read_timeout
ReadTimeout sets timeout for socket reads.
Default: 3s
tls_enabled
TLSEnabled enables TLS encryption.
Default: false
url
URL provides a complete Redis connection string.
Format: redis://[user:password@]host:port/db
Takes precedence over individual connection parameters.
write_timeout
WriteTimeout sets timeout for socket writes.
Default: ReadTimeout
Cache
compression_enabled
CompressionEnabled activates data compression for cached items.
Reduces memory usage and network bandwidth at the cost of CPU. Uses gzip compression for items above CompressionThreshold.
Default: true
compression_threshold
CompressionThreshold sets the minimum size for compression.
Items smaller than this are stored uncompressed to avoid CPU overhead for minimal space savings.
Default: 1024
(1KB)
enabled
Enabled determines if caching is active.
When disabled, all cache operations become no-ops. Useful for debugging or when Redis is unavailable.
Default: true
eviction_policy
EvictionPolicy controls how items are removed when cache is full.
Options:
"lru"
: Least Recently Used (default)"lfu"
: Least Frequently Used"ttl"
: Time-based expiration only
Default: "lru"
key_scan_count
KeyScanCount controls the COUNT hint used by Redis SCAN for key iteration. Larger values reduce round-trips but may increase per-iteration latency. Set to a positive integer; defaults to 100.
max_item_size
MaxItemSize limits the maximum size of a single cached item.
Prevents large objects from consuming excessive memory. Items larger than this are not cached.
Default: 1048576
(1MB)
prefix
Prefix namespaces cache keys in Redis.
Prevents key collisions when sharing Redis with other applications.
Format: "<app>:<environment>:cache:"
Default: "compozy:cache:"
stats_interval
StatsInterval controls how often cache statistics are logged.
Set to 0 to disable statistics logging. Useful for monitoring cache hit rates and performance.
Default: 5m
ttl
TTL sets the default time-to-live for cached items.
Balances data freshness with cache efficiency. Can be overridden per operation.
Default: 24h
Worker
config_store_ttl
ConfigStoreTTL sets how long worker configurations are cached.
Default: 24h
dispatcher
Dispatcher defines heartbeat tracking for dispatcher leases.
dispatcher_max_retries
DispatcherMaxRetries sets maximum dispatcher retry attempts.
Default: 2
dispatcher_retry_delay
DispatcherRetryDelay sets delay between dispatcher retry attempts.
Default: 50ms
heartbeat_cleanup_timeout
HeartbeatCleanupTimeout sets timeout for heartbeat cleanup operations.
Default: 5s
mcp_proxy_health_check_timeout
MCPProxyHealthCheckTimeout sets timeout for MCP proxy health checks.
Default: 10s
mcp_shutdown_timeout
MCPShutdownTimeout sets timeout for MCP server shutdown.
Default: 30s
start_workflow_timeout
StartWorkflowTimeout bounds the HTTP handler's call to start a workflow execution to avoid hanging requests when Temporal is slow or unreachable. If zero or negative, a safe default is used.
Default: 5s
MCP Proxy
base_url
BaseURL specifies the base URL for MCP proxy API endpoints.
Default: ""
(empty string)
host
Host specifies the network interface to bind the MCP proxy server to.
Default: "0.0.0.0"
mode
Mode controls how the MCP proxy runs within Compozy.
Values:
- "standalone": embed MCP proxy inside the server
- "": external MCP proxy (default)
When embedded, the server manages lifecycle and health of the proxy and will set LLM.ProxyURL if empty.
port
Port specifies the TCP port for the MCP proxy server.
Default: 0
(ephemeral)
shutdown_timeout
ShutdownTimeout sets timeout for graceful shutdown.
Default: 30s
Attachments
allowed_mime_types
AllowedMIMETypes specifies MIME allowlists by content category.
Empty lists do not allow everything; they mean "use built-in defaults" per attachment type. Resolvers fall back to type heuristics when the allowlist for a category is empty.
download_timeout
DownloadTimeout sets the timeout for downloading a single attachment. Default: 30s
http_user_agent
HTTPUserAgent sets the User-Agent header for outbound downloads. Default: "Compozy/1.0"
max_download_size_bytes
MaxDownloadSizeBytes caps the maximum size (in bytes) for any single download. Default: 10_000_000 (10MB)
max_redirects
MaxRedirects limits the number of HTTP redirects followed during download. Default: 3
mime_head_max_bytes
MIMEHeadMaxBytes controls how many initial bytes are used for MIME detection. Default: 512
pdf_extract_max_chars
PDFExtractMaxChars caps the number of characters extracted from PDFs. Default: 1_000_000
ssrf_strict
SSRFStrict enforces blocking of local/loopback/private/multicast destinations even in tests. Default: false
temp_dir_quota_bytes
TempDirQuotaBytes optionally caps total temp storage used by attachment resolution. 0 disables the quota.
text_part_max_bytes
TextPartMaxBytes caps the number of bytes loaded from text files into LLM parts. Default: 5_242_880 (5MB)
Webhooks
default_dedupe_ttl
DefaultDedupeTTL sets the default time-to-live for webhook deduplication. Default: 10m (10 minutes) Must be non-negative
default_max_body
DefaultMaxBody caps the maximum size (in bytes) for webhook request bodies. Default: 1,048,576 (1MB) Must be greater than 0
default_method
DefaultMethod specifies the default HTTP method for webhook requests. Default: "POST" Valid values: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
stripe_skew
StripeSkew sets the allowed timestamp skew for Stripe webhook verification. Default: 5m (5 minutes) Must be non-negative