Skip to main content
Once deployed, agents don’t need you to press “Run.” They can react to external events via webhooks or run on a recurring schedule — fully hands-free.

Webhooks: Trigger from External Events

Every deployed agent gets a unique webhook URL. Any system that can make an HTTP POST request can trigger your agent.

Getting Your Webhook URL

Your webhook URL is available in:
  • Web UI — On the agent’s detail page, click the copy icon next to the webhook URL
  • CLIdatagen agents show <agent-id>
  • Plugin — Displayed after running /datagen:deploy-agent
Webhook URL

Triggering with cURL

curl -X POST "https://api.datagen.dev/agent/YOUR_AGENT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "Process new data",
    "source": "github",
    "data": { "pr_number": 42 }
  }'
The JSON body is passed to your agent as context for the run.

Payload Format

The webhook accepts any valid JSON. Your agent receives the full payload and can reference it during execution. Simple trigger (no data):
curl -X POST "https://api.datagen.dev/agent/YOUR_AGENT_ID"
With structured data:
{
  "task": "Enrich these leads",
  "leads": [
    {"name": "Acme Corp", "domain": "acme.com"},
    {"name": "Globex", "domain": "globex.com"}
  ]
}

Integration Examples

Use your webhook URL with any system that supports HTTP webhooks:
  • n8n / Make / Zapier — HTTP action in automation workflows
  • GitHub — Trigger on push, PR, or issue events
  • HeyReach — Real-time LinkedIn campaign monitoring
  • Fireflies — Auto-generate follow-ups after meetings
  • Custom apps — Any system that can make HTTP POST requests
When triggered via webhook, results are also sent to any configured channels (Slack, email).

Schedules: Run on a Recurring Basis

Schedules let you run agents automatically — hourly, daily, weekly, or with custom cron expressions. No manual intervention needed.

Set Up via the Web UI

1

Open Schedule Settings

Click Schedule on your deployed agent.
Schedule dialog
2

Choose Schedule Type

  • Hourly — Run every hour
  • Daily — Run once per day at a specific time
  • Weekly — Run on specific days of the week
  • Custom — Define a custom cron expression
3

Set Timezone

Choose your timezone to ensure the agent runs at the expected times.
4

Add Payload (Optional)

Provide JSON payload passed to your agent on each run.
{
  "target_branch": "main",
  "dry_run": false
}
5

Save

Click Save to activate the schedule.

Set Up via the CLI

# Daily at 9 AM Eastern
datagen agents schedule <agent-id> \
  --cron "0 9 * * *" \
  --timezone "America/New_York"

# Every Monday at 2 PM UTC
datagen agents schedule <agent-id> \
  --cron "0 14 * * 1"

Schedule Types

TypeExampleCron Expression
HourlyEvery hour on the hour0 * * * *
DailyEvery day at 9 AM0 9 * * *
WeeklyEvery Monday at 2 PM0 14 * * 1
WeekdaysMonday-Friday at 8 AM0 8 * * 1-5
CustomEvery 6 hours0 */6 * * *

Managing Schedules

# List schedules
datagen agents schedule <agent-id>

# Pause a schedule
datagen agents schedule <agent-id> --pause <schedule-id>

# Resume a schedule
datagen agents schedule <agent-id> --resume <schedule-id>

# Delete a schedule
datagen agents schedule <agent-id> --delete <schedule-id>
You can also pause, resume, and delete schedules from the web UI.