Documentation
Learn how to use Compozy
Workflows in Compozy are defined using YAML configuration files. Each workflow consists of tasks and configuration that work together to automate your processes.
workflow: tasks: - id: send_notification type: basic use: compozy/tools:notification@1.0.0 with: message: "{{ tasks.process_data.output }}" on_success: next: cleanup
workflow: tasks: - id: fetch_data type: basic use: compozy/tools:api-fetch@1.0.0 schema: input: type: object properties: url: string with: url: "{{ env.API_URL }}" on_success: next: process_data - id: process_data type: basic use: compozy/tools:data-transform@1.0.0 with: data: "{{ tasks.fetch_data.output }}" on_success: next: save_results retry: attempts: 3 backoff: exponential interval: 1s
workflow: tasks: - id: check_data type: decision condition: "{{ tasks.validate_input.output.is_valid }}" routes: "true": process_valid "false": handle_invalid on_condition_match: next: log_decision - id: process_valid type: basic use: compozy/tools:data-processor@1.0.0 on_error: next: handle_error - id: handle_invalid type: basic use: compozy/tools:error-handler@1.0.0
workflow: tasks: - id: process_batch type: parallel config: max_concurrent: 3 fail_fast: false execute: - use: compozy/tools:processor-1@1.0.0 retry: attempts: 3 - use: compozy/tools:processor-2@1.0.0 retry: attempts: 2 on_error: next: handle_batch_error
# tasks/shared.yaml tasks: - id: document_processor type: basic use: compozy/tools:doc-processor@1.0.0 schema: input: type: object properties: format: type: string enum: [pdf, docx] with: format: pdf # workflow.yaml workflow: tasks: - id: process_document import: ./tasks/shared.yaml with: document: "{{ trigger.document }}" on_success: next: notify_complete
workflow: memory: chat_memory # Reference to memory defined in base config tasks: - id: chat_task type: basic use: compozy/tools:chat-processor@1.0.0 with: context: "{{ memory.chat_memory.current_thread }}" history: "{{ memory.chat_memory.last_messages }}" relevant: "{{ memory.chat_memory.semantic_search }}"
Task Design
Error Handling
Performance
Maintainability