mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: gate chat advisor and virtual desktop behind experiments, delete experiments page (#26809)
This commit is contained in:
@@ -173,14 +173,14 @@ provider-native, and computer-use tools are not available.
|
||||
These tools manage sub-agents — child chats that work on independent tasks in
|
||||
parallel.
|
||||
|
||||
| Tool | What it does |
|
||||
|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `spawn_agent` (`type=general` or `explore`) | Delegates a task to a sub-agent with its own context window. |
|
||||
| `wait_agent` | Waits for a sub-agent to finish and collects its result. |
|
||||
| `message_agent` | Sends a follow-up message to a running sub-agent. |
|
||||
| `interrupt_agent` | Halts a sub-agent's current turn; it transitions to waiting or running if there are queued messages. |
|
||||
| `spawn_agent` (`type=computer_use`) | Spawns a sub-agent with desktop interaction capabilities (screenshot, mouse, keyboard). Requires an administrator-configured computer-use provider (Anthropic or OpenAI) and the [virtual desktop experiment](./platform-controls/experiments.md#virtual-desktop) to be enabled. |
|
||||
| `list_agents` | Lists spawned child agents, most recently active first. |
|
||||
| Tool | What it does |
|
||||
|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `spawn_agent` (`type=general` or `explore`) | Delegates a task to a sub-agent with its own context window. |
|
||||
| `wait_agent` | Waits for a sub-agent to finish and collects its result. |
|
||||
| `message_agent` | Sends a follow-up message to a running sub-agent. |
|
||||
| `interrupt_agent` | Halts a sub-agent's current turn; it transitions to waiting or running if there are queued messages. |
|
||||
| `spawn_agent` (`type=computer_use`) | Spawns a sub-agent with desktop interaction capabilities (screenshot, mouse, keyboard). Requires an administrator-configured computer-use provider (Anthropic or OpenAI) and the [virtual desktop experiment](./platform-controls/virtual-desktop.md) to be enabled. |
|
||||
| `list_agents` | Lists spawned child agents, most recently active first. |
|
||||
|
||||
### Provider tools
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# Advisor
|
||||
|
||||
> [!NOTE]
|
||||
> This feature is experimental. Pin a release before broad rollout and review
|
||||
> the release notes before upgrading.
|
||||
|
||||
## Enable the experiment
|
||||
|
||||
```shell
|
||||
coder server --experiments=chat-advisor
|
||||
```
|
||||
|
||||
Or set the environment variable:
|
||||
|
||||
```shell
|
||||
CODER_EXPERIMENTS=chat-advisor
|
||||
```
|
||||
|
||||
## What it does
|
||||
|
||||
Lets a root agent pause its current turn and request strategic guidance from
|
||||
a separate, single-step model call. The advisor sees recent conversation
|
||||
context, runs without any tools, and returns concise advice for the root
|
||||
agent rather than the end user. While active, it is the only tool the root
|
||||
agent can call for that turn.
|
||||
|
||||
Useful for planning ambiguity, architectural tradeoffs, debugging strategy
|
||||
after repeated failures, or risk reduction before a destructive operation.
|
||||
|
||||
## Configuration
|
||||
|
||||
Once the experiment is enabled, configure the advisor under **AI Settings** >
|
||||
**Coder Agents** > **Advisor**.
|
||||
|
||||
| Field | Default | Notes |
|
||||
|-------------------|----------------------|-------------------------------------------------------------------------------------------------------------------------|
|
||||
| Max uses per run | `0` (unlimited) | Caps how many times the root agent can call the advisor in a single chat run. Must be a non-negative integer. |
|
||||
| Max output tokens | `0` (server default) | Caps the advisor model's response length. `0` uses the server default of 16,384 tokens. Must be a non-negative integer. |
|
||||
| Advisor model | Use chat model | Optional dedicated chat model config for the advisor. When unset, the advisor reuses the root agent's model. |
|
||||
|
||||
The advisor is not available in plan mode or to subagents. Failed advisor
|
||||
invocations refund the per-run budget, and advisor calls are not metered
|
||||
against the root chat's usage limit.
|
||||
|
||||
The same configuration is available at:
|
||||
|
||||
- `GET /api/experimental/chats/config/advisor`
|
||||
- `PUT /api/experimental/chats/config/advisor`
|
||||
+3
-59
@@ -1,60 +1,4 @@
|
||||
# Experiments
|
||||
|
||||
The **Experiments** tab under **Agents** > **Settings** > **Manage Agents**
|
||||
is where administrators opt in to features that are still iterating. The
|
||||
behavior, configuration surface, and APIs documented here may change between
|
||||
releases without notice.
|
||||
|
||||
> [!NOTE]
|
||||
> Everything in this page is experimental. Pin a release before broad rollout
|
||||
> and review the release notes before upgrading.
|
||||
|
||||
## Virtual desktop
|
||||
|
||||
Lets agents drive a graphical desktop inside the workspace through
|
||||
`spawn_agent` with `type=computer_use` (screenshots, mouse, keyboard).
|
||||
|
||||
To enable, toggle **Virtual Desktop** on, then choose a **Computer use
|
||||
provider** (Anthropic or OpenAI). It also requires:
|
||||
|
||||
- The [portabledesktop](https://registry.coder.com/modules/coder/portabledesktop)
|
||||
module installed in the workspace template.
|
||||
- An API key for the selected provider configured under the **Providers**
|
||||
tab.
|
||||
|
||||
The Anthropic and OpenAI computer-use models are fixed by Coder per provider
|
||||
and are not selectable from this UI. Anthropic is the default when no
|
||||
provider is set.
|
||||
|
||||
## Advisor
|
||||
|
||||
Lets a root agent pause its current turn and request strategic guidance from
|
||||
a separate, single-step model call. The advisor sees recent conversation
|
||||
context, runs without any tools, and returns concise advice for the parent
|
||||
agent rather than the end user. While active, it is the only tool the parent
|
||||
can call for that turn.
|
||||
|
||||
Useful for planning ambiguity, architectural tradeoffs, debugging strategy
|
||||
after repeated failures, or risk reduction before a destructive operation.
|
||||
|
||||
| Field | Default | Notes |
|
||||
|-------------------|----------------------|-------------------------------------------------------------------------------------------------------------------------|
|
||||
| Advisor (toggle) | Off | Master switch. When off, the advisor tool is not attached to new chats. |
|
||||
| Max uses per run | `0` (unlimited) | Caps how many times an agent can call the advisor in a single chat run. Must be a non-negative integer. |
|
||||
| Max output tokens | `0` (server default) | Caps the advisor model's response length. `0` uses the server default of 16,384 tokens. Must be a non-negative integer. |
|
||||
| Reasoning effort | Use chat model | One of unset, `low`, `medium`, or `high`. Unset delegates to the underlying model's default. |
|
||||
| Advisor model | Use chat model | Optional dedicated chat model config for the advisor. When unset, the advisor reuses the parent chat's model. |
|
||||
|
||||
The advisor is not available in plan mode or to subagents. Failed advisor
|
||||
invocations refund the per-run budget, and advisor calls are not metered
|
||||
against the parent chat's usage limit.
|
||||
|
||||
The same configuration is available at:
|
||||
|
||||
- `GET /api/experimental/chats/config/advisor`
|
||||
- `PUT /api/experimental/chats/config/advisor`
|
||||
|
||||
## Chat debug logging
|
||||
# Chat debug logging
|
||||
|
||||
Records a detailed trace of each chat turn for troubleshooting: the
|
||||
normalized request sent to the LLM provider, the full response, token usage,
|
||||
@@ -67,7 +11,7 @@ Off by default. Three layers control whether it runs for a given chat:
|
||||
on for every chat. The runtime admin and user toggles become read-only.
|
||||
1. **Runtime admin gate.** With the deployment override unset, the
|
||||
*Let users record chat debug logs* toggle decides whether users can opt
|
||||
in. Configure it at
|
||||
in. Configure it under **AI Settings** > **Lifecycle**, or at
|
||||
`GET/PUT /api/experimental/chats/config/debug-logging`.
|
||||
1. **Per-user toggle.** Users with the admin gate enabled can turn debug
|
||||
logging on for their own chats from **Agents** > **Settings** > **General**
|
||||
@@ -89,7 +33,7 @@ that chat's owner. The tab lists recent debug runs and lets you expand a run
|
||||
into its per-step request, response, token usage, retry attempts, errors,
|
||||
and policy metadata.
|
||||
|
||||
### Export debug logs
|
||||
## Export debug logs
|
||||
|
||||
You can export the same captured debug data from the UI:
|
||||
|
||||
@@ -144,12 +144,17 @@ for details.
|
||||
|
||||
### Experiments
|
||||
|
||||
Administrators can opt in to experimental features under **Agents** >
|
||||
**Settings** > **Manage Agents** > **Experiments**. Behavior, configuration
|
||||
surface, and APIs may change between releases.
|
||||
Administrators enable experimental features using the `--experiments` flag on
|
||||
`coder server` (or the `CODER_EXPERIMENTS` environment variable). Once enabled,
|
||||
runtime configuration for those features is available under **AI Settings** >
|
||||
**Coder Agents**.
|
||||
|
||||
See [Experiments](./experiments.md) for the current list of experiments, how
|
||||
to enable them, and the relevant API endpoints.
|
||||
See the following pages for experiment-gated features:
|
||||
|
||||
- [Advisor](./advisor.md) (`--experiments=chat-advisor`)
|
||||
- [Virtual desktop](./virtual-desktop.md) (`--experiments=chat-virtual-desktop`)
|
||||
|
||||
For chat debug logging (not experiment-gated), see [Chat debug logging](./chat-debug-logging.md).
|
||||
|
||||
## Where we are headed
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Virtual desktop
|
||||
|
||||
> [!NOTE]
|
||||
> This feature is experimental. Pin a release before broad rollout and review
|
||||
> the release notes before upgrading.
|
||||
|
||||
## Enable the experiment
|
||||
|
||||
```shell
|
||||
coder server --experiments=chat-virtual-desktop
|
||||
```
|
||||
|
||||
Or set the environment variable:
|
||||
|
||||
```shell
|
||||
CODER_EXPERIMENTS=chat-virtual-desktop
|
||||
```
|
||||
|
||||
## What it does
|
||||
|
||||
Lets agents drive a graphical desktop inside the workspace through
|
||||
`spawn_agent` with `type=computer_use` (screenshots, mouse, keyboard).
|
||||
|
||||
## Configuration
|
||||
|
||||
Once the experiment is enabled, configure the computer-use provider under
|
||||
**AI Settings** > **Coder Agents** > **Virtual desktop**.
|
||||
|
||||
Choose a **Computer use provider** (Anthropic or OpenAI). Virtual desktop also requires:
|
||||
|
||||
- The [portabledesktop](https://registry.coder.com/modules/coder/portabledesktop)
|
||||
module installed in the workspace template.
|
||||
- An API key for the selected provider configured under the **Providers**
|
||||
tab.
|
||||
|
||||
The Anthropic and OpenAI computer-use models are fixed by Coder per provider
|
||||
and are not selectable from this UI. Anthropic is the default when no
|
||||
provider is set.
|
||||
|
||||
The same configuration is available at:
|
||||
|
||||
- `GET /api/experimental/chats/config/computer-use-provider`
|
||||
- `PUT /api/experimental/chats/config/computer-use-provider`
|
||||
+16
-4
@@ -1080,10 +1080,22 @@
|
||||
"state": ["beta"]
|
||||
},
|
||||
{
|
||||
"title": "Experiments",
|
||||
"description": "Experimental Coder Agents features admins can opt in to: virtual desktop, advisor, and chat debug logging",
|
||||
"path": "./ai-coder/agents/platform-controls/experiments.md",
|
||||
"state": ["beta"]
|
||||
"title": "Advisor",
|
||||
"description": "Strategic guidance for root agent chats",
|
||||
"path": "./ai-coder/agents/platform-controls/advisor.md",
|
||||
"state": ["early access"]
|
||||
},
|
||||
{
|
||||
"title": "Virtual desktop",
|
||||
"description": "Allow agents to use a graphical desktop within workspaces",
|
||||
"path": "./ai-coder/agents/platform-controls/virtual-desktop.md",
|
||||
"state": ["early access"]
|
||||
},
|
||||
{
|
||||
"title": "Chat debug logging",
|
||||
"description": "Record detailed traces of chat turns for troubleshooting",
|
||||
"path": "./ai-coder/agents/platform-controls/chat-debug-logging.md",
|
||||
"state": ["early access"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Generated
+3
-3
@@ -7087,9 +7087,9 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value(s) |
|
||||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `agent-app-tabs`, `ai-gateway-cost-control`, `auto-fill-parameters`, `example`, `mcp-server-http`, `minimum-implicit-member`, `nats_pubsub`, `notifications`, `oauth2`, `workspace-build-updates`, `workspace-usage` |
|
||||
| Value(s) |
|
||||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `agent-app-tabs`, `ai-gateway-cost-control`, `auto-fill-parameters`, `chat-advisor`, `chat-virtual-desktop`, `example`, `mcp-server-http`, `minimum-implicit-member`, `nats_pubsub`, `notifications`, `oauth2`, `workspace-build-updates`, `workspace-usage` |
|
||||
|
||||
## codersdk.ExternalAPIKeyScopes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user