---
title: "Automations"
description: "Turn schedules and incoming webhooks into managed coding-agent work."
canonical_url: "https://hoplite.sh/docs/automations"
markdown_url: "https://hoplite.sh/docs/automations.md"
---

# Automations
URL: /docs/automations
LLM index: /llms.txt
Description: Turn schedules and incoming webhooks into managed coding-agent work.
Related: /docs/threads/run, /docs/api/createAutomation, /docs/factory/webhooks

# Automations

Run recurring and event-driven coding tasks with project automations. By default each trigger starts a new thread using the project's cloud execution configuration, with its own workspace, history, and result. A schedule can instead send its prompt to an existing thread, continuing that thread's workspace and history.

Incoming automation webhooks start work in Hoplite. [Event webhooks](/docs/factory/webhooks) send Hoplite state changes to your application.

## Create an automation

Open the project's **Automations** page and create an automation. Set its name, prompt, and trigger, then select **Create automation**. An optional run title controls the titles of the threads it creates. Without a configured title, automatically named threads use the saved task and incoming event details, so different alerts can receive distinct names.

Owners, admins, and members can create and manage automations. Viewers can inspect them and their run history. Enabled-automation limits are enforced when you create or enable one.

Automation runs do not inherit a user's private memories or personal skills. Put required configuration in the project or repository. Review the project's permissions and PR settings before enabling unattended execution. Commits credit the automation creator, including runs on existing threads and follow-up autofixes on automation-created threads, while respecting commit-attribution settings and opt-outs.

## Run on a schedule

Choose one schedule type:

| Type | Configuration |
| --- | --- |
| Cron | A five-field expression and an IANA timezone; `0 9 * * 1` in `Europe/Dublin` runs Mondays at 09:00 local time |
| Interval | A fixed period subject to your plan’s minimum interval |

The minimum interval depends on the workspace plan: 60 minutes on Free and 5 minutes on paid plans (Plus, Team, and legacy Scale).

Scheduled automations can discover, read, message, and monitor related threads, whether the schedule continues an existing thread or starts a fresh one. Access is checked against the automation creator's current membership, same-project thread permissions, and bounded write budgets. Fresh scheduled threads must have verified schedule and execution provenance; this authority does not grant them permission to create additional threads. Webhook automations do not receive this cross-thread capability.

The automation list shows the next scheduled run and the last result. Disable an automation to stop new scheduled work without deleting its configuration.

## Trigger from a webhook

Create a webhook automation and copy its bearer token into the sending system. Send a POST to the fixed endpoint:

```bash title="Trigger an automation"
curl --fail-with-body https://api.hoplite.sh/api/automations/webhooks \
  --header "Authorization: Bearer $HOPLITE_AUTOMATION_TOKEN" \
  --header "Content-Type: application/json" \
  --header "X-Hoplite-Event-Id: deploy-failed-001" \
  --data '{"event":"deploy.failed"}'
```

Use a unique `X-Hoplite-Event-Id` for each new event and reuse it when retrying that delivery. Without a supported delivery-ID header, Hoplite deduplicates by the request-body hash, so repeating the same body does not start independent work. GitHub's `X-GitHub-Delivery`, GitLab's `X-Gitlab-Event-UUID`, Linear's `X-Linear-Delivery`, and `svix-id` are also recognized.

A `202` acknowledges the delivery but does not prove a thread started: unknown tokens, disabled automations, and duplicate deliveries receive the same status. Check the automation's run history for an execution and its thread. Retryable thread-creation failures return a server error so the sender can retry with the same event ID. Non-retryable entitlement failures, such as exhausted credits or an inactive plan, are acknowledged with `202`; resolve the entitlement before sending a new event.

The configured prompt stays in control. Hoplite appends selected headers and a redacted, size-limited payload as untrusted automation context; do not rely on the full raw body being present.

The token can trigger only this automation. It is separate from an API key and does not grant read access to project or thread data.

### Manage the token

Open **Edit automation** to copy the endpoint, request, or current token. Rotating the token invalidates the previous token immediately; update the sender after rotation.

Legacy `hwa_` credentials that cannot be displayed must be rotated. New `hwa2_` credentials belong in the authorization header and are rejected in URL paths.

## Inspect the runs

Open an execution from the automation's run history to inspect its thread. Failed executions retain their thread link and show a classified cause when one is available, such as a provider usage limit.

The automation status page shows all-time accrued cost in USD: model cost and recorded workspace time attributed to its runs. Activity from other users or automations in a shared thread, and idle workspace time, are excluded.

When an automation finds no actionable work, its agent can archive its own automation-created thread with the `other_thread_control` tool's `archive_self` op, provided it has no linked pull requests. The conversation remains available in archived threads; the tool does not delete it or archive unrelated threads.

Automation-created threads are excluded from the main thread list by default. Enable **Include threads started by automations** in the thread filter to see them there.

For API-managed automations, use [Create automation](/docs/api/createAutomation), [Run automation](/docs/api/runAutomation), and [List executions](/docs/api/listAutomationExecutions). Use a stable idempotency key for each logical write; see [Retries](/docs/factory/retries).

## Sitemap

Sitemap discovery is not enabled for this deployment.
