Stitch / docs

Triggers

Select events, filter context, and guard run admission.

An enabled trigger binds one harness, one sandbox, an agentId, and an initialPrompt. GitHub or webhook events can start runs only after filters and admission guards pass.

Schema

Triggers JSON Schema ยท Guard JSON Schema

FieldContract
key, nameUnique local key and display name
providergithub or webhook
harness, sandboxExisting local declaration keys
agentIdNon-empty kebab-case runtime agent ID
initialPromptNon-empty instruction; at most 64 KiB
enabledDefaults to true; explicitly disable during setup
guardsAt most 10; each guard type appears at most once; defaults to []

Filters

Filters inspect the incoming event, not prior runs. All configured filter conditions must pass. For GitHub, select eventType and actions, then use only the fields supported by that event. For webhooks, select events and a nested payloadFilter. Unsupported combinations fail validation. Empty filters generally add no restriction, but comment events need a comment selector or matchAllComments.

Guards

Guards inspect prior admissions or active runs. They are evaluated with run reservation. They are not content filters, and they do not change the agent prompt.

typeEffectParameters
max_occurrencesLimit admissionslimit 1โ€“100 (default 3); optional windowSeconds
cooldownRequire a gap between admissionsRequired positive seconds
max_concurrentLimit active runsRequired limit 1โ€“100
deduplicateSkip previously admitted identitiesOptional windowSeconds

All guards accept enabled (default true) and a scope. Time windows are positive integer seconds, at most 31536000. Without a window, occurrence/deduplication guards consider all matching admission history.

ScopeIdentity
repositoryRepository, within this trigger's admission history
subjectIssue or pull request
commitCommit SHA
eventEvent type, action, and event ID
deliveryDelivery ID; deduplicate only

deduplicate supports delivery/subject/commit/event, not repository. Other guard types support repository/subject/commit/event, not delivery. The event must also supply the selected identity. A missing identity skips admission; it does not silently broaden the guard scope.

guards:
  - type: max_concurrent
    scope: repository
    limit: 1
  - type: deduplicate
    scope: delivery

On this page