---
title: Triggers
description: Add, list, remove, and test flow triggers from the command line, and browse built-in trigger presets.
---

Triggers define when and how a flow starts: on a schedule, in response to a webhook, when a file appears, or on a platform event. The `triggers` and `trigger preset` commands manage triggers in your workspace config and interact with the running sidecar.

## Listing trigger kinds

To see all supported trigger kinds and their required parameters:

```bash
akos triggers kinds
```

## Listing triggers in a config

```bash
akos triggers list
```

By default this reads `akos.config.yaml` in the current directory. Pass a different path with `--config <path>`.

## Adding a trigger

```bash
akos triggers add \
  --flow <flow-id> \
  --kind <kind> \
  [kind-specific options]
```

For example, to add a cron trigger that fires every day at 09:00:

```bash
akos triggers add \
  --flow daily-report \
  --kind cron \
  --cron "0 9 * * *"
```

To add an inbound webhook trigger:

```bash
akos triggers add \
  --flow inbound-webhook \
  --kind webhook
```

Check `akos triggers add --help` for the full list of kind-specific flags.

## Removing a trigger

```bash
akos triggers remove <trigger-id>
```

Pass `--config <path>` to target a specific config file.

## Testing a trigger

Sends a synthetic event through the sidecar to verify a trigger is wired correctly:

```bash
akos triggers test <trigger-id>
```

## Viewing trigger run history

List recent executions for a trigger:

```bash
akos triggers runs <trigger-id>
```

## Getting the inbound URL for a webhook trigger

```bash
akos triggers url <trigger-id>
```

Prints the inbound URL that external systems should POST to.

## Enabling or disabling a trigger

```bash
# Disable a trigger
akos triggers toggle <trigger-id> --disable

# Re-enable it
akos triggers toggle <trigger-id> --enable
```

## Listing trigger contracts

To list every registered trigger contract (the trigger kinds the sidecar knows how to dispatch) via the running sidecar:

```bash
akos triggers contracts
```

Add `--json` for structured output. This requires the sidecar (`akos serve`).

---

## Trigger presets

AKOS ships curated trigger presets — ready-to-copy configurations for common scenarios. Presets are read-only reference material; use them as a starting point when adding triggers.

### List presets

```bash
akos trigger preset list
```

Output as JSON:

```bash
akos trigger preset list --json
```

### Show a preset

```bash
akos trigger preset show webhook/inbound-generic
```

The command prints the preset's title, description, and the full trigger configuration block you can copy into your config.

Output as JSON:

```bash
akos trigger preset show webhook/inbound-generic --json
```

---

## Making your workspace reachable for webhooks

By default the sidecar binds its webhook listener to `127.0.0.1` (loopback only). To receive webhooks from external systems, start the sidecar with `--public`:

```bash
akos serve --public
```

Pin the webhook port:

```bash
akos serve --public --webhook-port 4242
```

When `--public` is used, the CLI prints a security warning. Run behind a firewall or trusted tunnel and ensure every webhook trigger verifies its signature.

## Related topics

- **[Automations in the app](/docs/using-the-app/triggers)** — trigger list, webhook server banner, inline editor.
- **[Public automation API](/docs/using-the-app/public-automation-api)** — scoped API keys for external dispatch.
- **[Workflows in the app](/docs/using-the-app/flows)** — bind triggers to flow graphs.
- **[Flows and Runs](/docs/cli/flows-and-runs)** — execute and inspect runs started by triggers.
