Skip to main content
Back

YAML Configuration

PilotDeck Agent Series

pilotdeck.yaml It is the running configuration entry of PilotDeck. Model service providers, default models, Routers, memories, resident tasks, tools and message channels can all be managed here. Visual settings and YAML use the same configuration, which is suitable for completing basic settings through the interface first, and then adding advanced fields as needed.

1. Where Is the Configuration File?​

The default path is ~/.pilotdeck/pilotdeck.yaml. The current configuration file path is displayed at the bottom of "Settings → System" and the corresponding file can be opened in a file manager or text editor. Source code and custom deployment can also specify configuration through environment variables:

entrancefunctionExample
default pathConfiguration files used for daily installation~/.pilotdeck/pilotdeck.yaml
PILOT_HOMEAdjust the PilotDeck data root directory, the configuration is located in this directory/data/pilotdeck(The configuration file is /data/pilotdeck/pilotdeck.yaml)
PILOTDECK_CONFIG_PATHDirectly specify the configuration file path, taking precedence over the default location/etc/pilotdeck/pilotdeck.yaml

Explicitly passed in by the loader configPath take precedence over PILOTDECK_CONFIG_PATH, the latter takes precedence over PILOT_HOME The default configuration path under . When there is no valid configuration when starting for the first time, the Web UI will enter Onboarding; save the valid model configuration before starting the Gateway.

2. Minimal Configuration: Connect a Model​

The following example uses the OpenAI protocol. Replace the API Key and model with values you can actually access.openai Is the service provider ID,gpt-4.1-mini Is the model identifier, the default model passes openai/gpt-4.1-mini Quote.

YAML
schemaVersion: 1

agent:
model: openai/gpt-4.1-mini

model:
providers:
openai:
protocol: openai
url: https://api.openai.com/v1
apiKey: ${OPENAI_API_KEY}
models:
gpt-4.1-mini: {}

${OPENAI_API_KEY} Will be read from the environment of the process running PilotDeck; make sure this environment variable is set. You can also fill in the API Key in the model pool interface. Just because the configuration can pass the verification does not mean that the service provider connection must be successful. You also need to run a model connection test.

2.1 Model Field Description​

FieldmeaningFill in the requirements
schemaVersionConfiguration format versioncurrently in use 1
agent.modelMain agent default modelprovider/model
model.providers.<id>Connection and model definition of a service providerThe identifier must be consistent with the model reference
protocolService provider calling protocolopenai、openai-responses、anthropic or google
urlService provider API base addressFill in the entry corresponding to the agreement
apiKeyCalling CredentialsActual key or environment variable placeholder
models.<id>Models that can be referenced by agents and routesModel ID should match the name accepted by the service provider
timeoutMsService provider call timeoutUnit is milliseconds
headers / extraBodyCustom request headers and request parametersSet according to service provider interface requirements

If a custom model actually supports image input, the capability needs to be explicitly declared in the model definition; unknown/custom models only receive text by default. Merge the following fragments into the corresponding service provider's models , replace the model ID with the actual name:

YAML
models:
your-vision-model:
multimodal:
input: [text, image]

2.2 Connect to Native Gemini​

Native Google Gemini use google agreement. The following is an example of a standalone configuration:

YAML
schemaVersion: 1
agent:
model: google/gemini-3.1-pro-preview
model:
providers:
google:
protocol: google
url: https://generativelanguage.googleapis.com
apiKey: ${GEMINI_API_KEY}
models:
gemini-3.1-pro-preview: {}

3. Complete Example of Starting Router​

Define the execution model first, and then define the judge, gears and backup chains. This example can be used independently as a configuration file; you need to provide a valid API Key and confirm that the account has permission to use the corresponding model.

YAML
schemaVersion: 1
agent:
model: openai/gpt-4.1
subagents:
default: inherit
model:
providers:
openai:
protocol: openai
url: https://api.openai.com/v1
apiKey: ${OPENAI_API_KEY}
models:
gpt-4.1: {}
gpt-4.1-mini: {}
router:
enabled: true
tokenSaver:
enabled: true
judge: openai/gpt-4.1-mini
defaultTier: medium
judgeTimeoutMs: 15000
subagent:
policy: judge
tiers:
simple:
model: openai/gpt-4.1-mini
medium:
model: openai/gpt-4.1-mini
reasoning:
model: openai/gpt-4.1
complex:
model: openai/gpt-4.1
fallback:
default:
- openai/gpt-4.1-mini
stats:
enabled: true
baselineModel:
provider: openai
model: gpt-4.1

This example enables gear determination, backup chain and statistics. When division of labor is required for complex tasks, add router.autoOrchestrate. Not configured modelPricing The built-in or bottom-line unit price estimate will also be used when estimating; when it is necessary to estimate based on the actual service provider unit price, add router.stats.modelPricing. Statistical amounts do not equate to actual bills. For routing principles, see Router save money routing。

The following fields are added as needed to the existing router Medium:

FieldPurpose and filling instructions
autoOrchestrate.enabled / triggerTiersTurn on automatic arrangement and specify the trigger gear, for example [complex];Trigger conditions such as task division must also be met. See the principle page.
tokenSaver.cacheAwareSwitching.enabled / minSavingsRatioControls cache-aware switching. It is enabled by default and the threshold is 0;The threshold is filled in with a ratio, for example 0.1 means 10%
stats.modelPricingto provider/model Fill in for key input、output, optional cacheRead Unit price, unit is per million Token;unit can be $/million tokens or ¥/million tokens, only for display, not for exchange rate conversion.
stats.baselineModelBaseline model for statistical comparison, fill in according to the above example provider and model;The saving ratio depends on this benchmark

4. Commonly Used Configuration Partitions​

PartitionManage contentCommon fields
agentDefault model, output caps, and subagentsmodel、maxOutputTokens、subagents.default
modelService providers, protocols, keys and model poolsproviders
routerTask determination, backup models and statisticstokenSaver、fallback、stats
memoryMemory switches, processing models and schedulingenabled、model、schedule
alwaysOnBackground resident and isolated executionenabled
cronScheduled task running capabilityenabled
toolsTool service configurationwebSearch
gatewayGateway port and session managementport、idleSessionTimeoutMinutes
adaptersConnect with Feishu and other messaging channelsof various channels enabled with credentials
extensionBuilt-in plug-in switches and hook behaviorsbuiltinPluginsEnabled、includeHookEvents
telemetrytelemetry switchenabled, closed by default
proxyruntime agenturl、noProxy
webuiWeb UI server-specific configurationHandled by Web UI service

Each partition is parsed by the corresponding module. Only fill in the required functions; when adding new fields, the format on the corresponding function page should be used.

4.1 Memory Configuration Fragment​

YAML
memory:
enabled: true
model: openai/gpt-4.1-mini
captureStrategy: last_turn
includeAssistant: true

The memory processing model also references the model pool provider/model. This snippet only shows basic switch and collection settings, and does not include complete scheduling and retrieval configurations.

4.2 Feishu Message Channel Snippet​

YAML
adapters:
feishu:
enabled: true
appId: cli_your_app_id
appSecret: your_app_secret
connectionMode: stream
domainName: feishu
defaultSessionLabel: Feishu Assistant

Replace the application credentials with the actual values in Feishu Open Platform, and complete the robot permissions and event configuration. Lark uses domainName: lark。gateway To manage the running gateway of PilotDeck, fill in the message channel credentials in adapters in.

5. Editing, Verification and Validation​

  1. **Confirm current configuration:**Check the actual file path in "Settings → System"; commonly used options are first edited through the model pool, routing and other forms.
  2. **Edit YAML:**When advanced fields are required, use a text editor to directly modify the corresponding file, or submit the original YAML through the configuration interface. Use spaces for indentation to avoid duplication of top-level keys.
  3. **Handle diagnostics:**Check YAML syntax, field types, and model references. When the parsing fails, the related form cannot be loaded temporarily, and the configuration needs to be repaired in the file first and then refreshed.
  4. **Save and confirm to take effect:**Form saving triggers a reload through the configuration service; after editing the file directly, restart the corresponding instance to confirm that the new configuration is loaded.
  5. **Verify actual behavior:**Run a model connection test or round of tasks to confirm the selected model and related functionality. Create a new running instance or restart the service based on reload feedback.

Different fields take effect at different times: model and some routing fields can affect subsequent requests, some functions require new running instances, and changes such as statistics switches or custom routing plug-ins may require a restart. Successful saving and all currently running functions have been updated and need to be confirmed separately.

6. Configure Interface​

When you need to manage the configuration through the program, you can call the following interface; the request requires valid login credentials.

interfacePurpose
GET /api/configRead the configuration path, masked original YAML, structured configuration, verification results and revision
POST /api/config/validateSubmit {raw: "..."} Or structured configuration for verification without writing to the file
PUT /api/configSave configuration and trigger reload, portable baseRevision Detect concurrent modifications

When the configuration has been modified by other windows or processes, saving may return 409 CONFIG_CONFLICT. Reread the latest configuration and merge this modification. The mask key in the read result can be restored during the normal saving process; credentials need to be provided again when creating a new service provider or changing the key scope.

7. FAQ​

  • **Invalid model reference:**Check the service provider and model ID, reference using provider/model, the display name of the model cannot be filled in.
  • Router configuration cannot be saved:defaultTier must exist in tiers in,subagent.policy only allowed skip or judge, the model and price keys must reference the configured model.
  • **Duplicate keys after copying fragment:**Merge new fields into existing objects, e.g. keep only one top level router or adapters。
  • **The configuration works but the call fails:**Continue to check the service provider address, protocol, API Key, model permissions and network connection.
  • The default model is inconsistent with the file:PILOT_AGENT_MODEL Will overwrite YAML agent.model。agent.model with router.scenarios.default In case of inconsistency, use agent.model shall prevail and produce CONFIG_MODEL_CONFLICT Warning.
  • **It does not take effect after editing:**Confirm that the modified file is actually the file read by the current instance, and check the reload or restart feedback.

Developer Showcase

View all →