FrostAgent compiles to a single self-contained binary that starts two network listeners: an HTTP server for the management panel and ConnectRPC APIs, and a WebSocket server for the OneBot v11 protocol. This page walks through building the binary, configuring it from environment variables, running it as a managed service, and connecting it to a OneBot client.Documentation 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.
Building the binary
FrostAgent requires Go 1.25.3 or later, as declared ingo.mod. Build the production binary with:
frostagent in the current directory. The CI workflow in .github/workflows/go.yml performs a full build, vet, and test run on every push to main — run those same steps locally before deploying:
Environment configuration
FrostAgent reads configuration from environment variables. On startup, thegodotenv library checks for a .env file in the working directory and loads it automatically. If the file is absent, the process continues with whatever variables are already present in the environment — no error is raised.
Copy the provided template and fill in your values:
.envfile — place it in the same directory as thefrostagentbinary and it will be loaded at startup.- System environment variables — export them via your process manager (
systemd, Docker, Kubernetes). These take precedence if both a.envfile and a system variable are set for the same key.
Required environment variables
At minimum, three variables must be set before the engine can make any LLM calls:| Variable | Description | Example |
|---|---|---|
UPSTREAM_ENDPOINT | Base URL of the OpenAI-compatible LLM API | https://api.openai.com/v1 |
UPSTREAM_API_KEY | Bearer token for the upstream API | sk-... |
MODEL_NAME | Model identifier to request from the upstream API | gpt-4o |
| Variable | Default | Description |
|---|---|---|
LISTEN_ADDR | :8080 | Bind address for the HTTP management server |
WS_LISTEN_ADDR | 0.0.0.0:1234 | Bind address for the OneBot WebSocket server |
SYSTEM_PROMPT | 你是一个乐于助人的助手。 | System prompt prepended to every conversation |
VISUAL_MODEL_NAME | (same as MODEL_NAME) | Override model used for vision tasks |
MAX_CONTEXT_MESSAGES | 20 | Maximum conversation messages retained per session (including system) |
MAX_CONTEXT_CHARS | 24000 | Approximate character limit for context before trimming |
WS_ALLOWED_ORIGINS | (empty, all origins allowed) | Comma-separated list of permitted WebSocket origins |
ENABLE_AT_IN_GROUP_MSG | true | Prefix group chat replies with an @mention |
Service ports
FrostAgent opens two TCP listeners:HTTP — Management + ConnectRPC
Default:
:8080Serves the management panel SPA at / and the ConnectRPC endpoints at /frostagent.v1.*. Override with LISTEN_ADDR.WebSocket — OneBot v11
Default:
0.0.0.0:1234Accepts OneBot WebSocket connections at /ws/frostagent. Override with WS_LISTEN_ADDR.Running as a systemd service
Create a unit file at/etc/systemd/system/frostagent.service:
Running with Docker
Use a multi-stage build to keep the image small:.env file into the container:
CI/CD
The repository ships with a GitHub Actions workflow at.github/workflows/go.yml that runs on every push and pull request to main. It:
- Checks out the code and installs Go 1.25.
- Downloads module dependencies (
go mod download). - Installs the
bufprotobuf toolchain and regenerates proto code. - Builds all packages (
go build ./...). - Runs
go vetand the full test suite (go test ./... -v).
Test step to automatically ship a passing build to your server or container registry.
Connecting a OneBot client
After FrostAgent is running, point your OneBot v11 client at the WebSocket endpoint. The path is always/ws/frostagent: