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
Create a Schedule Trigger
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:Human-Readable Schedules
The system automatically converts cron expressions to readable formats:Managing Triggers
List Agent Triggers
Get Trigger Details
Update a Trigger
Pause/Resume a Trigger
Toggle theis_active flag:
Delete a Trigger
Trigger Execution History
View past executions and their results:Execution Statuses
pending: Execution queuedrunning: Agent is currently runningcompleted: Execution finished successfullyfailed: Execution encountered an errorcancelled: Execution was cancelled
Webhook Triggers
Receive webhook events to trigger agent execution:Webhook URL Format
Configure Webhook Secret
Set theTRIGGER_WEBHOOK_SECRET environment variable:
Send Webhook Event
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 fireBest Practices
Use specific prompts
Use specific prompts
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”
Test before scheduling
Test before scheduling
Run your agent manually with the planned prompt before creating a scheduled trigger. This ensures the output is what you expect.
Monitor executions
Monitor executions
Regularly check execution history to ensure triggers are running successfully. Failed executions may need prompt or configuration adjustments.
Use appropriate timezones
Use appropriate timezones
Always specify the timezone in schedule configs to avoid confusion. “9 AM EST” is clearer than “2 PM UTC”.
Secure webhook secrets
Secure webhook secrets
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_activeistrue - 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-Secretheader 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_messagein 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