Skip to main content

Overview

An automation lets AI SRE run a hidden session on a cadence you set. The session does not appear in the session list in the left sidebar of the console. Instead, it runs in the background from a fixed task prompt. The agent completes the work and produces results such as routine inspections, operational insights, or incident post-mortems. Each automation is a rule. A rule carries at least one trigger:
  • Schedule (cron): set the cadence with a 4-field or 5-field cron expression (for example, every Monday morning or every day at 09:15); it runs automatically when the time comes.
  • Call via API: generate a trigger URL with a Bearer token. An external system triggers the rule on demand with a POST and passes the context for the run in the request body.
  • On-call incident trigger: select the On-call channels and severities to watch, then start a diagnostic run when a matching incident appears.
  • War room created: select the channels and severities to watch, then start a diagnostic run when a matching incident gets a war room. This run’s session lives in the war room’s IM group chat, not in the console.
When to use it: hand recurring routine inspections (such as a daily health check) and periodic insight / post-mortem reports to AI SRE to run automatically. Or wire AI SRE into your existing pipeline, change system, or On-call incident flow so an event kicks off a diagnosis. Entry point: AI SRE → Automations in the left navigation.
Every run produced by an automation is, at its core, still an AI SRE session — it is marked as hidden and not mixed into your everyday session list. A run at the Web execution place can always be opened from the run history to see the full conversation, tool calls, and artifacts. The conversation of an IM run (including War room created runs) is in the IM group and cannot be opened from the console; see “Execution place” below.

Creating an automation

The page header offers two ways to create a rule. Create via chat opens a session with a prefilled prompt. The agent asks questions to work out the task and its schedule, so there’s no form to fill in. Create opens a start panel with two entry points:
1

Start from scratch

Choose Start from scratch to open a blank form and manually fill in the name, task prompt, and triggers. This suits cases where you already know what you want the agent to do and want a fully custom prompt.
2

From a preset template

Below, a set of preset template cards is listed (shown in Chinese or English to match the UI language). Common ones include Weekly On-call Review, Alert Governance, On-call Incident Analysis, and On-call Load Analysis. Click any template card to prefill the form with the template’s name and task prompt; tweak from there.
A template’s create form can also be opened by link from other pages: /ai-sre/automations/new?template=TEMPLATE_KEY. If the link also carries oncall_incident_channel_ids=ID1,ID2, the channels of the On-call incident trigger are preselected. Such links can be shared and still work after a refresh. Either entry point leads to the same configuration form. Both console entries always create a rule at the Web execution place; to run a rule in an IM chat, create it from that IM conversation:

Create from an IM conversation (bound to the current session)

When you ask the agent in an IM group or direct chat to create an automation without naming an execution place, the rule is bound to this conversation and inherits its scope (including the bound team). The CLI equivalent is to omit --run-in when running flashduty automation create from an IM conversation (see CLI).
  • After binding, runs happen in that chat instead of creating sessions in the console; the bound chat is fixed. How the session is opened depends on the chat: with AI SRE uses thread replies in regular group chats turned on in the integration, each run opens a new session; with it off, on a platform without this setting, or in a direct chat, the run continues the session that chat already has.
  • To run it on Web instead, say so at creation (ask for execution on the Web console in the conversation, or add --run-in web on the CLI). It cannot be changed afterwards; recreate the rule.
  • Do not pass chat, platform, integration, or session IDs yourself; the server resolves and authorizes the current session.

Configuration fields

The configuration form has the following fields:
For Environment, “Auto” has the system pick the best available environment at each run; “Cloud Sandbox” is a platform-managed ephemeral sandbox; a self-hosted Runner runs on your own machine. See Environments for the differences and how to connect them.

Execution place (where a rule runs)

Each rule has an execution place, fixed at creation and not editable in the console afterwards:
  • Web (default): each run is a hidden session in the console. A rule created in the console always has this value.
  • IM: runs happen in the IM group or direct chat the rule was bound to at creation. A retry of the same run reuses that session (and its thread when thread replies are on); the bound chat never changes. A War room created run does not run in this chat — it opens its own session in the war room’s group. How a run opens its session depends on the chat:
    • AI SRE uses thread replies in regular group chats is on for this IM integration: each run opens a new session in the group and a new thread.
    • That setting is off, the platform doesn’t offer it (only Feishu/Lark and Slack do), or the run is in a direct chat: the run continues the chat’s current session and is appended as an ordinary message, so it sees the conversation earlier in that session. A new session is created only when the chat has none yet, or has just been reset with /new.
The Where it ran column of the rule list and the same item in the detail page’s configuration show this value (IM or Web). When one rule enables War room created along with other triggers, the column shows two badges: War room → IM and Other triggers → Web. War room created is the only trigger that ignores the rule’s execution place; it runs in the war room’s own group (see “War room created” below). A rule at the IM execution place differs from a Web rule in a few ways:
  • The console offers no Clone; to switch to Web, recreate the rule.
  • The console does not expose these runs’ sessions: the run history shows - in the Name column, clicking the row only shows This analysis is in IM. Open IM to view it., and running it manually from the rule row does not open a session.
  • It does not use the rule’s Environment; it uses the environment already chosen in that chat (change it with /env in the conversation). The form still shows the environment picker, but it has no effect on IM runs.
  • A stale binding skips the run: if the bound chat’s scope or session has changed when a run fires (for example /scope changed the bound team in the group, or the group started a new session), the run is skipped, with status Skipped and a reason line saying the bound chat’s scope or session has changed. The rule stays enabled and is never moved to another chat; recreate the rule to change chats.

Specifying it through the API or CLI (run_in)

Console-created rules are always Web. When creating through the API or CLI, set run_in explicitly: update does not accept run_in: like scope, the execution place cannot be changed after creation. For the CLI flags see CLI.

Triggers

A rule must have at least one trigger configured. The current console form exposes Schedule, Call via API, On-call incident, and War room created in the “Triggers” section, and all four can be enabled at the same time.

Schedule (cron)

Runs automatically on a time cadence. The cadence supports two cron forms:
  • 4 fields: hour day-of-month month day-of-week; the system adds minute=0, suitable for top-of-hour tasks.
  • 5 fields: minute hour day-of-month month day-of-week, suitable for minute-level tasks. For example, 15 9 * * * means every day at 09:15.
6-field cron expressions with seconds are not supported. The minute must be one fixed integer; other fields support only the simple forms below: You can’t set both day of month and day of week: one of the two must be *, or the save is rejected with this message under the cron field: “Do not set both a day of month and a day of week. Change one of them to *.” A 4-field expression works the same way, so its day of month and day of week also can’t both be set. To avoid hand-writing the expression, the UI offers four modes:
Time zone: Schedule runs use the Time zone chosen on the trigger card; all four modes (Hourly / Daily / Weekly / Custom) share this setting.
The actual execution time may differ from the set time by a few minutes. This is intentional, to spread out system load. Do not treat a rule as a second-accurate timer.
Suppose you edit a rule that is enabled and already has its next run scheduled. If you change the cron expression or the time zone, the trigger card shows a note: the occurrence that is already scheduled and has not started yet (<time>, <old zone>) will not run. The next one is recalculated on the <new zone> clock, and its real start can be up to 5 minutes later than that minute. The note appears only when the schedule actually changes. Switching the time zone between an empty value and UTC doesn’t count, because both use the same clock. The note also doesn’t appear when the Schedule trigger is off or the rule has no pending run.

Call via API (HTTP POST)

Lets you trigger this automation on demand from an external system, independent of a time cadence.
1

Enable and save

Add Call via API under “Triggers” and save the rule. On a successful save, the system generates a one-time Token and trigger URL for triggering, and opens a dialog containing a curl example.
2

Save the Token

The Token is shown only once: copy and save it immediately. After you close the dialog you cannot view it again — you can only regenerate (rotate) a new one, and regenerating invalidates the old Token.
3

Trigger externally

Call the trigger URL with POST, placing the Token in the Authorization: Bearer header, and pass the context for this run in the text field of the request body. The curl example shown in the dialog looks like:
The text in the request body is passed to the agent as context for this run, on top of the task prompt configured on the rule. On success, data returns the new hidden session. Save session_id, or use session_url to open the full conversation, tool calls, and artifacts for this run:
A rule can enable both “Schedule” and “Call via API” at the same time: it runs automatically on the cadence and can also be kicked off on demand from outside. Each trigger occupies its own row and can be removed independently.

On-call incident trigger

Add the On-call incident trigger when you want AI SRE to start automatically from On-call incidents. Only incidents matching the selected channels and severities start a run.
1

Add the trigger

Click the On-call incident card in “Triggers”. The form expands channel and severity conditions.
2

Select channels

Select the On-call channels to watch in the Channel dropdown. Personal-scope rules can select visible account channels; team-scope rules narrow the channel list to the selected team.
3

Select severities

Select one or more severities from Critical, Warning, and Info. When this trigger is enabled, at least one channel and one severity are required.
4

Set similar-incident merging

Merge similar incidents into one analysis is on by default. If a new incident is similar enough to one that is already being analyzed, it joins that analysis instead of starting its own session. With it off, every incident is analysed separately. See Merging similar incidents into one analysis for the rules.
If you create or update a rule through the API, use these fields: When a matching event arrives, the system creates a run with trigger_kind: "oncall_incident" and passes event context such as incident_id, channel_id, and severity into the session. The same incident — the same trigger and the same incident_id — always reuses the same run, avoiding duplicate hidden sessions for one incident. When the switch is on, a different incident that is similar enough to one under analysis also joins that run instead of starting its own session. See “Merging similar incidents into one analysis” below. When the run finishes, AI SRE writes one summary comment back to the incident that triggered it. The comment puts the conclusion first, keeps the body concise, and ends with a link to the full session. The write-back record also carries a persistent Continue conversation entry. Use it to open the session straight from the conclusion on the incident timeline. See Incident Timeline · AI SRE Action Records. The comment travels through the incident’s existing notification chain, such as incident card refreshes and thread replies in IM. Anyone watching the incident sees the analysis without opening the console. This applies to every rule with the On-call incident trigger enabled — including rules with custom prompts — with no extra configuration.

Merging similar incidents into one analysis

Merge similar incidents into one analysis (oncall_incident_merge_similar) is on by default. It decides whether an incident event starts its own session or joins an analysis already running under the same rule. When it is on, an incident that matches the trigger is first compared for similarity against that rule’s runs:
  • At a similarity of 0.9 or above, the incident joins the highest-scoring analysis instead of starting a hidden session of its own. 0.9 is a fixed platform value, the same bar intelligent grouping uses by default, and it does not move with a channel’s grouping configuration.
  • Below 0.9, the incident starts a run of its own as usual.
  • With the switch off, no similarity comparison happens and every incident is analysed separately.
The candidates are the incident that analysis is working on plus the incidents already merged into it. The merge affects only AI SRE’s run routing. It doesn’t combine the two incidents in Flashduty, and the session’s bound incident stays the same. Both incidents still exist, notify, and escalate on their own. A merged-in incident has no session of its own, so it also gets no summary comment of its own. If the analysis judges that it shares the root cause, it leaves a cross-reference comment on that incident’s timeline and covers it in the conclusion. In that analysis’s chat, a merge appears as one process line: Joined this analysis + #<num> <title>, labeled Similarity <score> with two decimal places. The title is the merged incident’s name and opens that incident’s page in a new tab. In run history, that run likewise shows which analysis took it. Two platform limits are fixed and not configurable:
  • One analysis takes in at most 20 incidents. Once it is full it stops receiving similar incidents, and later ones start a new run, which carries on absorbing.
  • A finished run can only be joined within 60 minutes of finishing. A run still running or retrying is always joinable. A run that finished well (succeeded / partial) stays joinable for 60 minutes after it completed, and after that a similar incident starts a new run. Failed, skipped, and abandoned runs are never joined.
The similarity comparison requires the account’s AIOps capability and a Pro or higher subscription. If AIOps is off or the edition doesn’t qualify, no comparison runs, and every incident starts its own run.

War room created

Add the War room created trigger when you want AI SRE in the room as soon as an incident gets a war room. Only war-room creation events matching the selected channels and severities start a run.
1

Add the trigger

Click the War room created card in “Triggers”. The form expands channel and severity conditions; severity is preselected as Critical.
2

Select channels

Select the channels to watch in the Channel dropdown. Personal-scope rules can select visible account channels; team-scope rules narrow the channel list to the selected team. When this trigger is enabled, at least one channel is required.
3

Select severities

Select one or more severities from Critical, Warning, and Info. When this trigger is enabled, at least one severity is required.
This run’s session is created in the war room’s IM group chat, not in the console — the trigger card states “The session is created in the IM group chat.” and adds a platform caveat: due to platform limits, this may not apply to WeCom and DingTalk integrations.
If you create or update a rule through the API, use these fields: When a matching war room is created, the system creates a run with trigger_kind: "war_room_created" and passes context such as incident_id, channel_id, and severity into the session. This run does not open a new console session: it runs an analysis directly in the war-room group, and the conclusion is posted back into that group. Under one trigger, a single incident starts only one run — a repeated event does not open a second session. Environment: this trigger does not use the rule’s Environment — an analysis in the war room uses the execution environment already chosen for that group. When the war room is a rule’s only trigger, the form hides the environment picker and only says “Analysis in the war room uses the execution environment already chosen for that group. This rule does not pick one.” When the rule also enables the schedule / API / incident triggers, the picker stays and shows “Schedule, API, and incident triggers use the execution environment chosen here. The war room trigger uses the group’s execution environment and does not change that choice.” The preset template War room initial analysis (template key war_room_initial_analysis, category Incident Response) prefills this trigger and the Critical severity; the channels are not prefilled, so you pick them yourself.

Run history

Every rule keeps its run history. Click a rule row to open its detail page: the left column shows Configuration and the right column shows Run History. The Run manually button at the top of the right column triggers a run directly. That button does not appear when War room created is the rule’s only trigger — those runs happen in the IM group, so the rule has no console run. Run history is shown as a table with these columns: Run status values: Three filters are available above the table:
  • Time range: defaults to the last 30 days, adjustable, with a maximum span of 180 days.
  • Status: filter by the run statuses above, or choose All statuses.
  • Trigger type: choose from All trigger types / Run manually / Schedule / HTTP POST / On-call incident / War room created.
Run records returned by the API also include trigger_kind, which can be schedule, manual, http_post, oncall_incident, war_room_created, or debug. manual means the run was started through the run-now API, oncall_incident means it was started by a matching On-call incident event, and war_room_created means it was started by the war-room-created trigger (its session is in the IM group). A run with execution_place im returns no session identity: session_id and joined_session_id are empty and result_json is not sent, leaving only the status, time, and error fields. A run merged into another analysis has no session_id of its own. Instead, joined_session_id holds that analysis’s session ID and joined_session_name holds its session name. If both are empty, the run has its own hidden session. Click a row to jump to the chat page of the hidden session for that run, where you can view the full messages, tool calls, and artifacts of that run. A run that happened in IM (for example, one started by the War room created trigger) does not navigate; it shows the message This analysis is in IM. Open IM to view it. — you read that analysis in the IM group. A run merged into another analysis has no session of its own, so clicking it opens the analysis that took over the incident.

The reason line on an unsuccessful run

When a run’s status is failed, blocked, abandoned or skipped, the Name column shows the reason under the session name (hover for the full text). Common reasons: Other reasons show the text recorded by the system.
Run history is shown on the rule’s detail page, so viewing it requires edit permission on the rule.

Management and permissions

Enable / disable, edit, and delete

Each rule offers a set of actions in the Actions column: Clicking anywhere on the rule row opens its detail page, where you can edit the configuration, delete the rule, and view its run history (see “Run History” above). Rules you cannot edit are view-only: you cannot toggle them or use their actions. Above the list there are also two filters: Scope (All / Personal / Team, where selecting “Team” lets you multi-select specific teams) and Status (All statuses / Enabled / Disabled).

Scope and permissions

Automation rules share the two-level scope used by other AI SRE resources. For the general rules, see Scope and permissions. What is specific to automations:
  • A rule’s scope can’t be changed after creation. To move a rule, click Clone on the rule detail page and pick a new scope for the copy (rules at the IM execution place have no Clone).
  • A team rule keeps running after its creator leaves the team. A personal rule is disabled automatically once its creator is no longer an active account member.
  • A personal rule can be viewed and managed only by its creator. Account owners and admins see it in the list, but opening its detail page is denied.
  • HTTP POST trigger checks only the trigger URL’s Bearer token: an external system holding the token can start a run, which creates a hidden session under the rule’s personal or team scope. The On-call incident and War room created triggers don’t use that token; their runs belong to the rule’s scope in the same way.

Console Chat

Learn how a session holds one complete conversation — every run produced by an automation is, at its core, a hidden session.

Environments

Learn the differences between Auto, Cloud Sandbox, and self-hosted Runners, and how to pick an environment for an automation.

Usage Insights

Generate team incident-handling and operational insights from session data — a good output target for a scheduled automation.

Manage Knowledge

Provide domain knowledge to automation runs, loaded by team scope.

Artifacts

If a report from an automation run is published, it lands in the artifact gallery for long-term viewing and sharing.