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:
| entrance | function | Example |
|---|---|---|
| default path | Configuration files used for daily installation | ~/.pilotdeck/pilotdeck.yaml |
PILOT_HOME | Adjust the PilotDeck data root directory, the configuration is located in this directory | /data/pilotdeck(The configuration file is /data/pilotdeck/pilotdeck.yaml) |
PILOTDECK_CONFIG_PATH | Directly 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.
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
| Field | meaning | Fill in the requirements |
|---|---|---|
schemaVersion | Configuration format version | currently in use 1 |
agent.model | Main agent default model | provider/model |
model.providers.<id> | Connection and model definition of a service provider | The identifier must be consistent with the model reference |
protocol | Service provider calling protocol | openai、openai-responses、anthropic or google |
url | Service provider API base address | Fill in the entry corresponding to the agreement |
apiKey | Calling Credentials | Actual key or environment variable placeholder |
models.<id> | Models that can be referenced by agents and routes | Model ID should match the name accepted by the service provider |
timeoutMs | Service provider call timeout | Unit is milliseconds |
headers / extraBody | Custom request headers and request parameters | Set 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:
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:
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.
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:
| Field | Purpose and filling instructions |
|---|---|
autoOrchestrate.enabled / triggerTiers | Turn 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 / minSavingsRatio | Controls 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.modelPricing | to 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.baselineModel | Baseline 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
| Partition | Manage content | Common fields |
|---|---|---|
agent | Default model, output caps, and subagents | model、maxOutputTokens、subagents.default |
model | Service providers, protocols, keys and model pools | providers |
router | Task determination, backup models and statistics | tokenSaver、fallback、stats |
memory | Memory switches, processing models and scheduling | enabled、model、schedule |
alwaysOn | Background resident and isolated execution | enabled |
cron | Scheduled task running capability | enabled |
tools | Tool service configuration | webSearch |
gateway | Gateway port and session management | port、idleSessionTimeoutMinutes |
adapters | Connect with Feishu and other messaging channels | of various channels enabled with credentials |
extension | Built-in plug-in switches and hook behaviors | builtinPluginsEnabled、includeHookEvents |
telemetry | telemetry switch | enabled, closed by default |
proxy | runtime agent | url、noProxy |
webui | Web UI server-specific configuration | Handled 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
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
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
- **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.
- **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.
- **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.
- **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.
- **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.
| interface | Purpose |
|---|---|
GET /api/config | Read the configuration path, masked original YAML, structured configuration, verification results and revision |
POST /api/config/validate | Submit {raw: "..."} Or structured configuration for verification without writing to the file |
PUT /api/config | Save 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:
defaultTiermust exist intiersin,subagent.policyonly allowedskiporjudge, 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
routeroradapters。 - **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_MODELWill overwrite YAMLagent.model。agent.modelwithrouter.scenarios.defaultIn case of inconsistency, useagent.modelshall prevail and produceCONFIG_MODEL_CONFLICTWarning. - **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.