Appearance
Routines Optional feature
A routine runs saved AI agent instructions on a schedule. Use routines for recurring analysis, canvas creation, and Slack posts. Enable the AI agent in your workspace before using routines.
TIP
This is an optional feature. Depending on your contract, it might not be available.
Creating with chat
- Open Global nav > AI Agent.
- Select Routines in the left sidebar.
- Select Create routine > Create with chat.
- Edit the draft to specify your data and destination, then send it.
- Review and approve the routine proposed by the AI agent.
In an existing session, you can also ask the AI agent to create or edit a routine. You can also ask from Slack or API conversations. If the operation needs approval, approve it in Codatum or in the confirmation message posted in the Slack thread.
Creating manually
- In Routines, select Create routine > Create manually.
- Set Name, AI profile, Schedule, and Instruction.
- To run with a service account's permissions, select the service account in Run permission.
- Select Save.
The routine runs with the permissions of the Run permission account and the selected AI profile. Run permission defaults to your own account. If you're a user of a service account, you can select that service account instead (Running as a service account). If you create a routine while switched to a service account, that service account becomes the run permission.
External actions such as posting to Slack also require the relevant agent connectors. A routine can use only connectors whose Admins and users include the run permission account and allowed by the AI profile. Check them under Agent connectors available with the run permission on the create and settings pages.
A routine run doesn't wait for confirmation. Whether operations that need confirmation run is decided by the routine's approval settings. The approval mode from chat isn't used.
In routine runs, the AI agent reports and responds in the language the instruction is written in. The Language setting of the run permission account isn't used.
Running, pausing, and editing
Open a routine from the list to manage it. Only its owner can edit settings, run it manually, or resume it (Sharing and permissions).
| Action | Behavior |
|---|---|
| Run now | Runs without waiting for the schedule. Unavailable while a job is running. |
| Edit | Changes the name, status, AI profile, run permission, schedule, instruction, or approval settings (Changing the run permission). |
| Disable routine | Pauses scheduled runs. |
| Resume | Resumes scheduled runs for a paused routine. |
| Delete | Deletes the routine. |
Approval
A routine run doesn't wait for confirmation. The Approval mode options and which operations need confirmation are the same as in chat. However, operations that would need confirmation are skipped, and the AI agent continues the run without them. You can review skipped operations in Run history (Reviewing results).
| Approval mode | Description |
|---|---|
| Manual | Operations that would ask for confirmation in chat run only if they're in Allowed without asking. |
| Auto | Writes to external services and deletions run only if they're in Allowed without asking. Other operations aren't restricted. |
| Allow all | All operations run. |
- New routines default to Auto. When you create a routine in an AI agent chat without specifying a mode, it uses the session's approval mode. Routines created before approval settings were added use Allow all.
- Allowed without asking is set for each routine. The Allowed without asking list in chat settings isn't used.
- In BigQuery, SQL that exceeds the execution budget doesn't run unless the mode is Allow all. Adding it to Allowed without asking doesn't change this.
- Changes to approval settings take effect from the next run.
You can set Allowed without asking in the following ways.
- When you create a routine in an AI agent chat, the AI agent proposes the operations the routine uses every run, based on the operations run in that session. You can review them in the confirmation before the routine is created.
- In Run history, select Allow next time under Not allowed.
- If an operation the instruction needs is not allowed, the AI agent proposes adding it. Select Save proposed changes to add it. The AI agent can propose only operations that were not allowed in that run.
- With Edit, remove operations you no longer need.
Running as a service account
When Run permission is a service account, the routine runs with the service account's permissions instead of its creator's. Your team can operate shared routines without depending on a particular user's permissions.
You can select a service account that you're a user of. Workspace owners can select any service account.
A routine whose run permission is a service account works as follows.
- All users of the service account, including workspace owners, are owners and can edit settings, run the routine manually, resume it, and delete it. You can't add or remove owners individually. Manage users in the service account's Admins and users.
- Agent connectors that use personal authentication aren't available.
- The routine reads the service account's personal memory.
- Users of the service account can open the sessions the routine runs and continue them from their own accounts without switching (AI agent sessions).
- Runs fail after the service account is deleted.
Changing the run permission
Owners can change Run permission with Edit. You can change it to a service account that you're a user of, or to your own account. You can't change it to another user's account.
- Open the routine and select Edit.
- Select a different Run permission. Who owns the routine with that run permission appears below the field.
- Select Save. For a routine with run history, a confirmation appears. Review it and select Save.
If you change the run permission from a service account to your own account, the instruction and routine memory, including what other users wrote, run with your permissions. Other users can no longer edit the settings. Sharing settings for viewing and routine memory don't change when you change the run permission.
Sessions created by past runs keep the previous run permission. People who could open them before can still open and continue them. The new owners may not be able to open them. When such a session is continued, routine memory is loaded only if the session's run permission account can still view the routine.
A job that's already running finishes with the previous run permission. A Queued job that hasn't started yet doesn't run and appears in Run history as Failed. The new run permission applies from the next run.
Reviewing results
On the detail page, Settings shows the instruction and upcoming runs. Run history shows scheduled times, statuses, and summaries. Memory shows information saved by the routine.
If operations were skipped because of the approval settings, Not allowed (count) appears in Run history. Select it to see the operations. Owners can select Allow next time to add an operation to Allowed without asking. SQL skipped for exceeding the execution budget is marked "(over the execution budget)" and can't be added, even if the operation also needed confirmation.
When the AI agent proposes changes to the instruction, schedule, or Allowed without asking, Change proposed appears. Select Review details to review the proposal.
Change history
On the detail page, Change history lists the creation of the routine and each change to its settings, newest first. Each row shows the date, who made the change, how it was changed, and the changes. Select a row to compare it with the previous save.
- A change is recorded when you save a change to the name, instruction, schedule, timezone, AI profile, run permission, or approval settings. Pausing, resuming, and changing sharing settings aren't recorded.
- Changes shows Created for the creation, and the changed items for each change.
- Changed via is one of Created in the editor, Edited in the editor, From a conversation, Saved from a run proposal, Allowed from a run, or ---.
- From a conversation means the routine was created or changed in an AI agent chat. The session title and link appear only to people who can open that session.
- Saved from a run proposal means a change proposed by the AI agent was saved with Save proposed changes.
- Allowed from a run means an operation was added with Allow next time in Run history.
- --- records the content, at the time change history became available, of a routine created before then.
- Anyone who can view the routine can review its change history.
Schedule
Select Frequency from Hourly, Daily, Weekly, Monthly, or Custom (cron). With Custom (cron), you specify a five-field cron expression (minute hour day-of-month month day-of-week). For example, */30 * * * * runs every 30 minutes.
- Minutes must be multiples of 5.
- Runs must be at least 10 minutes apart. You can specify
*/10or0,30, but not*/5. - You can't restrict both day-of-month and day-of-week. Set one of them to
*. - A run is skipped if the previous run is still in progress at its scheduled time. Skipped runs appear in Run history as Skipped.
Schedule constraints and the instruction length limit are also listed in Limits.
Sharing and permissions
The owner can use Share to grant viewing access to users, groups, or all workspace members. Viewers cannot edit settings.
The owner is the Run permission account. If the run permission is a service account, all users of that service account are owners (Running as a service account).
Automatic runs do not check workspace IP access control or multi-factor authentication. For the effect of settings changes, see Checks by access method.
Workspace owners can view, disable, and delete routines owned by other users. They cannot edit settings, run those routines manually, or resume them. For routines whose run permission is a service account, workspace owners are also owners and can edit settings, run them manually, and resume them.