Skip to main content

JSON Schema

https://compozy.dev/schemas/tasks.json

Task Configuration

Properties

string
required
Unique identifier for the task within the workflow
string
Human-readable name for the task
string
required
Task type identifier. One of: basic, parallel, decision, collection, wait, map, composite. See Task Types for detailed information about each type.
string | object
Task implementation reference. Can be specified in three formats:
  • "repo/package" (e.g., "compozy/tasks:web-search")
  • "repo:package@version" (e.g., "compozy/tasks:web-search@1.0.0")
  • Object with repo and package fields
string
Path to external task definition file. Can be a local file path or a package reference.
object
Schema definition for task input validation
object
Task type-specific configuration
object
Retry configuration for failed tasks

Event Handlers

object
Handler called when task starts
object
Handler called when task succeeds
object
Handler called when task fails
object
Handler called after task completes (success or error)

Type-specific Event Handlers

object
Collection task specific handlers
object
Parallel task specific handlers
object
Decision task specific handlers
object
Wait task specific handlers
object
Map task specific handlers
object
Composite task specific handlers

State Information

string
Current task status: running, success, or error
number
Task execution duration in milliseconds
string
ISO timestamp of when task started
string
ISO timestamp of when task completed
number
Number of retry attempts made
object
Error information if task failed
any
Task output data

Expression Context

string
Current task ID
string
Task type
string
Task status
any
Task input data
any
Task output data
any
Error information
object
Access to other task data
function
Returns current timestamp
object
Environment variables

Type-specific Context

any
Current item in collection task
number
Current index in collection task
number
Current batch index in collection task
string
Current operation ID in parallel task