> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compozy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Build your first AI workflow with Compozy in 5 minutes

Transform your ideas into powerful AI workflows in minutes! In this guide, we'll build a workflow that combines web content fetching with AI analysis - perfect for content curation, research, or monitoring applications.

## Prerequisites

Install the Compozy CLI using one of these methods:

<CodeGroup>
  ```bash javascript theme={"dark"}
  # Using npm
  npm install -g @compozy/cli

  # Using pnpm
  pnpm add -g @compozy/cli

  # Using bun
  bun install -g @compozy/cli
  ```

  ```bash brew theme={"dark"}
  # macOS
  brew install compozy
  ```

  ```bash pacman theme={"dark"}
  # Arch Linux
  sudo pacman -S compozy-cli
  ```

  ```bash cargo theme={"dark"}
  # Cross-platform (Linux/macOS/Windows)
  cargo install compozy-cli
  ```
</CodeGroup>

## Your First Workflow

You'll learn how to use [webhooks](/core/base-structure/triggers) to create HTTP endpoints, integrate with [tools](/core/tools/overview) for web scraping, and leverage [AI agents](/core/agents/overview) for intelligent text analysis. This workflow showcases the building blocks you need to create sophisticated AI-powered applications.

Want to take it further? Explore our [workflow examples](/core/workflows/examples) to learn how to:

* Process content at scale with parallel execution
* Extract structured data with custom AI agents
* Connect to your favorite tools and databases
* Build complex automation pipelines

Let's get started! 🚀

<Steps titleSize="h3">
  <Step title="Initialize a new project">
    ```bash theme={"dark"}
    compozy init content-workflow
    cd content-workflow
    ```
  </Step>

  <Step title="Add your dependencies">
    ```bash theme={"dark"}
    # Add the text analysis agent
    compozy add compozy/agents:text-analyzer

    # Add the content fetcher tool
    compozy add compozy/tools:web-content
    ```
  </Step>

  <Step title="Set up basic workflow information">
    Create a new file `workflows/analyze.yaml` and start adding the basic workflow information:

    ```yaml theme={"dark"}
    name: content-analyzer
    version: 1.0.0
    description: "AI-powered content analysis workflow"
    ```
  </Step>

  <Step title="Configure the webhook trigger">
    Define how your workflow will be invoked:

    ```yaml theme={"dark"}
    trigger:
      type: webhook
      config:
        url: /analyze-content
        method: POST
      schema:
        url:
          required: true
          type: string
          description: "URL of the content to analyze"
    ```

    There are many different triggers available, you can learn more about them [here](/core/base-structure/triggers).
  </Step>

  <Step title="Add your workflows tasks">
    Now is when you define the flow of your workflow and which tasks, tools and agents will be used.

    ```yaml theme={"dark"}
    workflow:
      tasks:
        # Fetch the content from the URL
        - id: fetch_content
          type: basic
          use: tool(web-content)
          with:
            url: "{{ trigger.url }}"
          on_success:
            next: analyze_text

        # Analyze the fetched content
        - id: analyze_text
          type: basic
          use: agent(text-analyzer)
          with:
            content: "{{ tasks.fetch_content.output.text }}"
    ```

    <Note>
      We break this is parts, but the final result is an one single YAML file.
      You can check the final workflow file [here](/getting-started/quickstart/final-workflow.yaml).
    </Note>
  </Step>

  <Step title="Test your workflow">
    1. Start the development server:

    ```bash theme={"dark"}
    compozy dev serve
    ```

    This will start your service and create an endpoint at `http://localhost:3000/analyze-content`

    2. Test the workflow using the CLI:

    ```bash theme={"dark"}
    compozy workflow trigger analyze-content \
      --data '{"url": "https://example.com/article"}'
    ```
  </Step>

  <Step title="Optional: Deploy to Production">
    You can deploy your workflow to Compozy Cloud or to your own infrastructure:

    <Tabs>
      <Tab title="Compozy Cloud">
        ```bash theme={"dark"}
        # Sign up at https://app.compozy.dev
        compozy login
        compozy deploy
        ```

        Your workflow will be available at: `https://<your-project>.compozy.dev/analyze-content`
      </Tab>

      <Tab title="Self-Hosted">
        For self-hosted deployments, check our deployment guides:

        * [Docker Deployment](/deployment/self-hosted/docker)
        * [Kubernetes Deployment](/deployment/self-hosted/kubernetes)
      </Tab>
    </Tabs>
  </Step>
</Steps>

## What's Next?

<CardGroup cols={2}>
  <Card title="CLI Overview" icon="terminal" href="/getting-started/cli-overview">
    Learn about all available CLI commands and features
  </Card>

  <Card title="Core Concepts" icon="book" href="/core/base-structure/overview">
    Understand triggers, workflows, and components
  </Card>

  <Card title="Build Workflows" icon="diagram-project" href="/core/workflows/overview">
    Create more complex AI workflows
  </Card>

  <Card title="Browse Registry" icon="store" href="/registry/tools">
    Discover pre-built tools and agents
  </Card>
</CardGroup>
