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

# Automation overview

> Request firmware work from GitHub or Slack and have it run on a bench with your build tools and hardware.

Use automation to hand Inlay repository work without keeping a chat open. You ask in GitHub or Slack, and a [bench](/docs/integrations/benches.md) does the work as a job, with that machine's toolchain and connected hardware.

| Where you ask | How you start | Where the result appears |
| - | - | - |
| GitHub issue or pull request | Comment `@inlay` followed by your request | Commits, a pull request, and a reply in the same conversation |
| GitHub pull request review | Turn on automatic reviews, or comment `@inlay review` | Review comments on changed lines and an **Inlay Review** check |
| Slack channel or direct message | Mention `@Inlay` with your request | Progress and a summary in the Slack thread |

## Set up automation

1. **Set up a bench.** On the machine that will build and test the project, clone the repository and [install Inlay](/docs/cli/overview.md#install). Then run `inlay bench start` in the repository folder. The bench takes jobs for the checkouts it finds there. See [Set up a bench](/docs/integrations/benches.md#set-up-a-bench).
2. **Connect work to the bench.** The command opens the bench's **Connect work** page. Link your GitHub account, install or link the Inlay GitHub App, and map the repository. Installing the app and mapping repositories need an admin role. See [Connect work to a bench](/docs/headless/bench-jobs.md#connect-work-to-a-bench).
3. **Connect Slack**, if you want to ask from Slack. See [Connect Slack](/docs/headless/slack.md#connect-slack). Each person who asks from Slack also needs a [linked Inlay account](/docs/headless/slack.md#link-your-slack-account).
4. **Send a test request** from the **Connect work** page. It checks that the bench can clone the repository and read the board.
5. **Send a first request.** Comment `@inlay` with a request in the repository, or mention `@Inlay` in Slack:

   ```text theme={"theme":"css-variables"}
   @inlay fix the reconnect race in this pull request, run the unit tests,
   and report the result. Do not flash hardware.
   ```

   Inlay replies **On it.** and updates the reply with the result when the job finishes.

> [!NOTE]
>
> A machine running the [daemon](/docs/headless/daemon.md) can still take requests, but benches are replacing the daemon. To move a daemon host to a bench, run `inlay bench start --jobs` on it.

## Status replies

A request waits until a bench picks it up. While it waits and runs, Inlay keeps one reply up to date in the GitHub conversation or Slack thread. The reply starts with its state:

| Reply | Meaning |
| - | - |
| **On it.** | A bench can take the request. When Inlay already knows which, the reply names it and how many jobs it's running. |
| **Waiting** for a bench | No bench picked the request up within about 45 seconds. The reply says why, such as a bench with **jobs off**, **paused**, or all its slots busy. It runs as soon as a bench takes it. |
| **Queued** for a bench, **which has been offline since** a time | The bench that can take the request is offline. It runs when the bench is back. |
| **No bench** takes work for the repository **yet** | No bench takes jobs for the repository. Turn the repository on for a bench, or set up one. |
| **Running** on a bench | A bench is working on the request. |
| **Waiting for you.** | Inlay asked a question. Answer in the same conversation. |
| **Done** on a bench | The job finished. The result follows, or is in the reply below. |
| **Failed** on a bench | The job didn't finish. The reason follows. Mention `@inlay` again to retry. |
| **Canceled** | Someone canceled the request. |

The reply ends with a line such as `Request e-d9e7 · Firmware · 39 s · View PR #3`. Select the request tag to open the request in the Inlay app. To cancel a request, reply `@inlay cancel`. See [Follow and cancel a request](/docs/headless/bench-jobs.md#follow-and-cancel-a-request).

## Write a complete request

State these in each request:

* The repository or pull request, if it isn't clear from where you ask.
* The change you expect.
* Constraints, such as APIs or message formats to keep.
* How to verify the result, such as tests or builds to run.
* For hardware work, the target board and any power or flashing limits.

Record the project's build, test and flash commands in [INLAY.md](/docs/core-concepts/inlay-md.md) so every run can find them.

## Review what Inlay publishes

Coding requests publish by default. Inlay commits, pushes and opens or updates a pull request during the run:

* For a request on a pull request, or a Slack request that names one, Inlay pushes to that pull request's branch.
* For other requests, Inlay creates a branch named `inlay/work/<work-item-id>` from the default branch and opens a pull request.

Ask for local-only work if you don't want a push or pull request. Inlay never merges without a separate request. Review the changes and the verification results first.

If Inlay needs a decision, it asks in the same GitHub conversation or Slack thread. Answer there to continue the run.

> [!WARNING]
>
> Jobs approve their own actions automatically. They can edit files, run commands and use any hardware the bench can reach. Run the bench under an account that can reach only the repositories, tools and hardware meant for this work, and state hardware limits in each request.

## Choose a guide

> [card] [Bench jobs](/docs/headless/bench-jobs.md)
>
> Turn jobs on, connect repositories, send a test request, and follow or cancel a job.

> [card] [GitHub work](/docs/headless/github.md)
>
> Connect a repository, request changes, and set up pull request reviews.

> [card] [Slack work](/docs/headless/slack.md)
>
> Start and continue repository work in a Slack thread.

> [card] [Benches](/docs/integrations/benches.md)
>
> Set up a lab machine as a bench and use its boards from your sessions.


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