Skills & Workflow

Trigger

A trigger is the external event that starts a new agent run — a schedule firing, a webhook arriving, a file changing, or a person issuing a manual command.

EventTriggerAgent run starts
An external event triggers a new agent run.

Something has to cause an agent run to begin. A trigger is that cause: an event, external to the agent itself, that the system watches for and, when it happens, kicks off a new run. Triggers are what turn an agent from something you have to manually start every time into something that responds on its own to things happening around it.

Common trigger types include time-based ones (a cron schedule firing — see scheduled-agent), event-based ones (a webhook arriving, like a new pull request being opened, or a file changing on disk), and manual ones (a person explicitly running a slash-command or command-line invocation). What they share is that the trigger is the starting point of a run, not something that happens partway through one.

Triggers are usually configured declaratively — “on this event, start this agent with this input” — rather than the agent itself deciding to start running.

How it works

A trigger's watcher sits outside the agent, listening for its configured event. When the event occurs, it constructs the input for a new run (which might include details from the event itself, like which file changed or what the webhook payload contained) and starts the agent, which then proceeds independently of the trigger.

Example

A code-review agent might be configured to trigger whenever a pull request is opened against a repository: the PR-opened event is the trigger, and it starts a fresh agent run with that PR's diff as input.

How it differs

Trigger vs. hook: a trigger starts an entirely new agent run from an event outside the agent; a hook runs inside a run that's already active, intercepting one specific action within it rather than starting anything new.

Common misconceptions

Often assumed: A trigger is always time-based, like a schedule.
Actually: Time-based triggers (see scheduled-agent) are one common type, but triggers can equally be event-based — a webhook, a file change, a new message — with no schedule involved at all.

FAQ

What is a trigger for an AI agent?
The external event — a schedule, a webhook, a file change, or a manual command — that starts a new agent run.
What's the difference between a trigger and a hook?
A trigger starts a brand-new agent run from an outside event; a hook runs inside a run that's already happening, around one specific action.

Last checked: 2026-08-28

Related terms