Overview
Shinzo agents support two powerful automation patterns:- Schedules: Time-based automation using cron expressions (e.g., “every Monday at 9am”)
- Triggers: Event-driven automation via webhook endpoints
Use cases: Weekly reports, daily monitoring checks, CI/CD pipeline integration, external system notifications, and multi-agent coordination.
Schedules
Schedules use cron expressions to send messages to your agent at recurring times. Perfect for reports, monitoring, backups, and any time-based workflow.Creating a Schedule
Create a cron schedule that sends a message to your agent at the specified times:Request Parameters
Response
Cron Expression Examples
Listing Schedules
Retrieve all schedules for an agent:Query Parameters
Response
Getting a Schedule
Retrieve details for a specific schedule:Response
Returns the full schedule object including execution history metadata.Updating a Schedule
Modify an existing schedule:Request Parameters
All parameters are optional. Only provided fields will be updated:Toggling a Schedule
Quickly enable or disable a schedule:enabled state (true → false or false → true).
Deleting a Schedule
Permanently delete a schedule:Viewing Execution History
See when a schedule has run and whether executions succeeded:Query Parameters
Response
Triggers
Triggers provide webhook endpoints that send messages to your agent when called. Perfect for CI/CD pipelines, external system notifications, and event-driven workflows.Creating a Trigger
Create a webhook trigger and receive a unique URL and secret:Request Parameters
Response
Store the secret securely! It’s only returned once at creation. Use it to verify webhook authenticity.
Using a Trigger
Send a POST request to the webhook URL with JSON data:- Verify the secret in the
X-Webhook-Secretheader - Extract data from the JSON payload
- Render the message template with
{{payload.*}}variables - Send the rendered message to the agent
Template Variables
Access webhook payload data using dot notation:Example Use Cases
CI/CD Pipeline IntegrationListing Triggers
Retrieve all triggers for an agent:Query Parameters
Response
Secret masking: The
secret field is masked in list responses for security. It’s only shown in full at creation.Updating a Trigger
Modify an existing trigger:Request Parameters
All parameters are optional. Only provided fields will be updated:Deleting a Trigger
Permanently delete a trigger and deactivate its webhook URL:Common Patterns
Multi-Agent Coordination
Use schedules and triggers to orchestrate multiple agents: Coordinator agent schedule:Backup and Archival
Schedule regular backups:External System Integration
Connect external systems via webhooks:Self-Healing Workflows
Agent creates its own schedules when detecting issues:Limits and Quotas
Security
Webhook Authentication
Always verify webhook authenticity:- Include the secret in the
X-Webhook-Secretheader - Validate on your end before sending sensitive data
- Regenerate if compromised by creating a new trigger
Template Injection Prevention
Message templates are sanitized to prevent code injection. Only template variable substitution is supported ({{payload.*}}).
Rate Limiting
Webhook endpoints are rate-limited to 100 requests per minute per trigger. Excess requests receive429 Too Many Requests.
Best Practices
Schedule Design
✅ Do:- Use descriptive names: “Weekly Sales Report” not “Schedule 1”
- Set appropriate timezones for your use case
- Test cron expressions before deploying
- Disable schedules you’re not actively using
- Create schedules more frequent than necessary (wastes tokens)
- Use schedules for real-time event responses (use triggers instead)
- Forget to account for daylight saving time in your timezone
Trigger Design
✅ Do:- Design clear, actionable message templates
- Include relevant context from the payload
- Handle missing payload fields gracefully in your agent logic
- Log webhook calls for debugging
- Expose webhook URLs publicly without authentication
- Send sensitive data in plain text
- Create redundant triggers for the same event source
Monitoring
- Check execution history regularly to catch failures
- Monitor trigger counts to identify anomalies
- Review and clean up unused schedules/triggers quarterly
Next Steps
- Agent Configuration - Configure agent behavior and settings
- Agent Messaging - Send messages and manage conversations
- API Reference - Full API documentation for schedules and triggers

