> For the complete documentation index, see [llms.txt](https://docs.sola.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sola.security/workspace/routines.md).

# Routines

AI routines that automate your agents, on a schedule or trigger

Routines are predefined [agent](/workspace/agents.md) runs that execute automatically.

Configure one with a set of instructions, an agent, a schedule, and a project scope, and Sola handles the rest. Every run is logged and auditable, and you can continue investigating in chat.

<figure><img src="https://633303660-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMkiDTkdEK7CdyQX8KZZH%2Fuploads%2FbN786sL3mLS6XIWFmCIz%2FRoutines.svg?alt=media&amp;token=ef1db826-e689-44f5-90f5-6f93bbcb6b1a" alt="Sola Agent Routines"><figcaption><p>Sola Agent Routines</p></figcaption></figure>

## Creating routines

A routine ties together an [**agent**](/workspace/agents.md), a **task**, a **schedule**, and a **project scope**. Once created, it runs on its own at the configured frequency.

Creating and managing routines requires Owner or Admin access. Contributors can view run history for projects they have access to.

**To set up a routine, complete the following:**

* **Name** - Enter a short, descriptive name for the routine.
* **Task** - Write a clear, self-contained prompt describing what the agent should do on each run, up to 1000 characters.
* **Agent** - Select the agent to run the routine. If your workspace has no custom agents, the Sola default agent is selected automatically; if it does, the default agent still appears as an option alongside them. The agent's instructions, tools, and skills apply to every run.
* **Project** - Assign the routine to an existing project, start a new one, or create one from a template.
* &#x20;**Trigger** - Choose how the routine runs:
  * **Schedule** - Set how often the routine runs: every hour, day, week, or month, with a specific day, date, or time where relevant.
  * **Webhook** - Connect a third-party tool to the routine's webhook URL to trigger a run with its payload.
  * **Alert** - Wire the routine to an [alert](/workspace/projects/alerts.md) to run it automatically the moment the alert is triggered.

## Emailing routine results

A routine can send up to 5 emails each time it runs. Include the recipient in the task, because Sola sends only to addresses written in the task or in the agent's instructions, never to addresses found in data. Confirm that Email is enabled for the agent. For example: "How many storage buckets do we have? Send the results to <secops@example.com> by email, with a CSV of the full list."

<figure><img src="https://633303660-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMkiDTkdEK7CdyQX8KZZH%2Fuploads%2FJbfWuVkureMRahXuSff5%2FEmail%20in%20Routines.png?alt=media&amp;token=3a764eef-b485-40c0-8a29-5f50356beed6" alt="A routine that emails results each time it runs"><figcaption><p>A routine that emails results each time it runs</p></figcaption></figure>

## Reviewing run history

Every run is logged, showing exactly what the agent did, what it found, and what it produced.

**To review a routine's run history**, go to ***Routines*** and open the routine.

The routine's overview shows its schedule, assigned agent, project, and current status: **Active**, **Paused**, or **In progress**. Below that, run history lists every past run, each with its own status: **completed**, **In progress**, or **Failed**.

Open any run to see the run details and output.

To continue investigating a run, click **Continue in chat** to open it in a new chat session grounded in that run's context.

## Managing routines

The Routines page gives you a workspace-wide view of all your routines.

From this page you can:

* See all routines at a glance, with last run time and status.
* Enable or disable any routine.
* Filter by status, agent, or project.
* Add new routines.

## Routines and workflows

**Automate work with routines**. Routines and workflows are both ways to automate work, but they work differently.

**Routines** run an agent automatically, on a schedule, webhook, or alert. The agent reasons over the task, uses its tools, and decides how to proceed. Use routines for recurring investigations or monitoring tasks where the path to the answer may vary.

**Workflows** execute a fixed sequence of predefined steps in order. Use workflows for repeatable, structured processes where each step is known in advance.

***

## FAQs

### How are routines different from agents?

A routine is a saved configuration that runs an agent automatically, on a schedule. An agent is the actor: it has its own instructions, tools, and memory, and reasons over the task it's given. You can invoke an agent directly in chat with @mention, or let a routine invoke it for you on a schedule, webhook, or alert.

### How are routines different from workflows?

Routines run an agent on a schedule. The agent reasons over the task, uses its tools, and decides how to proceed. Workflows execute a fixed sequence of predefined steps in order. Use routines for recurring investigations where the path to the answer may vary; use workflows for repeatable, structured processes where each step is known in advance.

### Who can create and manage routines?

Owners and Admins can create, edit, enable, disable, and delete routines. Contributors can view run history for routines in projects they're a member of.

### What can trigger a routine? <a href="#what-can-trigger-a-routine" id="what-can-trigger-a-routine"></a>

There are three ways to trigger a routine: a schedule (hourly, daily, weekly, or monthly), a webhook (an incoming call from a third-party tool, with its payload passed to the agent), or an [alert](/workspace/projects/alerts.md) (the routine runs automatically the moment it's triggered).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sola.security/workspace/routines.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
