mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove agents experiment flag and mark feature as beta (#24432)
Remove the `ExperimentAgents` feature flag so the Agents feature is always available without requiring `--experiments=agents`. The feature is now in beta. Existing deployments that still pass `--experiments=agents` will get a harmless "ignoring unknown experiment" warning on startup. ### Changes **Backend:** - Remove `RequireExperimentWithDevBypass` middleware from chat and MCP server routes - Always include `AgentsAccessRole` in assignable site roles (later refactored to org-scoped on main; rebase keeps that) - Always set `AgentsTabVisible = true`, then drop the entire dead `AgentsTabVisible` metadata pipeline (Go htmlState field, populateHTMLState goroutine, HTML meta tag, useEmbeddedMetadata registration, mock); no production consumer reads it. `AgentsNavItem` already gates on `permissions.createChat`. - Make `blob:` CSP `img-src` addition unconditional - Remove `ExperimentAgents` constant, `DisplayName` case, and `ExperimentsKnown` entry **CLI:** - Graduate the agents TUI from `coder exp agents` to `coder agents` (moved from `AGPLExperimental()` to `CoreSubcommands()`) - Drop the `agent` alias so it does not collide with the hidden workspace-agent command - Rename implementation files `cli/exp_agents_*.go` -> `cli/agents_*.go` and internal identifiers (`expChatsTUIModel` -> `chatsTUIModel`, `newExpChatsTUIModel` -> `newChatsTUIModel`, `setupExpAgentsBackend` -> `setupAgentsBackend`, `startExpAgentsSession` -> `startAgentsSession`, `expAgentsPtr` -> `agentsPtr`, `expAgentsSession` -> `agentsSession`, `TestExpAgents*` -> `TestAgents*`). `expClient` (the `*codersdk.ExperimentalClient` local) is kept; `coderd/exp_chats*.go` and other still-experimental `cli/exp_*.go` commands are intentionally untouched. **Frontend:** - Remove experiment check from `AgentsNavItem` - render when `canCreateChat` is true - Remove `agentsEnabled` experiment check from `WorkspacesPage`, then gate `chatsByWorkspace` on `permissions.createChat` so users without chat access don't trigger the per-page DB query (Copilot review feedback) - Add `FeatureStageBadge` (beta) next to the Coder logo in the Agents sidebar (desktop + mobile) **Docs:** - Remove experiment flag setup instructions from `early-access.md` and `getting-started.md` (and rename `early-access.md`'s "Enable Coder Agents" heading to "Set up Coder Agents", since there is no enablement step left) - Update `chats-api.md` and `getting-started.md`'s Chats API note to say "beta" instead of "experimental" - `docs/manifest.json`: drop "experimental" from the Chats API sidebar description - `make gen` regenerated `docs/reference/cli/agents.md` and the CLI index - `scripts/check_emdash.sh`: exclude `cli/testdata/*.golden` and `enterprise/cli/testdata/*.golden` from the new repo-wide emdash lint, since serpent emits emdash borders in every generated `--help` golden file **Tests:** - Remove `ExperimentAgents` setup from all test files (14 occurrences across 7 files) - Update stale "with the agents experiment" comments in `coderd/x/chatd/integration_test.go` and `coderd/mcp_test.go` <img width="1185" height="900" alt="image" src="https://github.com/user-attachments/assets/b420bc8f-41d6-42c6-abd8-ad572533d651" /> > 🤖 Generated by Coder Agents
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Chats API
|
||||
|
||||
> [!NOTE]
|
||||
> The Chats API is experimental and gated behind the `agents` experiment flag.
|
||||
> The Chats API is in beta.
|
||||
> Endpoints live under `/api/experimental/chats` and may change without notice.
|
||||
|
||||
The Chats API lets you create and interact with Coder Agents
|
||||
|
||||
@@ -40,27 +40,11 @@ Functionality available during Early Access may be a subset of planned
|
||||
capabilities. Some features may be incomplete, experimental, or subject to
|
||||
redesign.
|
||||
|
||||
## Enable Coder Agents
|
||||
## Set up Coder Agents
|
||||
|
||||
Coder Agents is experimental and must not be deployed to production
|
||||
environments. It is gated behind the `agents` experiment flag. To enable it,
|
||||
pass the flag when starting the Coder server using an environment variable
|
||||
or CLI flag:
|
||||
Coder Agents is available by default. No experiment flags are required.
|
||||
|
||||
```sh
|
||||
CODER_EXPERIMENTS="agents" coder server
|
||||
# or
|
||||
coder server --experiments=agents
|
||||
```
|
||||
|
||||
If you are already using other experiments, add `agents` to the
|
||||
comma-separated list:
|
||||
|
||||
```sh
|
||||
CODER_EXPERIMENTS="agents,oauth2,mcp-server-http" coder server
|
||||
```
|
||||
|
||||
Once the server restarts with the experiment enabled:
|
||||
To get started:
|
||||
|
||||
1. Navigate to the **Agents** page in the Coder dashboard.
|
||||
1. Open **Admin** settings and configure at least one LLM provider and model.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Getting Started
|
||||
|
||||
This guide walks platform teams and administrators through enabling Coder
|
||||
This guide walks platform teams and administrators through setting up Coder
|
||||
Agents, preparing your deployment, and running your first Coder Agent.
|
||||
|
||||
> [!NOTE]
|
||||
@@ -12,8 +12,7 @@ Agents, preparing your deployment, and running your first Coder Agent.
|
||||
|
||||
Before you begin, confirm the following:
|
||||
|
||||
- **Coder deployment** running the latest release with the `agents`
|
||||
experiment flag available.
|
||||
- **Coder deployment** running the latest release.
|
||||
- **LLM provider credentials** — an API key for at least one
|
||||
[supported provider](./models.md) (Anthropic, OpenAI, Google, Azure OpenAI,
|
||||
AWS Bedrock, OpenAI Compatible, OpenRouter, or Vercel AI Gateway).
|
||||
@@ -22,40 +21,19 @@ Before you begin, confirm the following:
|
||||
- **At least one template** with a
|
||||
[descriptive name and description](./platform-controls/template-optimization.md)
|
||||
for the agent to select when provisioning workspaces.
|
||||
- **Admin access** to the Coder deployment for enabling the experiment and
|
||||
configuring providers.
|
||||
- **Admin access** to the Coder deployment for configuring providers.
|
||||
- **Coder Agents User role** assigned to each user who needs to interact with Coder Agents.
|
||||
Owners can assign this from **Admin** > **Users**. See
|
||||
[Grant Coder Agents User](#step-3-grant-coder-agents-user) below.
|
||||
[Grant Coder Agents User](#step-2-grant-coder-agents-user) below.
|
||||
|
||||
## Step 1: Enable the experiment
|
||||
|
||||
Coder Agents is gated behind the `agents` experiment flag. Pass it when
|
||||
starting the Coder server:
|
||||
|
||||
```sh
|
||||
CODER_EXPERIMENTS="agents" coder server
|
||||
# or
|
||||
coder server --experiments=agents
|
||||
```
|
||||
|
||||
If you already use other experiments, add `agents` to the comma-separated list:
|
||||
|
||||
```sh
|
||||
CODER_EXPERIMENTS="agents,oauth2,mcp-server-http" coder server
|
||||
```
|
||||
|
||||
See [Enable Coder Agents](./early-access.md#enable-coder-agents) for full
|
||||
details.
|
||||
|
||||
## Step 2: Configure an LLM provider and model
|
||||
## Step 1: Configure an LLM provider and model
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Configuring providers, models, and system prompts requires the
|
||||
> **Owner** role (Coder administrator). Non-admin users cannot access the
|
||||
> Admin panel or modify deployment-level Agents configuration.
|
||||
|
||||
Once the server restarts with the experiment enabled:
|
||||
To configure Coder Agents:
|
||||
|
||||
1. Navigate to the **Agents** page in the Coder dashboard.
|
||||
1. Click **Admin** to open the configuration dialog.
|
||||
@@ -72,7 +50,7 @@ Detailed instructions for each provider and model option are in the
|
||||
> Start with a single frontier model to validate your setup before adding
|
||||
> additional providers.
|
||||
|
||||
## Step 3: Grant Coder Agents User
|
||||
## Step 2: Grant Coder Agents User
|
||||
|
||||
The **Coder Agents User** role controls which users can interact with Coder Agents.
|
||||
Members do not have Coder Agents User by default.
|
||||
@@ -105,7 +83,7 @@ coder users list -o json \
|
||||
done
|
||||
```
|
||||
|
||||
## Step 4: Start your first Coder Agent
|
||||
## Step 3: Start your first Coder Agent
|
||||
|
||||
1. Go to the **Agents** page in the Coder dashboard.
|
||||
1. Select a model from the dropdown (your default will be pre-selected).
|
||||
@@ -266,7 +244,7 @@ rather than developer session tokens. Keep automation credentials
|
||||
narrowly scoped.
|
||||
|
||||
> [!NOTE]
|
||||
> The Chats API is experimental and may change without notice.
|
||||
> The Chats API is in beta and may change without notice.
|
||||
> See [Chats API](./chats-api.md) for the full endpoint reference.
|
||||
|
||||
### Add workspace context with AGENTS.md
|
||||
|
||||
Reference in New Issue
Block a user