# How Jobs Work

A job is one thing: a definition (which agent, and what to ask it) plus a **trigger** that decides when it runs. There is no second kind of object to learn — a job you start by hand and a job that fires on a schedule are the same record with a different trigger.

The Jobs app opens as a searchable table of every job you can see. Each row carries an icon for its trigger kind; hover the icon for a tooltip naming it.

| Trigger | Icon | Tooltip | How it works |
|---------|------|---------|--------------|
| **Manual** | Lightning bolt | *Manual* | Runs the agent once, when you start it. |
| **Cron** | Calendar clock | *Cron* | Runs the agent on a recurring schedule defined by a cron expression. |
| **Push** | Eye | *Push* | Listens for events. When one arrives, the job evaluates its filter and runs the agent if the event passes. |

Open a job and the same information appears as a badge on its detail page reading **Manual**, **Cron**, or **Push** — or **Goal** for a goal job.

Every trigger creates a **run** record you can inspect, so you always have visibility into what ran, when, and whether it succeeded.

## From trigger to result

A job is created by the assistant in chat or through `POST /jobs` (see [How Jobs Are Created](#how-jobs-are-created)).
Whatever its trigger, it ends the same way: a run of the job's agent, which leaves a run record behind (see
[Job Runs](/insulin/jobs/runs/)).

*Diagram: The assistant or the REST API creates a job; its manual, cron or push trigger starts a run of the agent, which leaves a run record, may leave scratch files, and sends a Slack DM for a job you own.*

- The assistant (asked in chat) → A job (one agent, what to ask it, one trigger)
- REST API (`POST /jobs`) → A job (one agent, what to ask it, one trigger)
- A job (one agent, what to ask it, one trigger) → Manual (Run, or the run endpoint)
- A job (one agent, what to ask it, one trigger) → Cron (a cron schedule)
- A job (one agent, what to ask it, one trigger) → Push (an event that passes the filter)
- Manual (Run, or the run endpoint) → A run (the agent runs once)
- Cron (a cron schedule) → A run (the agent runs once)
- Push (an event that passes the filter) → A run (the agent runs once)
- A run (the agent runs once) → Run record (status, Output, Steps and Input)
- A run (the agent runs once) → Scratch files (an organization agent's run, on a shared sandbox)
- A run (the agent runs once) → Slack DM (a manual or scheduled job you own): when it finishes

## Reading a row

A cron or push row leads with a dot saying whether the job is switched on, then the trigger icon and the job's name. Hover the dot for its state in words.

| Element | Appears on | Means |
|---------|-----------|-------|
| Green dot — **Enabled** | Cron and push rows | The job is switched on and will fire |
| Grey dot — **Disabled** | Cron and push rows | The job is switched off and will not fire on its own |
| The schedule, in words | Cron rows | When the job fires; hover it for the raw cron expression |

A manual job has no dot, because it has no switch to be in either state. The **Last run** column shows how the latest run ended — **Running**, **Completed**, **Failed**, **Cancelled**, **Pending**, **Filtered** or **Rate limited** — next to how long ago it ran; hover the time for the exact date.

## Single-turn and goal jobs

Beyond its trigger, a job runs in one of two modes:

| Mode | What a run does | Leading icon |
|------|-----------------|--------------|
| **Single** | One agent turn — ask, answer, done. The default. | The trigger kind's own icon |
| **Goal** | A goal loop pursued across rounds until the objective is met or you stop it | A target |

A goal job is the [long-running work](/insulin/agents/goals-and-memory/#long-running-work) surface with a job record behind it, and its detail page links back to the conversation the rounds are written into.

:::info
**A goal job is always a manual job, and only an agent setting a goal creates one.** Ask for the work in a conversation and the agent decides whether it needs a goal. The mode is not something you choose: the assistant's job tools have no such option, and `POST /jobs` and `PATCH /jobs/{id}` do not accept it, though the mode is reported on a job you read back. A goal job also can't be run again; ask for a new goal instead.
:::

## Finding a job

The list header holds a **Search…** box plus four filters:

| Filter | What it narrows to |
|--------|--------------------|
| **Agent** | Jobs that run under one agent. |
| **App** | Jobs created from one Insulin app. Jobs created before app provenance was recorded, or created by an agent with no app context, group under **Unassigned**. |
| **Channel** | Jobs whose agent belongs to one channel. |
| **Status** | Jobs whose latest run is in one state. |

Each filter opens with an "any" option (for example **Status: any**) that clears it. Filters apply server-side, so they hold as you scroll past the first page of results. Columns — **Agent**, **App**, **Channel**, and **Last run** — can be dragged wider or narrower; **Name** absorbs the change.

A filter for something the window already pins is not offered. Open the list from an agent and there is no Agent filter; open it from a channel and there is no Channel filter — the control would only let you contradict the context you opened.

## The Jobs tab in a chat or a channel

Jobs also appear inside Chat. A solo agent chat and a [channel](/insulin/channels/) both show **Messages**, **Files**, and **Jobs** tabs.

A channel's Jobs tab lists the jobs belonging to the agents that are members of that channel, resolved for you server-side — and only the ones you are allowed to see. This embedded view is a narrow panel, so it drops the search box and the four filters and shows just **Last run** next to each name; the surrounding window already tells you which agent or channel you are looking at.

Clicking a row here opens the job in the **details drawer** on the right — the same drawer a goal or job card in the conversation opens — rather than replacing the page, so the tab you were on stays where it was.

## How Jobs Are Created

There is no "Create Job" form in the Jobs app — the list only lets you search, open, and manage existing jobs. You create a job in one of two ways:

- **Ask the assistant in chat.** Tell the built-in Insulin agent what you want to automate (for example, "every weekday at 9am, summarize new AWS entitlements"). The agent creates the job for you, picking the trigger kind that matches what you asked for. See [Conversations](/insulin/agents/conversations/).
- **Use the REST API.** `POST /jobs` creates a job programmatically.

A job runs as the agent that created it: ask the built-in **Insulin** assistant and the job runs as Insulin; ask a custom [agent](/insulin/agents/) and it runs as that agent, with that agent's access to resources and integrations. Only the REST API (`POST /jobs`) can name a different agent.

:::info
A job you create runs within your scope, so the agent has access to the same resources and integrations you do. It is private to you: **only its owner** can see it, run it, edit it, or delete it. That includes organization administrators — being an org admin does not give you someone else's jobs. The exception is work Planner schedules in an organization channel: it belongs to the channel, and every member of the channel sees it — see [Channels](/insulin/channels/agents/#what-planner-can-and-cannot-do).
:::

## Use Cases

- **Marketplace monitoring** — A cron job that checks for new entitlements or expiring offers daily and summarizes changes.
- **Automated alerts** — A push job on Fours marketplace events that runs an agent to evaluate severity and notify your team.
- **Recurring reports** — A cron job that runs a data analyst agent weekly to generate revenue or usage reports.
- **Co-sell pipeline tracking** — A cron job that reviews partner referrals on a schedule and flags stale opportunities.
