Skip to main content
Reactive routines fire in response to events rather than a schedule. Agents use them to automate workflows that should happen when something occurs — a file is created, a webhook fires, or an internal agent event is raised.

Trigger Types

Event Triggers

Internal agent events that reactive routines can listen for: Event triggers can filter by additional criteria. For example, a routine can listen for memory.write on a specific path:

Webhook Triggers

Reactive routines can expose an HTTP endpoint that fires the routine when called:
The endpoint is available at:
Webhook trigger endpoints are not yet exposed in the web gateway UI. Create webhook routines via the routine_create tool or via direct chat until UI support is added.

Example Webhook Request

Trigger a deploy-complete routine from a CI/CD pipeline:
The request body is available to the action prompt as context.

Guardrails

Guardrails are constraints that limit what a reactive routine can do during a single run. They are especially important for reactive routines because the trigger is external — you cannot predict how frequently events will fire.
Always set rate_limit on webhook-triggered routines. Without it, a misconfigured external service flooding your endpoint will spawn unlimited jobs.

Execution Context

Reactive routine jobs receive the triggering event as part of their context. For webhook triggers, this includes the request body. For event triggers, this includes the event payload (job ID, memory path, etc.). The action prompt can reference this context directly: