Create workflow
create_workflowCreate a new empty workflow with manual, cron, or webhook trigger options. Get the workflow ID and webhook URL to enable automated runs.
Instructions
Create an empty workflow. Returns the new workflow, including its id and — for a webhook trigger — its hook URL. trigger_kind defaults to "manual" (run it on demand with run_workflow); "cron" needs a cron_expr; "webhook" mints a public hook URL. trigger_kind is not read from description: a schedule stated only there leaves the workflow manual. The build can still change it — when the owning agent gives the workflow a schedule or webhook trigger step, trigger_kind and cron_expr follow that step. A new workflow has no steps and cannot run until its owning agent builds them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A short name for the workflow. | |
| agent_id | No | Optional UUID of one of your agents to own the workflow. That agent is then the one that can build, edit, and run it from a chat; leave it out and the workflow stays unassigned until you set an owner. | |
| cron_expr | No | Cron schedule (required when trigger_kind is "cron"), e.g. "0 9 * * *". A 5-field cron or an @daily/@hourly descriptor, evaluated in UTC. | |
| description | No | Optional description of what the workflow does. It is prose for the reader; no field is derived from it. | |
| trigger_kind | No | Optional trigger: "manual" (default), "cron", or "webhook". The build can change it later: a schedule or webhook trigger step sets it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| engine | Yes | ||
| status | Yes | ||
| user_id | Yes | ||
| agent_id | Yes | ||
| hook_key | Yes | ||
| cron_expr | Yes | ||
| created_at | Yes | ||
| updated_at | Yes | ||
| description | Yes | ||
| notify_pref | Yes | ||
| next_fire_at | Yes | ||
| trigger_kind | Yes | ||
| paused_reason | No | ||
| template_slug | No | ||
| active_version | Yes | ||
| current_version | Yes | ||
| spend_cap_month | Yes | ||
| agent_deleted_at | No |