FrostAgent

module
v0.0.0-...-b134a75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MPL-2.0

README

FrostAgent Logo
FrostAgent-Go

FrostAgent is an AI role-playing and agent orchestration framework written in Go. It supports multiple protocols, including OneBot, and can be integrated with instant messaging platforms.

English | 简体中文

Go Version CI Status License Go Reference Codecov Coverage OpenSSF Scorecard

Quick Start

1. Build the Project

This project uses the Makefile in the repository root to orchestrate the build process. For local development and verification commands, see the Development Guide.

pnpm install
go install github.com/bufbuild/buf/cmd/buf@v1.75.0
make build

2. Choose a Database

SQLite is used by default. On the first startup, FrostAgent creates data/frostagent.db. PostgreSQL is also supported.

Switching databases does not automatically migrate data. If migration is required, back up and restore the data manually. Only one FrostAgent process may use the same PostgreSQL database at a time.

3. Start the Service

go run ./cmd/app

Open http://localhost:8080 in your browser. No instance is created automatically on the first startup, so you must create one manually.

Docker Deployment

For the first deployment, copy docker.env.example to .env and set FROSTAGENT_BOOTSTRAP_CONTROL_TOKEN to a random ASCII token of at least 32 characters before starting:

docker compose up -d --build

Open http://127.0.0.1:8080/#/settings/credentials (Settings → Access credentials) and save the same token under "API / Control Plane Access Credentials".

Adapters

WebSocket Connection Modes

After creating an instance, configure the connection on the "Connections" page.

  • Reverse WebSocket (FrostAgent as server): The upstream connects to FrostAgent. Enable a reverse WebSocket client in the upstream messaging platform implementation and paste the copied OneBot URL, for example ws://127.0.0.1:11023/instances/<instance-id>/ws/onebot.
  • Forward WebSocket (FrostAgent as client): The upstream provides a WebSocket server. Enter its ws:// or wss:// URL and optional access token on the FrostAgent "Connections" page.

Additional Features

Automatic Context Compaction

Group and private conversations support background compaction. Private chats retain the latest turn alongside a rolling summary. See context compaction for configuration and session lifetime details (Chinese).

Memory is isolated by user and group scope. Group turns may recall the current sender's user memories, while all group writes belong to the current group. See memory scopes for access and existing-data behavior (Chinese).

Integration with ActionsCat

ActionsCat supports statically orchestrated automated workflows.

After connecting ActionsCat through an adapter, you can run both systems alongside each other, combining static workflow orchestration with the capabilities of AI agents.

Integration with Alcyone

Alcyone is a billing system backend developed by GuaiTech. It helps track usage and calculate charges when bots operate in public settings, such as group chats, making resource consumption, including token usage, measurable.

Integration with Code-interpreter

Code-interpreter is a lightweight sandbox runtime based on Foxerine, enabling bots to execute simple Shell commands and similar operations.

License

MPL-2.0 (see LICENCE).

Directories

Path Synopsis
cmd
app command
internal
adapter/directchat
Package directchat defines the shared mock WebSocket request markers.
Package directchat defines the shared mock WebSocket request markers.
adapter/heartbeat
Package heartbeat provides connection-scoped WebSocket liveness checks.
Package heartbeat provides connection-scoped WebSocket liveness checks.
adapter/onebot
Package onebot implements the OneBot v11 protocol adapter for FrostAgent.
Package onebot implements the OneBot v11 protocol adapter for FrostAgent.
adapter/thinking
Package thinking manages best-effort, request-scoped typing notifications.
Package thinking manages best-effort, request-scoped typing notifications.
adapter/wsauth
Package wsauth authenticates real inbound adapter WebSocket handshakes.
Package wsauth authenticates real inbound adapter WebSocket handshakes.
adapter/wsclient
Package wsclient owns adapter WebSocket configuration and outbound retries.
Package wsclient owns adapter WebSocket configuration and outbound retries.
balancequery
Package balancequery owns administrator-configured balance requests and secrets.
Package balancequery owns administrator-configured balance requests and secrets.
buildinfo
Package buildinfo exposes the identity of the source used to build FrostAgent.
Package buildinfo exposes the identity of the source used to build FrostAgent.
chathistory
Package chathistory stores searchable conversation originals independently of model context, summaries and extracted memories.
Package chathistory stores searchable conversation originals independently of model context, summaries and extracted memories.
llm
mcp
modelcatalog
Package modelcatalog keeps a process-wide snapshot of the models.dev model list and derives capability hints for upstream model names.
Package modelcatalog keeps a process-wide snapshot of the models.dev model list and derives capability hints for upstream model names.
poke
Package poke normalizes inbound poke notifications and limits dialogue wakes.
Package poke normalizes inbound poke notifications and limits dialogue wakes.
provider/llm/state
Package state binds opaque provider continuation data to its original message and route.
Package state binds opaque provider continuation data to its original message and route.
replyformat
Package replyformat interprets the model's ordinary reply delivery markers.
Package replyformat interprets the model's ordinary reply delivery markers.
runtimeinfo
Package runtimeinfo formats the reserved, model-independent runtime diagnostic.
Package runtimeinfo formats the reserved, model-independent runtime diagnostic.
runtimescope
Package runtimescope owns the work admitted during one instance activation.
Package runtimescope owns the work admitted during one instance activation.
sessionstate
Package sessionstate stores session checkpoints independently of chat archives.
Package sessionstate stores session checkpoints independently of chat archives.
settingscontract
Package settingscontract contains the test-only lifecycle inventory shared by backend and frontend checks.
Package settingscontract contains the test-only lifecycle inventory shared by backend and frontend checks.
skills
Package skills implements portable SKILL.md bundles without extracting them on the host.
Package skills implements portable SKILL.md bundles without extracting them on the host.
tokenusage
Package tokenusage records provider-reported consumption without retaining prompts, user IDs, credentials, or response content.
Package tokenusage records provider-reported consumption without retaining prompts, user IDs, credentials, or response content.
toolhistory
Package toolhistory retains tool execution originals separately from model context.
Package toolhistory retains tool execution originals separately from model context.
updatecheck
Package updatecheck reads FrostAgent's public update channels from GitHub.
Package updatecheck reads FrostAgent's public update channels from GitHub.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL