Routines
This guide covers how to use Routine Hub to schedule and trigger recurring agent tasks.
Cron Scheduling
Section titled “Cron Scheduling”Use standard cron expressions to schedule recurring tasks. Times are in UTC by default.
# Run every day at 8am UTCcurl -X POST https://endpoint.acenta.ai/core/api/v1/routines \ -H "Authorization: Bearer $ACENTA_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "daily-digest", "trigger_type": "cron", "cron_expression": "0 8 * * *", "timezone": "UTC", "target_agent": "digest-agent", "payload": {"report_type": "daily"} }'Common cron patterns:
| Expression | Meaning |
|---|---|
0 8 * * * | Daily at 8am |
0 * * * * | Every hour |
*/15 * * * * | Every 15 minutes |
0 9 * * 1 | Every Monday at 9am |
0 0 1 * * | First of every month at midnight |
Webhook Triggers
Section titled “Webhook Triggers”Create a webhook routine to let external systems trigger agent work:
curl -X POST https://endpoint.acenta.ai/core/api/v1/routines \ -H "Authorization: Bearer $ACENTA_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "process-new-document", "trigger_type": "webhook", "target_agent": "document-agent" }'The response contains a webhook_url. Any POST to that URL triggers the routine. The request body is forwarded as the payload to the target agent.
Pausing Routines
Section titled “Pausing Routines”Disable a routine temporarily without deleting it:
curl -X PATCH https://endpoint.acenta.ai/core/api/v1/routines/{id} \ -H "Authorization: Bearer $ACENTA_KEY" \ -H "Content-Type: application/json" \ -d '{"enabled": false}'Re-enable when ready:
curl -X PATCH https://endpoint.acenta.ai/core/api/v1/routines/{id} \ -H "Authorization: Bearer $ACENTA_KEY" \ -H "Content-Type: application/json" \ -d '{"enabled": true}'Monitoring Executions
Section titled “Monitoring Executions”Check execution history to verify routines are running correctly:
curl https://endpoint.acenta.ai/core/api/v1/routines/{id}/executions \ -H "Authorization: Bearer $ACENTA_KEY"Failed executions include error details for debugging.
Manual Trigger
Section titled “Manual Trigger”Trigger a routine manually for testing or one-off runs:
curl -X POST https://endpoint.acenta.ai/core/api/v1/routines/{id}/trigger \ -H "Authorization: Bearer $ACENTA_KEY"Next Steps
Section titled “Next Steps”- Routine Hub Concepts — Core concepts
- Routines API — Complete API reference