> ## 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.

# On Automate.ax execution event

> Run an automation for every lifecycle transition of another Automate.ax automation execution.

`automate.onExecutionEvent` emits when an execution starts, settles, or permanently fails.

```ts automations/watch-executions.automation.ts theme={null}
import { automation } from "automate.ax"
import { automate } from "automate.ax/automate"

export default automation("Watch executions", () => {
  const event = automate.onExecutionEvent({
    account: "operations",
    automation: "auto_123",
  })
  // Route the Automate.ax run by status.
})
```

`automation` accepts an imported automation descriptor, exact ID, or unique deployed description. When `account` is omitted, the trigger uses the deploying project's organization. An explicit static Automate.ax binding requires `project:read` and can watch another organization. The payload contains `execution`, `automation`, `project`, `organization`, `eventTypes`, `transitionedAt`, and nullable `failure`. Execution status is `running`, `settled`, or `failed`.

Events are stored in the same transaction as the execution transition and are not delivered to the automation whose execution produced them.
