Skip to content

Routine Hub

Routine Hub manages scheduled and event-driven agent tasks. Agents register routines with a cron expression or webhook trigger, and Acenta fires them on schedule or when triggered externally.

  • Cron schedules — Standard cron expressions for recurring tasks
  • Webhook triggers — HTTP endpoints that activate a routine when called
  • Execution history — Log of past executions with status and output
  • Enable/disable — Pause routines without deleting them
  • Retry policy — Configure retry behavior on failure
  • Timezone support — Schedule crons in a specific timezone
Terminal window
curl -X POST https://endpoint.acenta.ai/core/api/v1/routines \
-H "Authorization: Bearer $ACENTA_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "daily-report",
"description": "Generate daily summary report",
"trigger_type": "cron",
"cron_expression": "0 8 * * *",
"timezone": "UTC",
"target_agent": "report-agent",
"payload": {"report_type": "daily"}
}'
Terminal window
curl -X POST https://endpoint.acenta.ai/core/api/v1/routines \
-H "Authorization: Bearer $ACENTA_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "on-new-document",
"description": "Process document when webhook fires",
"trigger_type": "webhook",
"target_agent": "document-agent"
}'

The response includes a webhook_url you can use to trigger the routine from an external system.

Terminal window
# Disable a routine
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
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}'

Send any POST request to the webhook URL provided at creation:

Terminal window
curl -X POST https://endpoint.acenta.ai/core/api/v1/routines/webhook/{token} \
-H "Content-Type: application/json" \
-d '{"document_id": "doc-789"}'

The payload is forwarded to the target agent.

Terminal window
# List executions for a routine
curl https://endpoint.acenta.ai/core/api/v1/routines/{id}/executions \
-H "Authorization: Bearer $ACENTA_KEY"

Response example:

{
"data": [
{
"id": "exec-1",
"routine_id": "rtn-123",
"status": "success",
"started_at": "2026-04-30T08:00:00Z",
"completed_at": "2026-04-30T08:00:04Z",
"output": "Report generated: report-2026-04-30.pdf"
}
]
}
Terminal window
curl https://endpoint.acenta.ai/core/api/v1/routines \
-H "Authorization: Bearer $ACENTA_KEY"
MethodPathDescription
GET/routinesList routines
POST/routinesCreate routine
GET/routines/{id}Get routine
PATCH/routines/{id}Update routine
DELETE/routines/{id}Delete routine
GET/routines/{id}/executionsList executions
POST/routines/{id}/triggerManually trigger routine
POST/routines/webhook/{token}Webhook trigger endpoint
GET/routines/executions/{id}Get execution detail
DELETE/routines/executions/{id}Delete execution record

Routine Hub exposes 6 MCP tools: create_routine, list_routines, get_routine, update_routine, delete_routine, trigger_routine.