Skip to main content
Version: v2.0

Automate agent runs

Agenta automations start agent runs on a schedule or when a connected provider emits an event. They are not session-completion webhooks.

Scheduled run

Create a trigger schedule with a five-field UTC cron expression:

{
"schedule": {
"name": "Weekday support digest",
"description": "Summarize new support work every weekday.",
"data": {
"event_key": "weekday-support-digest",
"schedule": "0 8 * * 1-5",
"inputs_fields": {
"messages": [
{
"role": "user",
"content": "Prepare today's support digest."
}
],
"payload": "$.event.attributes"
}
}
}
}

start_time and end_time optionally bound the active UTC window. When the agent creates a schedule with the create_schedule platform tool, Agenta binds it to the current workflow variant. The dispatcher resolves that variant's latest revision each time the schedule fires, so later commits change future runs.

To keep execution stable, create the schedule through POST /api/triggers/schedules/ and set schedule.data.references.workflow_revision to a specific revision id or version. A workflow_revision reference remains pinned; a workflow or workflow_variant reference tracks its latest revision.

Provider event

A subscription requires a ready provider connection, an event key from the trigger catalog, and event-specific trigger_config:

{
"subscription": {
"name": "Triage new issues",
"connection_id": "019d952f-0000-0000-0000-000000000020",
"data": {
"event_key": "github_issue_created",
"trigger_config": { "owner": "acme", "repo": "product" },
"inputs_fields": {
"messages": [{ "role": "user", "content": "Triage this new issue." }],
"payload": "$.event.attributes"
}
}
}
}

Confirm the catalog event's integration and description before saving it. Event matching is provider-specific.

Input mapping

A leaf beginning with $ is a JSONPath selector over the fire context; a leaf beginning with / is a JSON Pointer. Other strings pass through literally. Unmatched selectors resolve to null; selectors are not interpolated inside larger strings.

Include an explicit imperative messages entry and map the provider payload under a sibling key. See Automations for setup and delivery monitoring.