Agents
Scheduling

Scheduling

Agents can be scheduled to run automatically at regular intervals. This is useful for periodic data collection, reporting, monitoring, or any recurring AI workflow.

Creating a Schedule

curl -X POST https://api.almyty.com/agents/{id}/schedule \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "intervalMinutes": 60,
    "input": { "action": "daily-report" }
  }'

Parameters

ParameterTypeRequiredDescription
intervalMinutesnumberYesHow often to run (minimum: 5 minutes)
inputobjectNoStatic input to pass on each invocation

Response

{
  "success": true,
  "data": {
    "scheduleId": "sched-uuid",
    "intervalMinutes": 60,
    "nextRunAt": "2026-03-23T15:00:00Z",
    "input": { "action": "daily-report" }
  }
}

Managing Schedules

View Schedule

The schedule is included in the agent detail response:

curl https://api.almyty.com/agents/{id} \
  -H "Authorization: Bearer $TOKEN"
{
  "id": "agent-uuid",
  "name": "Daily Reporter",
  "schedule": {
    "intervalMinutes": 60,
    "nextRunAt": "2026-03-23T15:00:00Z",
    "lastRunAt": "2026-03-23T14:00:00Z",
    "input": { "action": "daily-report" }
  }
}

Remove Schedule

curl -X DELETE https://api.almyty.com/agents/{id}/schedule \
  -H "Authorization: Bearer $TOKEN"

Common Intervals

Use CaseInterval
Real-time monitoring5 minutes
Frequent checks15 minutes
Hourly reports60 minutes
Daily digest1440 minutes (24h)
Weekly summary10080 minutes (7d)

Execution History

Scheduled executions appear in the agent's execution history alongside manual invocations. Each scheduled execution is tagged with trigger: "schedule" in the metadata.

curl https://api.almyty.com/agents/{id}/executions?trigger=schedule \
  -H "Authorization: Bearer $TOKEN"

Cost Estimation

Before scheduling, check the estimated cost per run:

curl https://api.almyty.com/agents/{id}/cost-estimate \
  -H "Authorization: Bearer $TOKEN"
{
  "estimatedTokensPerRun": 450,
  "estimatedCostPerRun": "$0.0045",
  "estimatedMonthlyCost": "$3.24",
  "breakdown": [
    { "node": "llm_1", "tokens": 350, "cost": "$0.0035" },
    { "node": "llm_2", "tokens": 100, "cost": "$0.0010" }
  ]
}

Multiply by (60 * 24 * 30) / intervalMinutes to get the monthly run count.

Important Notes

  • The agent must be in active status for scheduled runs to execute
  • If an execution fails, the schedule continues — check the execution history for errors
  • Deactivating an agent pauses its schedule; reactivating resumes it
  • Deleting the schedule does not affect existing execution history