Description
Chat Automations lets users save a prompt-driven task as a repeatable manual or scheduled workflow. The Chat sidebar exposes an Automations destination where users can browse existing definitions, start from a template, create or edit the prompt, choose schedule and timezone, select provider and model, set a workspace or worktree, control notification behavior, pause or resume execution, run immediately, and inspect historical outcomes.
Automation definitions are stored as structured rows but presented through a dedicated read model and editor. Schedule controls combine common presets with validated cron input and next-run previews. At execution time the Chat runtime resolves prompt variables and context, dispatches a normal durable conversation turn, records the linked run result, and emits completion or failure through the notification seam. Provider availability, notification choices, status, and worktree selection remain visible so users understand the execution contract without reading raw properties.
Selling Points
- Turns a successful conversational workflow into repeatable operations without requiring code or an external scheduler.
- Keeps model, workspace, schedule, and notification choices visible, reducing hidden execution assumptions.
- Offers templates for common jobs while still allowing users to author a specific prompt and cadence.
- Provides run history and next-fire previews, helping users verify whether an automation is healthy and timed correctly.
- Integrates outcomes with the Notification Inbox so background work returns to the user’s attention.
User Story
A team lead creates an automation that reviews newly captured customer feedback every weekday morning. They select the analysis model, target workspace, local timezone, and notification preference, then inspect the next three fire times before saving. After the first run, they open history to review its status and resulting conversation.
Extension Surface
The feature is configurable through its definition fields and editor. apps/web/src/modules/chat/components/automations/AutomationModal.tsx exposes prompt, model, schedule, timezone, workspace, and notification settings, while apps/web/src/modules/chat/lib/automation-schedule-state.ts validates and normalizes scheduling choices. There is no external automation-editor plugin surface in this UI.
Capabilities & Limits
- Creates, edits, pauses, resumes, deletes, and manually runs Chat automations.
- Supports schedules, timezones, provider models, workspace/worktree context, notifications, templates, and run history.
- Validates schedule input and previews future fire times.
- Executes each run through the normal Chat dispatch path and preserves a linked conversation outcome.
- Limit: an automation still depends on a usable provider and runtime; the UI cannot guarantee execution while a local machine or required service is unavailable.
Implementation Map
apps/web/src/modules/chat/components/automations/AutomationList.tsxapps/web/src/modules/chat/components/automations/AutomationModal.tsxapps/web/src/modules/chat/components/automations/AutomationRunHistory.tsxapps/web/src/modules/chat/api/real-client.tspackages/chat/src/automations/executor.tspackages/chat/src/automations/schedule.ts