The Coder subagent is FrostAgent’s built-in specialist for programming tasks. When the main agent identifies a code generation request — writing functions, debugging snippets, explaining algorithms, or producing boilerplate — it delegates the work to the Coder viaDocumentation 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.
use_subagent. The Coder runs as an independent LLM call powered by Alibaba’s qwen-coder-plus model, keeping its context clean and its system prompt tightly focused on programming assistance.
Configuration
The Coder subagent requires a single environment variable to authenticate with Alibaba DashScope:CODER_API_KEY must be a valid Alibaba DashScope API key. You can obtain one from the DashScope console. Standard OpenAI keys will not work here because the Coder subagent calls the DashScope-compatible endpoint directly.| Setting | Value |
|---|---|
| Model | qwen-coder-plus |
| Endpoint | https://dashscope.aliyuncs.com/compatible-mode/v1 |
| System prompt | 你是编程助手。 (“You are a programming assistant.”) |
| Auth env var | CODER_API_KEY |
CallCoder Function
The Coder subagent is implemented as a single exported function in subagent/coder.go:
Parameters
| Parameter | Type | Description |
|---|---|---|
client | *llm.Client | Shared HTTP client passed down from the main agent engine. |
baseURL | string | Currently unused — the endpoint is hardcoded to DashScope. |
apiKey | string | Currently unused — the key is read from CODER_API_KEY at runtime. |
_ | string | Unnamed/reserved parameter, ignored. |
contentBlocks | string | The code task description forwarded by the main agent. |
Return value
CallCoder returns the model’s response as a JSON-marshalled string. On error, it returns the error message string directly and logs the failure via the internal logs package.
Full source
How the Main Agent Triggers the Coder
The main agent selects the Coder automatically when the user’s request involves writing, reviewing, or explaining code. Becauseuse_subagent is a registered tool, the LLM reasons about the available tools the same way it would any other function call.
A system prompt or user message like the following is enough to cause the main agent to route the task:
- Recognise this as a programming task.
- Call
send_messageto tell the user it is delegating to the Coder agent. - Call
use_subagentwithsubagent_name: "Coder"and the original request ascontent.
Example Interaction
Coder subagent responds
CallCoder sends the task to qwen-coder-plus with the system prompt 你是编程助手。 and returns the generated code:For an overview of all available subagents and instructions on adding your own, see the Subagents overview.