Keep secrets out of the config file
Reference a secret from mistral-native.json without storing it there — for example, a gateway URL or agent id provisioned by a secret manager. You need this when the value is secret or machine-specific.
Prerequisites
Section titled “Prerequisites”- The
pi-mistral-nativepackage installed - The secret available as an environment variable, or printable by a shell command
-
Store the secret outside the config file — a secret manager, an environment file your shell sources, or
auth.jsonfor the API key. -
Reference it from the config value.
agentIdandendpoint.baseUrlsupport the config-value protocol:{"agentId": "$MISTRAL_AGENT","endpoint": { "baseUrl": "!pass show mistral/gateway-url" }}$VAR/${VAR}— interpolate an environment variable!command— run a shell command (10s timeout); the trimmed stdout is the value$$and$!— literal$and!
-
Verify the effective value:
/mistralThe status card shows the raw stored string (never the resolved value). A referenced-but-unset variable, or a failing command, resolves the whole value to unset — never an error, never logged; the key falls through to lower layers.