Skip to main content

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
Both send messages to your agent at the scheduled time or when the webhook is called, enabling autonomous workflows, periodic tasks, and event-driven responses.
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

Minimum interval: Schedules must not trigger more frequently than once per minute. Use */1 * * * * for the most frequent schedule.

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:
This flips the enabled state (true → false or false → true).

Deleting a Schedule

Permanently delete a schedule:
Deletion is permanent and cannot be undone. Consider disabling the schedule instead if you might need it again.

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:
The webhook will:
  1. Verify the secret in the X-Webhook-Secret header
  2. Extract data from the JSON payload
  3. Render the message template with {{payload.*}} variables
  4. Send the rendered message to the agent

Template Variables

Access webhook payload data using dot notation:

Example Use Cases

CI/CD Pipeline Integration
Error Monitoring
Customer Support

Listing 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:
Cannot regenerate secrets: The webhook secret cannot be changed after creation. Create a new trigger if you need a new secret.

Deleting a Trigger

Permanently delete a trigger and deactivate its webhook URL:
The webhook URL will immediately stop working.

Common Patterns

Multi-Agent Coordination

Use schedules and triggers to orchestrate multiple agents: Coordinator agent schedule:
Coordinator agent sends messages to other agents, each with their specific tasks.

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:
  1. Include the secret in the X-Webhook-Secret header
  2. Validate on your end before sending sensitive data
  3. 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 receive 429 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
Don’t:
  • 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
Don’t:
  • 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