Skip to main content

What are Tasks?

Tasks in Compozy are powerful, configurable units that combine both execution and flow control capabilities. Each task can represent a specific operation (like calling an API or processing data) or control the flow of your automation (like parallel processing or decision making).
tasks:
  - id: fetch_data
    type: basic
    use: tool(http-request)
    with:
      url: "{{ env.API_URL }}"
      method: GET

Task Types

Basic

Simple, single-operation tasks for API calls, transformations, and processing steps.

Parallel

Execute multiple operations simultaneously with configurable concurrency limits.

Decision

Route execution based on conditions with support for complex business logic.

Collection

Process arrays of items sequentially or in parallel with advanced execution patterns.

Wait

Pause execution until specific conditions are met or timeout occurs.

Map

Transform data between tasks with type-safe field mapping.

Composite

Group multiple operations into reusable units.

Key Features

Flexible Integration

Connect with tools, MCP servers, and custom implementations seamlessly

Flow Control

Built-in support for parallel execution, loops, and conditional branching

Schema Validation

Define input schemas for reliable data validation

Environment Control

Task-specific environment variables and configuration

Error Handling

Built-in error management and recovery mechanisms

Component Outputs

Access outputs from executed tools, agents, and MCPs

Next Steps