Core Concepts
Schedules & Webhooks

Schedules & Webhooks

Papayya supports two ways to trigger runs automatically: cron schedules and webhooks.

Schedules

Schedules run an agent on a recurring cron schedule. Each scheduled execution creates a new run with the configured input and constraints.

Creating a schedule

papayya schedule create \
  --agent-id ag_abc123 \
  --cron "0 9 * * 1-5" \
  --timezone "America/New_York" \
  --input "Generate the daily report" \
  --max-steps 20 \
  --budget-cents 200

This runs the agent every weekday at 9am Eastern, with a 20-step limit and $2.00 budget per run.

Schedule fields

FieldDescription
cron_expression5-field cron (minute, hour, day-of-month, month, day-of-week)
timezoneIANA timezone (e.g. America/New_York). Default: UTC.
inputInput text passed to each run
max_stepsStep limit per run
budget_centsBudget per run in cents
enabledToggle the schedule on/off without deleting it

Managing schedules

papayya schedule list --agent-id ag_abc123
papayya schedule disable <schedule-id>
papayya schedule enable <schedule-id>
papayya schedule update <schedule-id> --cron "0 */6 * * *"
papayya schedule delete <schedule-id>

Webhooks

Webhooks let external systems trigger agent runs via HTTP. Create a webhook for an agent, and you get a URL that accepts POST requests.

Creating a webhook

papayya webhook create --agent-id ag_abc123 --name "GitHub Push"

This returns a webhook ID and a trigger URL:

POST /v1/webhooks/{webhookId}/trigger
Authorization: Bearer <webhook-token>

Use cases

  • Trigger an agent when a GitHub push event fires
  • Run an agent when a Stripe payment succeeds
  • Start a workflow from a Slack slash command
  • Process incoming emails or form submissions

Managing webhooks

papayya webhook list --agent-id ag_abc123
papayya webhook delete <webhook-id>