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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Automate.ax

> Call project and deployment actions or react to automation, deployment, execution, and action-attempt events.

```ts automations/list-disabled-automations.automation.ts theme={null}
import { automation, markSignificant, onSchedule } from "automate.ax"
import { automate } from "automate.ax/automate"

export default automation("List disabled automations", () => {
  onSchedule({ schedule: "0 * * * *" })
  const disabledAutomations = automate.listAutomations({ enabled: false })
  markSignificant(disabledAutomations)
})
```

## Choose the organization

No connection is required for the current Automate.ax organization. When you omit `account`, actions use the active execution's runtime token and organization identity.

To manage a different organization, create an organization API key with `automate org apikey create`, then connect it with `automate accounts`. The account represents exactly one Automate.ax organization, and its key never appears in automation code or signals. Use `automateAccount("name")` for a named binding, then pass `{ account: "name" }` as an action's second argument.

Event triggers use the deploying project's organization when you omit `account`, so they need no connection for that organization. To watch another organization, select a static organization API-key binding with `account`. The selected automation or project must belong to the resulting organization identity.

## Grant required permissions

The runtime-token path is limited to the permissions used by this integration: `project:read`, `project:update`, `deployment:create`, `deployment:read`, and `deployment:cancel`. For an explicit connected account, planning records the least permission needed by each action or trigger and deployment authorization rejects an API key that lacks it. Automation, execution, and action-attempt triggers require `project:read`; deployment triggers require `deployment:read`.

Execution and action-attempt triggers do not deliver back to the automation whose work produced the event. Their payloads expose durable logical attempt state, never worker delivery IDs or queue retry details.

## Exports

```ts theme={null}
import { automate, automateAccount, getAutomateApi } from "automate.ax/automate"
```

* `automate` contains the packaged Automate.ax actions and triggers.
* `automateAccount("name")` selects a named Automate.ax connection.
* `getAutomateApi` creates the authenticated Automate.ax API helper for a custom account-backed action.

## Triggers

* [On Automate.ax automation state changed](/reference/integrations/automate/triggers/on-automation-state-changed)
* [On Automate.ax automation enabled](/reference/integrations/automate/triggers/on-automation-enabled)
* [On Automate.ax automation disabled](/reference/integrations/automate/triggers/on-automation-disabled)
* [On Automate.ax deployment event](/reference/integrations/automate/triggers/on-deployment-event)
* [On Automate.ax deployment awaiting authorization](/reference/integrations/automate/triggers/on-deployment-awaiting-authorization)
* [On Automate.ax deployment succeeded](/reference/integrations/automate/triggers/on-deployment-succeeded)
* [On Automate.ax deployment failed](/reference/integrations/automate/triggers/on-deployment-failed)
* [On Automate.ax deployment cancelled](/reference/integrations/automate/triggers/on-deployment-cancelled)
* [On Automate.ax execution event](/reference/integrations/automate/triggers/on-execution-event)
* [On Automate.ax execution settled](/reference/integrations/automate/triggers/on-execution-settled)
* [On Automate.ax execution failed](/reference/integrations/automate/triggers/on-execution-failed)
* [On Automate.ax action attempt event](/reference/integrations/automate/triggers/on-action-attempt-event)
* [On Automate.ax action retry scheduled](/reference/integrations/automate/triggers/on-action-retry-scheduled)
* [On Automate.ax action failed](/reference/integrations/automate/triggers/on-action-failed)
* [On Automate.ax action indeterminate](/reference/integrations/automate/triggers/on-action-indeterminate)

## Actions

* [List projects](/reference/integrations/automate/actions/list-projects)
* [Get project](/reference/integrations/automate/actions/get-project)
* [List automations](/reference/integrations/automate/actions/list-automations)
* [Get automation](/reference/integrations/automate/actions/get-automation)
* [List executions](/reference/integrations/automate/actions/list-executions)
* [Get execution](/reference/integrations/automate/actions/get-execution)
* [Set automation enabled](/reference/integrations/automate/actions/set-automation-enabled)
* [List deployments](/reference/integrations/automate/actions/list-deployments)
* [Get deployment](/reference/integrations/automate/actions/get-deployment)
* [Cancel deployment](/reference/integrations/automate/actions/cancel-deployment)
* [Redeploy project](/reference/integrations/automate/actions/redeploy-project)
* [Invoke automation](/reference/integrations/automate/actions/invoke-automation)
