Trigger
In a nutshell: Triggers let Agents automatically start sessions on a schedule or in response to external events β Cron is ideal for routine checks, Webhook is ideal for CI / external system integration.
When Trigger is the right tool
- Run an automated code quality check every night.
- Trigger an Agent to process results after GitHub Actions completes.
- Call an Agent over HTTP from your own system to complete lightweight tasks.
Two paths to create a Trigger
- Trigger management page β New.
- Choose Cron or Webhook.
- Cron: fill in the expression + target Claw + Agent + initial instruction. Webhook: copy the generated URL.
- Save, then check the execution history to confirm it runs correctly.
Cron Trigger fields
cron: standard cron expression (5 fields: min hour day month weekday)clawId: target ClawagentId: Agent to useinitialMessage: first instruction for the sessiontimezone: recommended to set explicitly (defaults to UTC)
Example: 0 2 * * * + Agent "Code Quality Check" + Claw "Cloud Host" + instruction "Check code quality and write a report".
Webhook Trigger and secret management
- On creation, the system generates an 8-character
webhookIdand awebhookSecret. - Public URL:
https://myclaws.weid.fun/api/webhooks/<webhookId> - An HTTP POST validates the secret, then proxies through the Claw WebSocket to start a session.
- On completion, a callback can be sent to
callback_url(containing a summary of the session output).
SDK integration paths
packages/agent-client-sdk/ provides TypeScript / Python / C# SDKs that wrap:
- Authentication
- Webhook triggering
- Completion callback listening
See agent-client-sdk/ts|python|csharp/README.md in the repository.
Execution history and manual fire
Each trigger execution is logged: trigger time, Claw, Agent, status, and the output conversation ID. View it on the Trigger detail page. Every Trigger supports a Manual Fire button (also available on mobile) for testing.
Timezone, credentials, resource limits
Cron expression timezone
Without an explicit timezone, calculations use UTC, which may differ from your local time.
The webhook secret is sensitive information
Do not put it in a public repository; rotate it regularly.
Trigger sessions do not mount MCP by default
This avoids credential ambiguity. Declare MCP explicitly in the configuration if required.
Long-running Trigger sessions also count as conversations
They consume Agent / Claw resources. Cron timing accuracy: deviation β€ 1 s.