Unlike tools and agents which require implementation in TypeScript or Python, tasks are purely configuration-based using YAML files.

Repository Structure

my-task/
├── manifest.yaml      # Task metadata and schema definitions
├── README.md         # Documentation
└── tasks/
    └── main.yaml     # Main task definition

Manifest File

The manifest.yaml defines your task’s metadata, configuration, and dependencies:

type: task
name: content-processor
version: 1.0.0
license: MIT
description: Process and optimize content for various platforms
repository: https://github.com/your-org/content-processor
main: tasks/main.yaml

tags:
  - content
  - optimization
  - publishing

author:
  name: Your Name
  email: your.email@example.com
  organization: Your Organization

dependencies:
  tools:
    - image-optimizer@^1.0.0
    - text-analyzer@^2.0.0

Task Configuration

The tasks/main.yaml file defines your task’s execution flow and input schema. Note that outputs are handled by the executed components (tools, agents, or MCPs):

tasks:
  - id: process_content
    type: basic
    use: tool(text-analyzer)
    schema:
      input:
        type: object
        properties:
          content:
            type: string
            description: "Content to process"
          format:
            type: string
            enum: ["markdown", "html", "text"]
            default: "markdown"
        required: [content]
    with:
      text: "{{ input.content }}"
      format: "{{ input.format }}"

  - id: optimize_content
    type: parallel
    use: tool(image-optimizer)
    config:
      max_concurrent: 3
    with:
      content: {{ tasks.process_content.output }}  # Output from the text-analyzer tool
      format: webp

Publishing Process

1

Prepare Your Repository

  • Initialize a GitHub repository
  • Set up CI/CD workflows for testing
  • Include comprehensive documentation in README.md
2

Validate

Ensure your task configuration is valid:

compozy task validate
3

Version and Release

  • Use semantic versioning (MAJOR.MINOR.PATCH)
  • Create GitHub releases with detailed changelogs
  • Tag releases (e.g., v1.0.0)
4

Submit to Registry

Once your task is ready for distribution:

# Login to Compozy CLI
compozy login

# Submit your task
compozy publish

After submission, our team will review your task to ensure it meets our quality and security standards. You’ll receive notifications about the review process and when your task is approved and listed in the registry.

Make sure your task follows these best practices:

  • Use semantic versioning for your task versions
  • Include comprehensive documentation in README.md
  • Define clear input/output schemas
  • Use environment variables for sensitive configuration
  • Follow the single responsibility principle