Routines

Have the agent run instructions on its own, on a schedule, from a webhook or when something happens in Studio. Each run opens a new chat.

A routine is a set of instructions the agent runs without anyone pressing Send: every weekday at 09:00, when another system calls its webhook, or when something happens in Studio. Each run opens a new chat with the connections you chose, and the agent works through the task on its own.

Use routines for work that repeats: a weekly check of what changed in your EA repository and where it now disagrees with your CMDB, an impact graph drafted whenever an architecture review request arrives, or a summary posted after each decision brief is decided.

Availability

Routines are on for every organization. An admin can turn them off under Organization settings → Features.

Create a routine

Open Routines in the rail and choose New routine.

  • Name it the way your team talks about the job.
  • Instructions are what the agent does on each run, written as you would write a chat message. Say what to read, what to produce and what to report.
  • Trigger is what starts a run:
    • Schedule: every hour, every day, weekdays, a day of the week, or a day of the month, at a time in your time zone. The routine shows its next run.
    • Webhook: a URL and a token for another system to call. See Start a routine from another system.
    • Studio event: a decision brief is sent for review, a decision brief is decided, a file is added to a workbench, or a workbench run finishes.
  • Connections are the systems the agent may use on each run, and Model is the model it runs on (your organization's default unless you choose one).

Choose Create routine. Run now starts a run straight away and opens its chat, which is a good way to check the instructions.

How a run works

  • It runs as you. The person who created the routine owns its runs: run emails go to them, and decisions the agent records name them. If they leave the organization, the routine pauses.
  • Writes wait for a person. Nobody is watching a routine, so any change the agent wants to make in a connected system waits for approval in the run's chat, even if your organization lets unattended runs write.
  • Each run is a chat. Runs are listed under their routine, newest first, with their state: running, waiting for you, finished, or failed. Open one to read it, answer a question, approve a write, or carry on the conversation.
  • You hear when it needs you. If a run waits for an answer or an approval, its owner gets an email after a few minutes.
  • Spending is capped. A routine's run has a smaller budget than a chat, and counts towards your organization's daily budget.

If three runs in a row cannot start, Studio pauses the routine and emails its owner the reason. Fix the cause, then choose Resume.

Start a routine from another system

A routine with a Webhook trigger starts when another system calls its URL. Choose Create token on the routine to get one. The token is shown once; store it in the calling system. New token replaces it.

curl -X POST "https://www.aitransformstudio.com/api/routines/hooks/<routine id>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: EA-1234" \
  -d '{"issue": "EA-1234", "summary": "New integration with the payments platform"}'
  • The body (JSON or text, up to 64 KB) is passed to the agent with the instructions, as information about what happened. The agent is told not to follow instructions inside it.
  • Send the same Idempotency-Key again and the routine still runs once, so a retried call is safe.
  • Studio answers 202 when the run is queued, and 401 for a wrong token.

Issue trackers, service management tools and EA repositories can usually call a URL from an automation rule or a webhook setting.

Who can change a routine

Everyone in your organization can see every routine and its runs. Only the routine's creator can change or run it, because its runs run in their name. Organization admins can pause, resume or delete any routine. Deleting a routine keeps its past runs: they move into Chats, and any change the agent wants to make there still waits for approval.

Routines · AI Transform Studio