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

# What is a loop?

> Write recurring work once in plain English. Songbird runs it across your business systems and posts the results in Slack.

***

A **loop** is a piece of recurring work your team wants done the same way every time. It's written in plain English, runs on its own across your business systems, and delivers results to Slack, where the team can read it, question it, and improve it.

The loop is the core unit of Songbird. Connections, triggers and spaces all exist to help a team build, share, and run loops.

> **Example: Customer renewal alert**
>
> Sixty days before a customer renews, pull account data from HubSpot, NPS replies from SurveyMonkey, usage from Metabase, and open tickets from Jira. Triage each account against the team's renewal-risk rubric. Post a health card for each account to `#renewals` and tag the deal owner.

The RevOps team writes the instructions and rubric once. From then on, the loop runs on every renewal and the whole CS team sees the results in the same channel. When someone spots a gap or improvement (for example, "check for executive sponsor engagement in the past quarter too"), they can simply reply from Slack and update the loop for everyone.

## The structure of a loop

Every loop has the same four parts.

> **[Trigger](/triggers.md)**
>
> What starts a run. There are three options: **on demand** (run it whenever you like from the Songbird app or by asking Songbird in Slack), a **schedule** ("every weekday at 9am"), or an **event** from Slack, GitHub, or Linear ("when a PR merges in the web repo").

> **[Steps](/steps.md)**
>
> Each step is a short plain-English instruction: gather data, apply judgment, or write back to a system. If a step uses AI, it only has access to the specific tools it needs, which means less security exposure compared to traditional agents with every provider and tool available.

> **[Connections](/connections.md)**
>
> The business systems the steps can read from and write to. Examples include your CRM, analytics, ticketing, data warehouse, and more.

> **[Destination](/slack.md)**
>
> Where the results of a loop show up: Songbird delivers content to Slack channels. Control the message format, including optional detail in a thread.

## Building a loop

**1. Describe it**

Tell the Songbird agent what you want in plain English. You can build loops in the Songbird app, in Slack, or from Claude or ChatGPT through the Songbird MCP. The agent turns that intent into a trigger, a set of steps, and a destination, and helps you connect any systems it needs to read or write data.

**2. Test it**

Run a **test** to preview the results against real data. Preview how the Slack messages will look right from Songbird, without filling up your Slack instance with test posts. Test runs also never write to your connected systems, so you can iterate freely.

**3. Publish it**

Publishing makes the loop live. Before it goes live, Songbird shows which systems the loop reads, which it writes to, which channels it posts in, and what triggers it, so nothing writes data without someone signing off. Every publish is saved as a version.

**4. Improve it together**

Results arrive in Slack. Teammates ask Songbird questions about the run, to dig into the results as needed. Suggest changes in the thread: anyone who can edit the loop can use the Songbird agent to update the draft so that future runs use the improved version.

## Private loops and shared loops

A loop can live in one of two places:

* **My loops:** private to you, using your own connections. Most people start here.
* **A space:** a shared area for a team, such as CX & Sales or Engineering. Spaces have shared connections to build with together, and every member of the team can author and edit loops that combine their unique context & judgment into a single automation.

People in the Slack channel a loop posts to can 1) view the loop and 2) duplicate it to build a variation for their own needs. See [Spaces and teamwork](/spaces.md).

## How a loop is different from a prompt

A saved prompt or a scheduled chat task asks a model to figure out the whole job again on every run. This often means an AI rewriting SQL queries on the fly, grabbing different data sets from the supporting system, and the AI patching over gaps to complete the stated goal in an unattended session.

A loop is compiled from your instructions into a fixed sequence of steps, so the work is the same shape every time.

> **Predictable**
>
> The same steps run in the same order on every run. Steps can include deterministic code that runs exactly as written each time.

> **Explainable**
>
> Every run is recorded step by step, including inputs, tool calls, and results, so you can trace exactly what happened and why.

> **Scoped**
>
> Each step gets only the tools written into it. Tool use and the data retrieved is predictable on every run. Songbird never mixes tool and open web access.

AI still does the work that needs judgment, such as reading NPS comments to assess their sentiment and pull out key insights, weighing many data signals against a rubric, and writing the summary. The loop structures *when* that judgment applies and what data the AI can use.

## How a loop is different from a workflow

Traditional automation tools like Zapier or n8n move data from system A to system B along fixed wires. A loop does the work you'd otherwise ask a real person to do: gather context from several systems, interpret it against your team's standards, and explain what deserves attention. There are no nodes or field mappings to maintain. The instructions are the loop, and Songbird compiles your intent to a deterministic runtime that executes the same way every time.

## Common questions

> **Do I need to write code to build a loop?**
>
> No. You describe the work in plain English and the Songbird agent writes the steps. Technical users can add deterministic code to a step when they want it to run exactly as written every time. The options today are a SQL or HogQL query, with additional languages planned on the roadmap.

> **Can a loop write to my systems?**
>
> Yes, when a step is given a write tool, for example adding a note to a CRM record. Test runs never write, and Songbird shows every system a loop will write to before you publish. Tools a provider hasn't labeled as read-only are treated as writes. See [Security and safety](/security.md).

> **Which AI model runs my loop?**
>
> Today, loops run on a default model chosen for reliability and cost. In the future, you can choose which models your loops (or even individual steps) use. Because loops are compiled into steps rather than tied to one model's behavior, changing models won't mean rebuilding your loops.

> **Can I build loops from Claude or ChatGPT?**
>
> Yes. Connect the Songbird MCP and ask your agent to create or update a loop. It's the same loop you'd see in the Songbird app. See [Build from any agent](/build-from-any-agent.md).


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