automations
Automation models for the Open WebUI scheduling system.
Automations are scheduled tasks that execute prompts on a recurring basis using RRULE scheduling. Each automation creates a chat and runs through the full chat completion pipeline when triggered.
Classes
AutomationTerminalConfig
Bases: BaseModel
Configuration for a terminal server attached to an automation.
When present, the automation's execution will connect to the specified terminal server before running the prompt.
- Code Reference models automations Classes AutomationData Attributes terminal
AutomationData
Bases: BaseModel
Core data payload defining what an automation does and when it runs.
This is the structured form used in create/update requests. When stored
in the database and returned by the API, it is serialized as a plain dict
on AutomationModel.data.
- Code Reference models automations Classes AutomationForm Attributes data
Attributes
rrule
RRULE recurrence rule defining the schedule (RFC 5545). For example,
FREQ=DAILY;DTSTART=20250101T090000Z for daily at 9 AM UTC.
terminal
terminal: Optional[AutomationTerminalConfig] = None
Optional terminal server configuration.
AutomationModel
Bases: BaseModel
Full automation model as stored in the database.
Represents an automation with all persisted fields including scheduling state.
- Code Reference models automations Classes AutomationResponse
Attributes
data
Serialized automation data defining the prompt, schedule, and model.
Dict Fields
prompt(str, required): Prompt template to executemodel_id(str, required): Model ID for chat completionrrule(str, required): RRULE recurrence rule for schedulingterminal(dict, optional): Terminal server config withserver_idand optionalcwdkeys
meta
Optional metadata for the automation.
Dict Fields
system_prompt(str, optional): System prompt injected before the user prompttemperature(float, optional): Sampling temperature overridemax_tokens(int, optional): Maximum tokens overridewebhook(str, optional): Webhook URL notified after execution
last_run_at
Timestamp (nanoseconds since epoch) of the last execution.
next_run_at
Timestamp (nanoseconds since epoch) of the next scheduled execution.
AutomationRunModel
Bases: BaseModel
Record of a single automation execution.
Each time an automation runs, a run record is created tracking the outcome.
- Code Reference
Attributes
AutomationForm
Bases: BaseModel
Form for creating or updating an automation.
The data field contains the structured automation definition including
the RRULE schedule. The backend validates the RRULE against the user's
timezone and enforces rate limits.
- Code Reference routers automations Classes AutomationsClient Functions
Attributes
data
data: AutomationData
Core automation data: prompt, model, schedule, and optional terminal config.
meta
Optional metadata for the automation.
Dict Fields
system_prompt(str, optional): System prompt injected before the user prompttemperature(float, optional): Sampling temperature overridemax_tokens(int, optional): Maximum tokens overridewebhook(str, optional): Webhook URL notified after execution
AutomationResponse
Bases: AutomationModel
Enriched automation response with run history and computed next runs.
Extends AutomationModel with the latest run record and a list of
upcoming execution timestamps.
Attributes
AutomationListResponse
Bases: BaseModel
Paginated list of automations with enriched run data.
Each item includes the latest run record. The total field reflects the
total count before pagination.
- Code Reference routers automations Classes AutomationsClient Functions get_automation_items