Use a trigger to wire an external event source to an Expert. When the event fires, Cosmos starts a session on that Expert and feeds it the event payload as the activation message. Add and edit triggers from the Triggers section of the Expert editor.Documentation Index
Fetch the complete documentation index at: https://docs.augmentcode.com/llms.txt
Use this file to discover all available pages before exploring further.
Supported Trigger Types
| Type | When to use |
|---|---|
| Webhook | Any service that can POST JSON to an HTTPS URL. Authenticated with a one-time bearer secret. |
| GitHub | GitHub repository events (PRs, issues, pushes, comments, reviews). |
| Linear | Linear issue/comment events. |
| Slack | Slack mentions/messages/events. |
| PagerDuty | PagerDuty incident events. |
| Scheduled | Cron schedule (see Schedules). |
Adding a Trigger to an Expert
- Open Experts in the sidebar and click the Expert you want to wire up (or click + Create Expert).
- Scroll to the Triggers section and click + Add Trigger.
- Fill in:
- Name — a human-readable label (e.g.
on-pr-opened). - Type — pick from the list above.
- Event type — for GitHub / Linear / Slack triggers, the provider event name (e.g.
pull_request,Issue,app_mention). - Filter — an optional JSONLogic expression evaluated against the raw event payload. The trigger fires only when this expression returns true.
- Auto-archive sessions created by this trigger — toggle off when you want to keep trigger-launched sessions visible after they go idle (useful for revisitable agent-driven sessions like a PR-author).
- Name — a human-readable label (e.g.
- Click Save.
The trigger type is fixed once a trigger is created. To change it, delete the trigger and add a new one.
Custom Webhooks
A Webhook trigger references a custom webhook URL you mint separately. Each custom webhook is shared across an organization and can be reused by any number of triggers. To mint a custom webhook:- Go to Configuration → Webhooks in the sidebar.
- Click + Create webhook and pick a webhook flavor:
- Bearer — generic JSON POSTs from arbitrary services (Datadog, CircleCI, custom scripts).
- GitLab — payloads from a GitLab project.
- Jira — payloads from a Jira automation rule.
- Give it a description, then click Create.
- The dialog reveals the trigger URL and the bearer secret once — copy both before closing the dialog. The secret cannot be retrieved later.
Payload Filters
The Filter field on a trigger is a JSONLogic expression evaluated against the parsed JSON payload. Common examples:Common Trigger Examples
PagerDuty — P1 Incident Triggered
PagerDuty triggers route by integration key rather than event type. Create a PagerDuty Events API v2 integration on the relevant service, copy its routing key, and paste it into the PagerDuty routing key field on the trigger. Use the Filter field to match specific incident actions:Datadog — Error Alert (Custom Webhook)
- Mint a Bearer webhook from Configuration → Webhooks and copy the URL + bearer secret.
-
In Datadog → Integrations → Webhooks, configure a custom webhook with the trigger URL and add
Authorization: Bearer <bearer-secret>under Custom Headers. -
In your Expert, add a Webhook trigger, pick the new custom webhook from the dropdown, and set Filter to match the alerts you care about:
CircleCI — Workflow Failed (Custom Webhook)
- Mint a Bearer webhook the same way.
-
In CircleCI → Project Settings → Webhooks, configure a webhook with the trigger URL and add
Authorization: Bearer <bearer-secret>under headers. -
In your Expert, add a Webhook trigger pointing at the new custom webhook with Filter: