Closes CODAGT-1216
Part of CODAGT-1135
Adds an early-access page for chat automations in Coder Agents:
`docs/ai-coder/agents/automations.md`. It covers enabling the
`chat-automations` experiment and the `off` experiment rule as the
operator kill switch, webhooks (endpoint, bearer secret, 256 KiB JSON
body, responses, single and multi use, rotation), schedules (cron and
time zone, server previews, no catch-up, Run now), **When busy**, the
`manage_automations` tool and heartbeats, the per-owner cap and the
queue share, and the accepted risks (spend, silent failures, prompt
injection).
It also adds the manifest entry (early access, after Chat Sharing), a
glossary entry, a `manage_automations` row in the built-in tools table,
and a link from the experiment-gated features list in Platform Controls.
The page documents the code as built on this stack, not the RFC, where
they differ. Notable differences: reasoning effort is only offered for
new chat targets; schedules accept an occurrence up to 60 seconds late
and never replay older ones; the dashboard has no delete control, so
delete is documented through the API; `manage_automations` never returns
webhook secrets.
Dogfood UAT followed the page step by step on a `develop.sh` instance
built from this branch (experiment rule on and off, webhook creation and
curl deliveries with the documented status codes we could trigger,
schedule previews and Run now, the Manage automations switch), and
passed.
<details>
<summary>Where the page's claims come from</summary>
| Claim | Source |
|---|---|
| Experiment name, user-scoped | `codersdk/deployment.go`
(`ExperimentChatAutomations`, `ExperimentsUserScoped`) |
| Behavior when the experiment is off | `coderd/exp_chat_automations.go`
(`requireChatAutomations`, events handler),
`coderd/x/chatd/automation_schedules.go` (scan skips owners, keeps
cursors) |
| Management routes and fields | `coderd/coderd.go`,
`codersdk/chatautomations.go`, `coderd/x/chatd/automations.go`
(validation) |
| Owner-only update, enable, rotate, run |
`coderd/x/chatd/automations.go` (`ErrAutomationOwnerOnly`) |
| Webhook endpoint, 256 KiB limit, responses |
`coderd/exp_chat_automations.go` (events handler,
`writeChatAutomationError`), `coderd/exp_chats.go`
(`maxChatRequestBodyBytes`) |
| Event data wrapping | `coderd/x/chatd/automations_publish.go`
(`automationEventText`) |
| Rotating a used single-use webhook returns 409 |
`coderd/x/chatd/automations.go` (`RotateAutomationSecret`),
`AutomationWebhookFields.tsx` (button hidden) |
| Events rate limit | `coderd/httpmw/ratelimit.go`
(`RateLimitByEndpointKey`), `--api-rate-limit` default 512 |
| Cron, time zone, previews | `coderd/schedule/cron/cron.go`,
`coderd/exp_chat_automations.go` (`chatAutomationNextRunCount = 5`,
schedule preview) |
| 30 s scan, 60 s grace, no catch-up |
`coderd/x/chatd/automation_schedules.go` (`automationScheduleInterval`,
`automationScheduleGrace`) |
| When busy, queue share | `coderd/x/chatd/automations_publish.go` (busy
check, `max(1, MaxQueuedMessagesPerChat/2)`), `codersdk/chats.go`
(default 20) |
| manage_automations gating and containment |
`coderd/x/chatd/automations_tool.go`, `coderd/exp_chats.go`
(`manage_automations_enabled` checks), `AgentChatInput.tsx` |
| Per-owner cap | `codersdk/deployment.go`
(`--chat-max-automations-per-owner`), `codersdk/chats.go` (default 50) |
| Skipped and missed log messages |
`coderd/x/chatd/automation_schedules.go` |
| Audit fields | `enterprise/audit/table.go` (`prompt` and
`webhook_secret_hash` are secret) |
Identifiers kept off the page because the reader never types or receives
them: `queue_generation`, `schedule_revision`, `schedule_next_run_at`,
and the internal error names above.
</details>
---
_Generated with [`xum`](https://github.com/coder/xum) • Model:
`anthropic:claude-opus-5-5` • Thinking: `high`_
---------
Signed-off-by: Thomas Kosiewski <tk@coder.com>