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

# Core concepts

> Understand the pieces of an Automate.ax automation and how they fit together.

Automate.ax automations are TypeScript programs. You write ordinary functions,
imports, objects, and modules; Automate.ax supplies durable triggers, integration
authentication, deployment, and execution.

```ts theme={null}
import { automation } from "automate.ax"
import { markAsRead, onNewEmail } from "automate.ax/gmail"

export default automation("Mark incoming mail as read", () => {
  const email = onNewEmail()

  markAsRead({ messageIds: email.messageId })
})
```

This small program contains the main concepts:

| Concept                                               | Role                                                                                                     |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [Automation](/concepts/automations)                   | A named TypeScript program deployed as part of a project.                                                |
| [Trigger](/concepts/triggers)                         | Declares the event that can start the automation and exposes its data as a signal.                       |
| [Signal](/concepts/signals)                           | A typed reference to a value that will exist during execution.                                           |
| [Action](/concepts/actions)                           | Performs work after its signal dependencies are ready.                                                   |
| [Integration account](/concepts/integration-accounts) | Gives an action or trigger access to an external service without exposing credentials to code.           |
| [Deployment](/concepts/deployments-and-runs)          | Plans the programs, resolves authorization, configures event sources, and publishes the project runtime. |

The call to `onNewEmail` declares a Gmail subscription. Its `email` result is a
signal, so `email.messageId` is also a signal. Passing it to `markAsRead` makes
that action depend on the incoming event.

<Note>
  Source order describes the automation, but signal dependencies decide when
  actions are ready. Independent actions may execute concurrently.
</Note>

## Where to go next

Read [Automations](/concepts/automations) and [Signals](/concepts/signals) first.
Use the [Actions reference](/reference/actions) and [Triggers
reference](/reference/triggers) for exact integration contracts.
