Skip to content

Latest commit

 

History

History
367 lines (293 loc) · 19 KB

configuration.md

File metadata and controls

367 lines (293 loc) · 19 KB

Configuration Reference

Config lives at .crewplane/config.yml by default; see project selection for discovery and the config-derived project root. Use the version value generated by crewplane init for the current config format.

For practical setup, start with Provider setup.

Need Start here
First provider-free run Generated Mock Config
One real provider Minimal Config
Full field list Top Level and agents.<name>
Adapter options Built-In Integration Options
File-template access settings.file_access
Workspace isolation settings.workspace

Minimal Config

Use this as the smallest real-provider config after the provider CLI works in your shell. New crewplane init projects should start with the generated mock config instead.

version: "1.0"
agents:
  codex:
    cli_cmd: ["codex", "exec"]
    provider_kind: "codex"
    prompt_transport: "stdin"
    prompt_transport_arg: "-"

settings:
  integrations:
    invoker:
      implementation: "cli"
      options: {}

This assumes codex --version works directly in your shell and the workflow uses providers: ["codex"].

Generated Mock Config

Generated config from crewplane init starts with one active mock agent and settings.integrations.invoker.implementation: "mock". That makes the first crewplane validate and crewplane run work without a provider. Mock runs use repeatable sample output and make no model calls.

The generated config includes examples for Claude, Codex, Gemini, Copilot, Kilo, Pi, DeepSeek, and OpenCode. To enable a provider, remove the leading # from its example and review its settings before switching the invoker to cli.

version: "1.0"

agents:
  mock:
    cli_cmd: ["__crewplane_mock_invoker_never_executes__"]
    provider_kind: "generic"
    prompt_transport: "stdin"
    default_model: "mock"

settings:
  integrations:
    invoker:
      implementation: "mock"
      options:
        output_mode: "lorem"
        seed: 42
        delay_seconds: 0.25
        observation_delay_seconds: 5

Switching To Real Providers

When switching from the generated mock config to real providers:

  • keep only the agents entries you want to run
  • confirm each provider CLI works directly
  • change workflow providers values to those agent names
  • set settings.integrations.invoker.implementation: "cli"
  • replace generated mock invoker options with options: {}

Provider setup diagram showing the matching agent name in .crewplane/config.yml, the matching workflow provider name, and the invoker switch from mock to cli.

.crewplane/config.yml defines agents.<name>. Workflows select that same name with providers: ["<name>"]. implementation: "mock" keeps the first run provider-free; implementation: "cli" runs real provider commands.

The following tables are a field index for .crewplane/config.yml; nested settings use dotted paths in the left column.

Top Level

Field Description
version Config schema version.
agents Named provider configurations used by workflow nodes.
settings Optional runtime settings. If omitted, default settings are used.

agents.<name>

Crewplane uses provider aliases in generated invocation filenames. Before a run, it checks that each generated invocation file or directory name is at most 180 characters, including the alias and details such as the provider role and review round. If a name is too long, shorten the alias. Unused aliases are unaffected. This limit applies to each name separately; the full path may still exceed a filesystem's limit.

Field Description
cli_cmd Provider command and its arguments, as a non-empty list.
environment String-to-string environment overrides for this agent's CLI. Defaults to {}. Applied during validation and execution; changes affect reuse of saved results.
provider_kind A lowercase ASCII identifier matching [a-z][a-z0-9_-]*. Built-ins are claude, codex, copilot, gemini, kilo, pi, deepseek, opencode, and generic (default). External identifiers require an explicit CLI capability registration.
default_model Model to use when the workflow provider omits model. Leave both fields unset for DeepSeek and choose its model in DeepSeek's settings.
model_arg Model flag for provider_kind: generic. Defaults to --model; set it to null to send no model flag. The built-in CLI invoker ignores it for other provider kinds and warns before the run.
prompt_transport stdin sends the prompt through standard input; argv passes it as a command argument. Defaults to stdin.
prompt_transport_arg Required argument placed before the prompt in argv mode. In stdin mode, an optional marker such as - that tells the CLI to read standard input.
extra_args Extra arguments added to the provider command.
max_retries Maximum ordinary non-quota retry attempts. Defaults to 0.
retry_delay_seconds Delay between generic retries. Defaults to 300.0.
retry_on_exit_codes Exit codes that trigger retry.
retry_on_stderr_contains Stderr substrings that trigger retry.
retry_on_output_contains Combined output substrings that trigger retry.
quota_reached_on_contains Output substrings treated as quota exhaustion.
quota_reached_retry_delay_seconds Delay after quota detection. Defaults to 300.0.
quota_reset_sleep_floor_seconds Minimum sleep when a quota reset time is parsed. Defaults to 5.0.
quota_retry_max_wait_seconds Optional limit on the total seconds spent waiting for quota resets during one invocation. Retries stop before the next wait would reach this limit.
quota_retry_max_attempts Optional limit on quota retries during one invocation, separate from max_retries.
invocation_timeout_seconds Maximum running time in seconds for each provider command. Defaults to null (no fixed time limit).
invocation_idle_timeout_seconds Seconds a provider command may go without output before it is stopped. Defaults to 1800.0. Disabled for Gemini's JSON mode, Pi's text mode, and the Ollama agent; use invocation_timeout_seconds to limit their running time.
pricing Optional token pricing buckets.

For provider_kind: pi, use prompt_transport: stdin and omit prompt_transport_arg. Crewplane adds the required options for text output and session handling. The generated profile disables automatic extension loading. See Pi setup for credentials, permissions, model selection, and timeouts.

For DeepSeek, use the generated profile with provider_kind: deepseek, prompt_transport: argv, and prompt_transport_arg: "--". Leave out Crewplane's model and reasoning fields, and configure the model, credentials, and permissions in DeepSeek. The DeepSeek setup guide includes the required command and saved permission preset.

Agent environment values override inherited process variables without changing Crewplane's own environment. Windows variable names are case-insensitive. Runtime-controlled workspace Git values and removals take precedence. Names must be nonblank and contain neither = nor NUL; values must not contain NUL. Use this mapping for non-secret settings such as OLLAMA_HOST. Values live in your YAML file; prefer inherited environment variables or the provider's credential store for credentials.

Crewplane records command arguments in run files. For recognized secret options in cli_cmd, extra_args, or workspace setup commands, Crewplane hides the values in saved run files and error messages. Changes to those values still affect run reuse without saving the credentials themselves.

Crewplane checks the model, reasoning, and prompt settings for every provider used by the workflow during crewplane validate, dry runs, and before starting a real run. Provider token counts and Crewplane's estimates from captured text are reported separately. A provider profile may have no token counts even when estimates are available.

OpenCode Options

For OpenCode, set provider_kind: opencode, cli_cmd: [opencode, run], and prompt_transport: stdin. Leave out prompt_transport_arg. Follow OpenCode setup to connect it to a workflow and configure permissions.

You can add these OpenCode options to extra_args or after run in cli_cmd:

Option What it does
--agent Chooses an OpenCode agent, such as build or plan.
--variant Chooses a model variant, such as high, if the model supports it.
--title Names the session saved by OpenCode.
--log-level Sets OpenCode's log level: DEBUG, INFO, WARN, or ERROR.
--thinking Includes the model's thinking in the provider log.
--print-logs Includes OpenCode's diagnostic logs.
--auto Automatically approves permission requests unless OpenCode's settings explicitly deny them.

The first four options need a value, for example extra_args: [--agent, build] or extra_args: [--agent=build]. Keep each option and its value in the same list, and specify each option only once across cli_cmd and extra_args. For the last three options, use the flag by itself or add =true or =false, for example extra_args: [--thinking=false].

Prefer default_model or the workflow's model field to choose a model. You can also use --model (or -m) with a value, but only once and only when both of those fields are unset.

Crewplane supplies --format and --dir automatically. Other options and extra prompt text are rejected, including options for continuing sessions, connecting to a server, or attaching files. Keep run immediately after the executable.

agents.<name>.pricing

Pricing values are per million tokens.

Field Description
input Input token price.
cached_input Cached input token price.
cache_write Cache write token price.
output Output token price.
reasoning Reasoning token price.
total Total token price. Cannot be combined with bucket-specific pricing.

settings

Field Description
settings.log_level Runtime log level string. Defaults to info.
settings.sequential_consensus_on_exhaustion continue or fatal. Defaults to continue.
settings.max_audit_rounds Maximum allowed node audit_rounds. Defaults to 5.
settings.max_concurrent_nodes Optional cap on concurrent ready nodes. A finite positive value is required for workflows containing foreach.
settings.max_parallel_invocations Optional cap on provider invocations inside a parallel node.
settings.max_expanded_nodes Strict positive integer limiting generated nodes across all foreach groups in one run. Defaults to 10000. Counts composed child nodes, including item inputs; completed groups do not release budget.
settings.file_access Permissions for including files with {{file:...}}.
settings.token_budget Global token budget warning/failure thresholds.
settings.workspace Workspace isolation settings.
settings.integrations Adapter implementation and option settings.

Iteration preflight sums literal item counts, or dynamic max_items, multiplied by the number of nodes in each compiled child. The total must fit max_expanded_nodes. Lower this limit for smaller machines; node concurrency limits running work, while this limit bounds the entire generated graph. See Foreach nodes for collection limits.

settings.file_access

Field Description
allowed_template_paths Paths outside the project that {{file:...}} may read. Defaults to []. For file-loaded config, relative paths start from the config-derived project root; ~ expands to your home directory and checks follow symlinks to their targets.

These permissions apply to every artifact integration and affect whether a previous run can be reused. Configure them under settings.file_access; the filesystem integration rejects allowed_template_paths as its own option.

settings.token_budget

Field Description
settings.token_budget.warn_threshold_chars Warn when inserted prompt context exceeds this many characters. Defaults to 50000.
settings.token_budget.fail_threshold_chars Optional character limit for inserted prompt context; exceeding it stops the invocation.

settings.workspace

Workspace isolation is disabled by default. Missing settings.workspace is equivalent to settings.workspace.enabled: false. When it is disabled, workflows must not declare worktrees, and provider nodes run from the project root. settings.default_workspace is not supported.

Field Description
settings.workspace.enabled Allows Crewplane to create workspaces for workflow worktrees. Defaults to false.
settings.workspace.cache_root Optional absolute workspace cache path when workspace isolation is enabled. If omitted, Crewplane uses the platform cache location.
settings.workspace.cleanup_on_success Delete successful workspace cache entries. Defaults to true.
settings.workspace.worktree_contract blob_exact: files must match the recorded Git contents exactly when the workspace is prepared.
settings.workspace.clean_start strict or tracked_only. Defaults to strict.
settings.workspace.setup_profiles Mapping of setup profile names to commands.
settings.workspace.setup_profiles.<name>.run Non-empty list of setup commands, each written as a list of command arguments.
settings.workspace.setup_timeout_seconds Setup command timeout. Defaults to 600.0.
settings.workspace.identity.include_cache_root Include cache root in workspace identity. Defaults to false.
settings.workspace.max_concurrent_materializations Maximum workspaces Crewplane can prepare at once. Defaults to 1.
settings.workspace.disk.warn_free_bytes Optional free-space warning threshold.
settings.workspace.disk.fail_free_bytes Optional free-space failure threshold. Must not exceed warn_free_bytes.

Prices, delays, timeouts, and other floating-point controls must be finite. YAML infinity and NaN values are rejected; saved JSON also follows this rule.

Workspace isolation requires a regular Git repository on Linux, macOS, or WSL and a provider integration that runs commands in the assigned working directory. The blob_exact mode rejects Git LFS, custom filters, attributes that rewrite file contents or line endings, submodules, sparse checkouts, and partial clones before starting provider commands.

settings.integrations

Field Description
settings.integrations.invoker.implementation Invoker alias or dotted path. Defaults to cli.
settings.integrations.invoker.options JSON-compatible invoker options.
settings.integrations.ui.implementation UI alias or dotted path. Defaults to tmux.
settings.integrations.ui.options JSON-compatible UI options.
settings.integrations.artifacts.implementation Artifact alias or dotted path. Defaults to filesystem.
settings.integrations.artifacts.options JSON-compatible artifact options.

Built-In Integration Options

cli invoker

Runs configured agents commands against real provider CLIs. Its only option is providers, an explicit map of installed capabilities. See the registration contract for authored and canonical records.

When switching the generated config from mock to cli, replace the generated mock invoker options: block with options: {} for built-in providers, or an options.providers registration map for plugins. Leaving mock options such as output_mode, seed, or delay settings under the cli invoker is a config error.

Real provider runs start the external commands configured in .crewplane/config.yml. Those tools run with their own filesystem, network, credential, approval, and sandbox settings. Crewplane coordinates them and records artifacts; it does not sandbox them.

The generated config includes a commented local agent and an Ollama plugin registration. The included plugin uses cli_cmd: [ollama-agent], provider_kind: ollama, prompt_transport: stdin, and extra_args: []. It requires a model. Follow the plugin setup guide for the complete configuration and migration from older ollama run profiles.

mock invoker

Use mock to validate and run workflows without starting provider CLIs. It produces repeatable sample output for checking workflows.

Option Description
delay_seconds Non-negative delay before mock output. Defaults to 0.
observation_delay_seconds Non-negative visible-observation delay. Defaults to 5.0.
output_mode lorem, echo, or file. Defaults to lorem.
output_dir Fixture directory, relative to the source project root unless absolute. Required when output_mode: "file". No ~ expansion.
strict_file_mode Fail on missing fixtures instead of fallback output. Defaults to false.
seed Optional integer seed or null.
fail_when Conditions that make mock invocations fail.

mock.fail_when[] conditions can match node_id, task_id, provider, role, audit_round_num, and round_num.

The generated mock agent uses a placeholder cli_cmd value. The mock invoker does not start or validate that command.

tmux UI

Option Description
auto_close_session Close the tmux session at run end. Defaults to true.
tmux_executable tmux executable name. Defaults to tmux.
quiet_after_seconds Delay before showing the quiet message when a running provider's log stops updating. Defaults to 120.0 seconds; must be at least 1.0.
log_tail_lines Optional fixed log tail line count from 1 to 200, or null.

none UI

Disables the live UI adapter. Runs still execute normally and write artifacts and logs, but no tmux dashboard or other live observers are created. It has no options.

filesystem artifacts

Option Description
log_cli_output Capture provider CLI output logs. Defaults to true.

Dotted-Path Adapters

To select an external adapter, use its Python import path. The adapter validates its own options, which must be JSON-compatible data with finite numbers. It must assign each validated option exactly one scope: execution, artifact, observer, or validation. These scopes determine how an option affects run reuse. Crewplane rejects missing scopes or scopes for unknown options. Sensitive option locations use RFC 6901 JSON Pointer paths beginning with /, such as /api_key.