> ## Documentation Index
> Fetch the complete documentation index at: https://trytilde.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Routines

> Run an agent on a schedule, or when a connected service emits a signal, such as a new GitHub issue or a CloudWatch alarm.

A routine starts an agent run without anyone sending a message. It fires on a cron schedule, or when a [connection](https://trytilde.ai/docs/connections.md) emits a **signal**, such as a new issue or a firing alarm. Each firing starts a run in a new thread, with the routine's prompt.

Use routines for recurring work, such as a daily digest, and for work that should start the moment something happens, such as triaging every new issue.

## Create a routine

**1. Open the agent's Routines tab**

Open the agent in the Agent Registry, select **Routines**, and select **Add a routine**.

**2. Choose the trigger**

For a schedule, enter a **Cron schedule (UTC)**, such as `0 9 * * 1-5` for 09:00 UTC on weekdays. For a signal, choose a connection and the signal that runs the agent. You can set up a new connection from the same menu.

**3. Write the prompt**

Enter a **Name** and the **Prompt**, such as "Triage this and reply with next steps." Optionally, enter a **Thread title**.

**4. Save**

Select **Create routine**. A new routine is enabled.

The **Routines** tab shows each routine's next and last run. Select **Disable** to pause one.

## Templates

The prompt and thread title are templates. `{{ key }}` is replaced with a value from the signal, such as `{{ summary }}`, a one-line description of the event. The routine editor lists the signal's **Variables**, with examples. A scheduled routine has one variable, `scheduled_at`, the time the run was scheduled for, in UTC.

For a signal routine, Tilde adds the signal's details after your prompt, so the agent sees the whole event.

## Signals

Signals are events a connection's provider sends to Tilde through its webhooks. Connections to these providers emit signals:

* GitHub App events, such as new issues.
* Slack, AgentMail, Linq, and WhatsApp messages.
* Sentry issues, regressions, and alerts.
* Linear issues and comments.
* CloudWatch alarms, through SNS, on an AWS connection.
* Firecrawl monitor checks.

Under **Only when**, add filters so a signal starts a run only when each variable equals one of the values you list. For example, run only when `alarm.state` is `ALARM`, or only for issues of one team.

## How runs behave

* **The agent acts as itself.** A routine run serves no person, so the agent calls tools and the [ontology](https://trytilde.ai/docs/iam.md) under its own identity.
* **Each firing is a new thread.** Find it in the agent's [Sessions](https://trytilde.ai/docs/sessions.md) tab.
* **Firings happen at most once.** A webhook the provider delivers twice starts one run. If Tilde is down at a scheduled time, the routine fires once when it is back, then moves to its next time. Missed times are not caught up.

Managing an agent's routines needs the `edit_routines` action on the agent in Cloud and Enterprise. See [Operator access](https://trytilde.ai/docs/operator-access.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.