Configuration Schemas

JSON Schema for project configuration

Project

Schema Definition
Complete configuration schema for compozy.yaml including both project and application settings
author
object

Author information for the project.

See also: Author
cache
object

Cache configures caching behavior and performance settings.

Schema Reference: application.json#cache
cli
object

CLI configures command-line interface behavior.

Schema Reference: application.json#cli
config
object

Opts contains project-wide configuration options for performance tuning and behavior control.

See also: Project Options
database
object

Database configures the PostgreSQL database connection.

Schema Reference: application.json#database
description
string

Description provides a human-readable explanation of the project's purpose and capabilities.

Guidelines:

  • Be specific about what the project does
  • Include primary use cases and benefits
  • Keep it concise (1-3 sentences)
  • Avoid technical jargon for broader understanding

Example: "Multi-agent customer support system with automated ticket routing"

limits
object

Limits defines system resource limits and constraints.

Schema Reference: application.json#limits
llm
object

LLM configures the LLM proxy service.

Schema Reference: application.json#llm
mcp_proxy
object

MCPProxy configures the MCP proxy server.

Schema Reference: application.json#mcpproxy
memory
object

Memory configures the memory service for agent conversations.

Schema Reference: application.json#memory
models
array

Models configures the LLM providers and model settings available to this project.

Multi-Model Support:

  • Configure multiple providers for redundancy
  • Different models for different tasks (cost/performance optimization)
  • Fallback chains for high availability

Supported Providers:

  • OpenAI (GPT-4, GPT-3.5, etc.)
  • Anthropic (Claude models)
  • Google (Gemini models)
  • Groq (Fast inference)
  • Ollama (Local models)
  • Custom providers via API compatibility

Example:

models:
 # Primary model for complex reasoning
 - provider: openai
   model: gpt-4-turbo
   api_key: "{{ .env.OPENAI_API_KEY }}"
   temperature: 0.7
   max_tokens: 4000

 # Fallback for cost optimization
 - provider: anthropic
   model: claude-3-haiku
   api_key: "{{ .env.ANTHROPIC_API_KEY }}"

 # Local model for sensitive data
 - provider: ollama
   model: llama2:13b
   api_url: http://localhost:11434
Schema Reference: provider.json

name
string

Name is the unique identifier for this Compozy project.

Requirements:

  • Must be unique within your Compozy installation

  • Alphanumeric characters, hyphens, and underscores only

  • Cannot start with a number

  • Maximum 63 characters

  • Examples: "customer-support-ai", "data-pipeline", "content-generator"

ratelimit
object

RateLimit configures API rate limiting.

Schema Reference: application.json#ratelimit
redis
object

Redis configures the Redis connection for all services.

Schema Reference: application.json#redis
runtime
object

Runtime specifies the JavaScript/TypeScript execution environment for custom tools. NOTE: Runtime configuration has been moved to global config (pkg/config.RuntimeConfig) This field is kept for backwards compatibility and project-specific overrides.

Schema Reference: application.json#runtime
schemas
array

Schemas defines the data validation schemas used throughout the project workflows.

Schema Benefits:

  • Type safety for workflow inputs/outputs
  • Early error detection and validation
  • Self-documenting data contracts
  • IDE autocomplete support

Example:

schemas:
 - id: user-input
   schema:
     type: object
     properties:
       name:
         type: string
         minLength: 1
       age:
         type: integer
         minimum: 0
     required: ["name"]

server
object

Server configures the HTTP API server settings.

Schema Reference: application.json#server
system_runtime
object

Runtime configures system runtime behavior and performance.

Schema Reference: application.json#runtime
temporal
object

Temporal configures the workflow engine connection.

Schema Reference: application.json#temporal
version
string

Version specifies the semantic version of this project configuration.

Format: Follows Semantic Versioning 2.0.0

  • MAJOR.MINOR.PATCH (e.g., 1.2.3)
  • Optional pre-release: 1.0.0-alpha.1
  • Optional build metadata: 1.0.0+20230615
worker
object

Worker configures Temporal worker settings.

Schema Reference: application.json#worker
workflows
array

Workflows defines the list of workflow files that compose this project's AI capabilities.

Project Options

Schema Definition
Opts contains project-specific configuration options.
on_error
object

Error handler configuration Defines what happens when a task fails after all retries

retry_policy
object

Retry configuration for transient failures Automatically retries failed tasks with exponential backoff

schedule_to_start_timeout
string

Maximum time to wait for a task to start executing Default: "1m"

  • Example: "30s", "5m", "1h"
start_to_close_timeout
string

Maximum time for task execution once started Default: "5m"

  • Example: "30s", "10m", "1h"
schedule_to_close_timeout
string

Total timeout from scheduling to completion Default: "6m"

  • Example: "1m", "15m", "2h"
heartbeat_timeout
string

Interval for task heartbeat signals Used for long-running tasks to indicate progress

  • Example: "10s", "30s", "1m"

Author

Schema Definition
name
string

Name of the author or team responsible for the project.

Examples: "Jane Smith", "AI Platform Team", "Data Science Division"

email
string

Email contact for project-related communication.

Use team emails for shared ownership: "ai-team@company.com"

url
string

URL to author's profile, repository, or team page.

Examples: "https://github.com/username", "https://company.com/team/ai"

organization
string

Organization or company affiliation.

Examples: "ACME Corporation", "AI Research Lab", "Engineering Division"

contributors
array

Additional contributors who helped develop the project.

Use this to acknowledge team members, collaborators, or external contributors.

Cache

Schema Definition
Config represents the cache-specific configuration This combines Redis connection settings with cache behavior settings
enabled
boolean

Enabled determines if caching is active.

When disabled, all cache operations become no-ops. Useful for debugging or when Redis is unavailable.

Default: true

ttl
integer

TTL sets the default time-to-live for cached items.

Balances data freshness with cache efficiency. Can be overridden per operation.

Default: 24h

prefix
string

Prefix namespaces cache keys in Redis.

Prevents key collisions when sharing Redis with other applications. Format: "<app>:<environment>:cache:"

Default: "compozy:cache:"

max_item_size
integer

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)

compression_enabled
boolean

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
integer

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)

eviction_policy
string

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"

stats_interval
integer

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

url
string

URL provides a complete Redis connection string.

Format: redis://[user:password@]host:port/db Takes precedence over individual connection parameters.

host
string

Host specifies the Redis server hostname or IP address.

Default: "localhost"

port
string

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"

password
string

Password authenticates with Redis.

Security: Use environment variables in production.

db
integer

DB selects the Redis database number.

Default: 0

max_retries
integer

MaxRetries sets the maximum number of retries before giving up.

Default: 3

pool_size
integer

PoolSize sets the maximum number of socket connections.

Default: 10 per CPU

min_idle_conns
integer

MinIdleConns sets the minimum number of idle connections.

Default: 0

max_idle_conns
integer

MaxIdleConns sets the maximum number of idle connections.

Default: 0

dial_timeout
integer

DialTimeout sets timeout for establishing new connections.

Default: 5s

read_timeout
integer

ReadTimeout sets timeout for socket reads.

Default: 3s

write_timeout
integer

WriteTimeout sets timeout for socket writes.

Default: ReadTimeout

pool_timeout
integer

PoolTimeout sets timeout for getting connection from pool.

Default: ReadTimeout + 1s

ping_timeout
integer

PingTimeout sets timeout for ping command.

Default: 1s

min_retry_backoff
integer

MinRetryBackoff sets minimum backoff between retries.

Default: 8ms

max_retry_backoff
integer

MaxRetryBackoff sets maximum backoff between retries.

Default: 512ms

notification_buffer_size
integer

NotificationBufferSize sets buffer size for pub/sub notifications.

Default: 100

tls_enabled
boolean

TLSEnabled enables TLS encryption.

Default: false

Autoload

Schema Definition
Config represents the autoload configuration for automatically discovering and loading resources.
enabled
boolean

Enabled determines whether autoload functionality is active.

When true, Compozy will automatically discover and load resources matching the patterns specified in include. When false, all resources must be explicitly defined in workflow configurations.

Default: false (explicit resource definition required)

strict
boolean

Strict controls error handling when resources cannot be loaded.

When true (default), any failure to load a discovered resource will cause the workflow to fail immediately. When false, load errors are logged but workflow execution continues.

Use cases for non-strict mode:

  • Development environments with partial resources
  • Graceful degradation in production
  • Migration periods when refactoring resources

Default: true (fail on any load error)

include
array

Include specifies glob patterns for discovering resources.

Common patterns:

  • "agents/*.yaml" - Direct children only
  • "agents/**/*.yaml" - All nested files
  • "tools/*-tool.yaml" - Files ending with "-tool"
  • "memory/*/config.yaml" - Config files in subdirectories

Required when: enabled is true

exclude
array

Exclude specifies patterns for files to ignore during discovery.

Common exclusion patterns:

  • "**/*-test.yaml" - Test fixtures
  • "**/*-draft.yaml" - Work in progress
  • "**/archive/**" - Archived resources
  • "**/.backup/**" - Backup directories

watch_enabled
boolean

WatchEnabled activates file system monitoring for hot reloading.

When true, Compozy monitors included directories for changes and automatically reloads modified resources without restarting. This is particularly useful during development.

Note: Watch mode may impact performance in directories with many files. Use specific include patterns to limit scope.

Default: false

Monitoring

Schema Definition
Config defines the monitoring and observability configuration for Compozy.
enabled
boolean

Enabled activates the monitoring endpoint and metric collection.

When true, Compozy will:

  • Start collecting internal metrics (CPU, memory, goroutines)
  • Track workflow and task execution metrics
  • Expose metrics at the configured path
  • Enable custom metric registration

Default: false (no metrics collection)

Environment variable: MONITORING_ENABLED

path
string

Path specifies the HTTP endpoint for exposing metrics.

This endpoint returns metrics in Prometheus exposition format, compatible with:

  • Prometheus scraping
  • Grafana agent
  • VictoriaMetrics
  • Other Prometheus-compatible systems

Requirements:

  • Must start with /
  • Cannot conflict with API routes (/api/*)
  • Should not contain query parameters

Common paths:

  • /metrics - Standard Prometheus convention
  • /internal/metrics - For internal-only access
  • /monitoring/metrics - Namespaced approach

Default: /metrics

Environment variable: MONITORING_PATH

Resources