FrostAgent reads its entire configuration from environment variables at startup. The recommended approach is to maintain aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GuaiZai233/FrostAgent/llms.txt
Use this file to discover all available pages before exploring further.
.env file in the project root; the godotenv library loads this file automatically before the engine initialises. Variables already present in the system environment take precedence over those defined in .env, so you can override individual settings in containerised or CI deployments without modifying the file.
Create your local configuration file from the provided template:
.env in your editor and fill in the values for your environment. The sections below document every supported variable.
Complete .env reference
The following is the canonical annotated .env.example from the repository, showing all variables and their defaults:
LLM provider
The base URL of your OpenAI-compatible chat completions API. FrostAgent appends the appropriate path (
/chat/completions) automatically.Example: https://dashscope.aliyuncs.com/compatible-mode/v1Default: https://dashscope.aliyuncs.com/compatible-mode/v1Requires restart to take effect.Bearer token used to authenticate against
UPSTREAM_ENDPOINT. Passed as Authorization: Bearer <key> on every LLM request.Default: sk-your-api-key-here (must be replaced)Requires restart to take effect.A separate API key used by the built-in sub-agent / coder tool. This allows you to route sub-agent calls to a different account or a more powerful model tier without affecting the primary engine key.Default: same placeholder as
UPSTREAM_API_KEYRequires restart to take effect.The model identifier string sent in every chat completion request. The exact value depends on your provider (e.g.
qwen-turbo, gpt-4o, deepseek-chat). Leave blank to use your provider’s default model.Default: (empty — provider default)Requires restart to take effect.Model identifier for multimodal / vision requests. When set, image-containing messages are routed to this model instead of
MODEL_NAME. Leave blank to send all requests through MODEL_NAME.Default: (empty — falls back to MODEL_NAME)Requires restart to take effect.Network
The
host:port on which the HTTP server listens. This server hosts both the ConnectRPC management API and the embedded frontend SPA.Default: :8080Requires restart to take effect.The
host:port on which the OneBot v11 WebSocket server listens. Your OneBot client should connect to ws://<host>:<port>/ws/frostagent.Default: 0.0.0.0:1234 (the .env.example template uses :1234, which binds all interfaces on most systems; the code-level fallback when the variable is absent is explicitly 0.0.0.0:1234)Requires restart to take effect.Comma-separated list of
Origin header values that are permitted to open a WebSocket connection. An empty value disables origin checking and allows connections from any origin — suitable for local development but not recommended for production.Example: https://mybot.example.com,https://staging.example.comDefault: (empty — all origins allowed)Requires restart to take effect.Context window
The maximum number of messages retained in a session’s context window, including the system prompt. When the session exceeds this limit, the oldest non-system messages are dropped to stay within bounds.Default:
20Takes effect immediately — no restart required.An approximate upper bound on the total character count of all messages in a session context. If the accumulated text exceeds this threshold, older messages are trimmed before the next LLM call. This acts as a secondary guard in addition to
MAX_CONTEXT_MESSAGES.Default: 24000Takes effect immediately — no restart required.Agent behaviour
The system-role message injected at position zero of every session context. This is your primary mechanism for giving the agent a persona, constraining its behaviour, or providing background knowledge.Default:
你是一个乐于助人的助手。 (“You are a helpful assistant.”)Takes effect immediately — no restart required.When
true, FrostAgent prepends @<sender_user_id> to every reply sent in a group chat, making it clear which user the bot is responding to. Set to false if your group chat client handles threading differently.Default: trueTakes effect immediately — no restart required.Hot-reload vs. restart
Some configuration changes are picked up without restarting FrostAgent; others require a full process restart because the value is read only once at initialisation.| Variable | Hot-reload? |
|---|---|
SYSTEM_PROMPT | ✅ Immediate |
MAX_CONTEXT_MESSAGES | ✅ Immediate |
MAX_CONTEXT_CHARS | ✅ Immediate |
ENABLE_AT_IN_GROUP_MSG | ✅ Immediate |
UPSTREAM_ENDPOINT | 🔄 Restart required |
UPSTREAM_API_KEY | 🔄 Restart required |
CODER_API_KEY | 🔄 Restart required |
MODEL_NAME | 🔄 Restart required |
VISUAL_MODEL_NAME | 🔄 Restart required |
LISTEN_ADDR | 🔄 Restart required |
WS_LISTEN_ADDR | 🔄 Restart required |
WS_ALLOWED_ORIGINS | 🔄 Restart required |
UPSTREAM_API_KEY and CODER_API_KEY are sensitive credentials. FrostAgent’s management UI masks these values in the settings editor so they are not exposed in plaintext to anyone with browser access to the management panel.Using system environment variables
If you prefer not to use a.env file — for example in a Docker container or a systemd service — you can export variables directly in the environment where FrostAgent runs:
.env file, so you can use the file for defaults and override specific keys at the process level.