Skip to main content
Triggers allow you to automate agent execution based on schedules or external events. Instead of manually starting conversations, your agents can run automatically at specified times or when specific events occur.

Trigger Types

Kortix supports two primary trigger types:

Schedule Triggers

Run agents on a recurring schedule using cron expressions:
  • Daily reports at 9 AM
  • Weekly summaries every Monday
  • Hourly data syncs
  • Custom intervals

Webhook Triggers

Execute agents when external events occur:
  • New customer signup
  • Payment received
  • Form submission
  • API events from third-party services

Event Triggers

Integrate with external platforms (via Composio):
  • Gmail: New email received
  • Slack: Message in channel
  • GitHub: Pull request opened
  • Google Calendar: Event starting soon

Creating a Schedule Trigger

1

Get available providers

List trigger providers to see available options
2

Configure the trigger

Set up cron expression, timezone, and agent prompt
3

Create the trigger

Send the configuration to create an active trigger

List Available Providers

Response:

Create a Schedule Trigger

Response:

Cron Expression Examples

All cron expressions are interpreted in the timezone specified in the trigger config. If no timezone is specified, UTC is used.

Viewing Upcoming Runs

Check when your scheduled triggers will run next:
Response:

Human-Readable Schedules

The system automatically converts cron expressions to readable formats:

Managing Triggers

List Agent Triggers

Get Trigger Details

Update a Trigger

Updating the config will teardown and re-setup the trigger. This ensures the new schedule takes effect immediately.

Pause/Resume a Trigger

Toggle the is_active flag:

Delete a Trigger

Trigger Execution History

View past executions and their results:
Response:

Execution Statuses

  • pending: Execution queued
  • running: Agent is currently running
  • completed: Execution finished successfully
  • failed: Execution encountered an error
  • cancelled: Execution was cancelled

Webhook Triggers

Receive webhook events to trigger agent execution:

Webhook URL Format

Configure Webhook Secret

Set the TRIGGER_WEBHOOK_SECRET environment variable:

Send Webhook Event

Response:

Webhook Authentication

Webhooks use HMAC-based authentication:

Trigger Limits by Tier

Different subscription tiers have different trigger limits:

Trigger Service Architecture

The trigger system consists of several services:

Trigger Service

Manages trigger lifecycle:

Provider Service

Handles provider-specific logic (schedules, webhooks, etc.)

Execution Service

Runs agents when triggers fire

Best Practices

Provide clear, specific agent prompts in your trigger config:
  • Good: “Generate a sales report for yesterday and email it to team@company.com
  • Bad: “Do the daily thing”
Run your agent manually with the planned prompt before creating a scheduled trigger. This ensures the output is what you expect.
Regularly check execution history to ensure triggers are running successfully. Failed executions may need prompt or configuration adjustments.
Always specify the timezone in schedule configs to avoid confusion. “9 AM EST” is clearer than “2 PM UTC”.
Use strong, random secrets for webhook authentication. Rotate secrets periodically for security.

Version Control Integration

Triggers are synced to agent version configs:

Troubleshooting

Trigger Not Firing

  • Check active status: Ensure is_active is true
  • Verify cron expression: Test the expression with a cron validator
  • Check timezone: Ensure the timezone is correct for your location
  • Review logs: Look for setup or execution errors

Webhook Not Receiving Events

  • Verify secret: Ensure the X-Trigger-Secret header matches your configured secret
  • Check URL: Confirm the webhook URL is correct
  • Test manually: Use curl to send a test event
  • Review webhook logs: Check for authentication or processing errors

Execution Failures

  • Review error message: Check the error_message in execution history
  • Test agent prompt: Run the agent manually with the same prompt
  • Check agent configuration: Ensure the agent has necessary tools and permissions
  • Verify resource limits: Ensure you haven’t exceeded API rate limits

API Reference

Endpoints