woml README

README проекта с github.com/dali-benothmen/woml. Одним файлом markdown: README.md.

WOML: Workflow Orchestration Markup Language

WOML — Workflow Orchestration Markup Language

If you can read HTML, you can build workflows, apps, and AI agents with WOML.

Readable markup for structure. JavaScript for logic. A durable runtime for execution.

npm version GitHub stars License Platforms

Website · Documentation · Examples

What is WOML?

WOML is an open-source, code-first language and runtime for building automated workflows, backend applications, and AI agents. Describe the process in readable, HTML-inspired markup, use JavaScript for logic, and connect the APIs, services, databases, local tools, and infrastructure involved.

Each .woml file combines three parts:

The workflow source is the program, its readable architecture, and its execution policy. It can live in Git, move through pull requests and CI, and run locally or on infrastructure you control.

Start with one workflow for a local task or webhook. As the work grows, extract reusable modules, call or start other workflows, publish events, and operate the result as a coordinated system without changing its underlying model.

What can you build?

Build Use WOML to
Automated workflows Process orders, onboard customers, generate reports, review content, and coordinate human approvals.
Backend applications Handle webhooks, expose workflow APIs, run scheduled jobs, and coordinate event-driven services.
AI agents Connect models, tools, memory, specialist workflows, and human review in one durable process.
Data pipelines Import, validate, transform, classify, and store data with explicit control flow and recovery.
Infrastructure systems Run deployment checks, supervise local processes, coordinate infrastructure changes, and respond to incidents.

Why code-first WOML?

How WOML works

  1. Describe the process in a .woml file using triggers, steps, control flow, and runtime policies.
  2. Connect your tools with inline JavaScript, imported modules, managed services, secrets, and reusable child workflows.
  3. Run and operate it with the WOML runtime, which records durable state and provides inspection, cancellation, recovery, logs, and backups.

Installation

WOML requires Bun 1.3.14 or later. Install the global CLI with npm:

npm install --global woml-cli

Or install it with Bun or pnpm:

bun add --global woml-cli
pnpm add --global woml-cli

All three commands install the same woml executable:

woml --version

Native engines are selected automatically for supported macOS, Linux, and Windows systems. You do not need to install the platform packages or configure a database manually.

Linux packages require glibc 2.31 or newer.

Quick Start: Build an Order Router

Create a file named order-router.woml:

<woml>
  <workflow
    id="order-router"
    name="Order Router"
    description="Check inventory and risk concurrently, then route the order."
    version="1.0.0"
  >
    <triggers>
      <webhook
        id="newOrder"
        path="/webhooks/orders"
        method="POST"
        auth="none"
      >
        <schema>
          {
            "type": "object",
            "required": ["orderId", "amount", "inStock", "riskScore"],
            "properties": {
              "orderId": { "type": "string" },
              "amount": { "type": "number" },
              "inStock": { "type": "boolean" },
              "riskScore": { "type": "number" }
            },
            "additionalProperties": false
          }
        </schema>
      </webhook>
    </triggers>

    <steps>
      <step
        id="prepareOrder"
        name="Prepare order"
        description="Normalize the order received by the webhook."
      >
        <script>
          return {
            orderId: context.payload.orderId,
            amount: context.payload.amount
          };
        </script>
      </step>

      <parallel
        id="orderChecks"
        name="Run order checks"
        description="Check inventory and risk at the same time."
        concurrency="2"
        on-error="wait-all"
      >
        <step
          id="inventoryCheck"
          name="Check inventory"
          description="Confirm that the requested item is available."
        >
          <script>
            return { available: context.payload.inStock };
          </script>
        </step>

        <step
          id="riskCheck"
          name="Check risk"
          description="Accept orders with a risk score below seventy."
        >
          <script>
            return {
              approved: context.payload.riskScore < 70,
              score: context.payload.riskScore
            };
          </script>
        </step>
      </parallel>

      <step
        id="canFulfill"
        name="Make decision"
        description="Combine the inventory and risk results."
      >
        <script>
          return {
            value:
              context.steps.inventoryCheck.available &&
              context.steps.riskCheck.approved
          };
        </script>
      </step>

      <choose
        id="orderRoute"
        name="Route order"
        description="Accept the order or send it for review."
      >
        <when test="{{context.steps.canFulfill.value}}">
          <step id="acceptOrder" name="Accept order">
            <script>
              return {
                status: "accepted",
                message: `Order ${context.steps.prepareOrder.orderId} is ready for fulfillment.`
              };
            </script>
          </step>
          <result value="{{context.steps.acceptOrder}}" />
        </when>

        <otherwise>
          <step id="reviewOrder" name="Request review">
            <script>
              return {
                status: "review",
                message: `Order ${context.steps.prepareOrder.orderId} needs review.`
              };
            </script>
          </step>
          <result value="{{context.steps.reviewOrder}}" />
        </otherwise>
      </choose>

      <step
        id="response"
        name="Build response"
        description="Publish one predictable result for the caller."
      >
        <script>
          return {
            orderId: context.steps.prepareOrder.orderId,
            amount: context.steps.prepareOrder.amount,
            ...context.steps.orderRoute
          };
        </script>
      </step>
    </steps>
  </workflow>
</woml>

Check it without starting the automation:

woml check order-router.woml

Then run it:

woml run order-router.woml

WOML keeps the automation active and prints its webhook URL together with a generated curl command. Trigger it from another terminal:

curl --request POST http://127.0.0.1:3000/webhooks/orders \
  --header 'content-type: application/json' \
  --data '{"orderId":"order-42","amount":240,"inStock":true,"riskScore":18}'

Use auth="none" only for local development. Configure authenticated webhooks before exposing an endpoint outside a trusted environment.

How the Workflow Runs

flowchart TD
    trigger[POST /webhooks/orders] --> prepare[Prepare order]
    prepare --> parallel{Run concurrently}
    parallel --> inventory[Check inventory]
    parallel --> risk[Check risk]
    inventory --> decision[Make decision]
    risk --> decision
    decision --> route{Route order}
    route -->|Accepted| accept[Accept order]
    route -->|Needs review| review[Request review]
    accept --> response[Build response]
    review --> response

See the Result

WOML presents each run as an organized, colored terminal report. You will see output like this:

RUN  run_8f21c4                                                Order Router

  ✓  Prepare order                                              3 ms
     Normalize the order received by the webhook.
     → { orderId: "order-42", amount: 240 }

  ✓  Check inventory                                            2 ms
     → { available: true }

  ✓  Check risk                                                 2 ms
     → { approved: true, score: 18 }

  ✓  Make decision                                              1 ms
     → { value: true }

  ✓  Accept order                                               1 ms
     → { status: "accepted", message: "Order order-42 is ready for fulfillment." }

  ✓  Build response                                             1 ms
     → { orderId: "order-42", amount: 240, status: "accepted" }

Completed in 10 ms · 6 succeeded

The exact run ID and timings will differ. Press Ctrl+C to stop the active workflow host.

What You Just Built

Explore what you can build

Every example below is checked against the current WOML compiler.

Build What it demonstrates Run
Durable run counter State that survives future runs and process restarts woml run examples/durableStateWorkflow.woml
Personalize a customer list Durable per-item execution, bounded concurrency, and ordered results woml run examples/forEachWorkflow.woml
Social distribution Several independent multi-step branches with an explicit join woml run examples/forkDistributionWorkflow.woml
Telegram approval Human approval, interactive notification buttons, and durable waiting woml run examples/telegramApprovalWorkflow.woml
Workflow composition One workflow calling another and using its returned result woml run examples/workflowCallManual
Durable external callback A run that releases its worker and resumes from an idempotent CI signal woml run examples/durableWaits/ciCallback.woml
Preview environment saga Explicit rollback and mandatory cleanup for partial infrastructure success woml run examples/compensationAndCleanup/previewEnvironment.woml
Streamed Terraform release Live process output, structured progress, review, locking, compensation, and replay See the example runbook
Local TypeScript module Reusable project code exposed through services.* woml run examples/moduleWorkflow.woml

Provider examples require their documented credentials. Browse the complete example catalog for webhooks, schedules, intervals, internal events, databases, storage, cache, lifecycle, retries, communication providers, and production deployment.

Build larger systems from reusable workflows

A WOML project can begin with one file and grow into a system of focused workflows and modules. Workflows can call another workflow and wait for its result, start independent work in the background, or publish events that other workflows consume.

Create a project with workflow discovery and operator-owned configuration already in place:

woml init my-project
cd my-project
woml check
woml test

The generated workflow.json keeps workflow discovery, policies, reviewers, and execution targets reviewable while secret values remain outside source control. The same project model supports local execution, durable artifacts and waits, rich approvals, infrastructure policies, streamed output, OpenTelemetry, and authenticated remote targets. Remote work never silently falls back to the coordinator.

Read the project manifest reference, follow the infrastructure-agent tutorial, or use the operator runbook.

Built for real execution

Connect and extend

Structure complex work

Continue through failure

Operate on your infrastructure

When an interrupted external effect has an uncertain outcome, WOML marks it ambiguous instead of retrying it automatically. Inspect the real system with woml dispatch inspect, then record an audited decision with woml dispatch reconcile.

Common Commands

woml check workflows/                    # Parse, validate, and compile
woml run workflows/                      # Activate workflows in the foreground
woml run workflows/ --background         # Activate them in the background
woml inspect                             # Open the colored runtime inspector
woml list                                # List workflows and recent runs
woml get run_...                         # Inspect one run and its event history
woml cancel run_...                      # Cancel a pending or running workflow
woml recover run_... --retry action-id   # Resume a verified-safe corrective attempt
woml logs workflow-id --follow           # Follow live process output and progress
woml secrets set API_TOKEN               # Store a secret without printing it
woml backup backups/latest               # Back up the durable state store
woml prune --before 30d --dry-run        # Preview retention cleanup

See the CLI reference for all commands, flags, exit behavior, and machine-readable output.

VS Code Experience

The WOML extension gives .woml files HTML-style markup highlighting, embedded JavaScript syntax, highlighted runtime bindings such as context and services, reference-expression highlighting, snippets, and a dedicated file icon.

WOML workflow open in Visual Studio Code

The extension follows your existing VS Code theme instead of requiring a separate WOML color theme.

Build WOML with AI coding agents

WOML is structured source code, so coding agents can create and change workflows in the same environment as the rest of your project. The WOML Skill teaches agents the language structure, runtime bindings, control-flow patterns, services, secrets, and validation workflow they need to produce real .woml files without inventing syntax.

Use the WOML skill to build an order-processing workflow that starts from a
webhook, checks inventory and risk concurrently, and routes the result.

The generated workflow remains readable, reviewable in Git, and verifiable with woml check before it runs.

For Claude Code, install the complete skill in the current project:

mkdir -p .claude/skills/woml
curl -fsSL https://github.com/dali-benothmen/woml/releases/latest/download/woml-skill.tar.gz \
  | tar -xz -C .claude/skills/woml

For Codex and other clients that use the Agent Skills project convention:

mkdir -p .agents/skills
cp -R skills/woml .agents/skills/woml

View the WOML Skill and installation guide →

Documentation and Examples

Support and Security

Use GitHub Discussions for questions and GitHub Issues for reproducible bugs. Follow the support guide when sharing diagnostics, and report vulnerabilities privately according to the security policy.

Contributing

Contributions are welcome, including bug reports, documentation improvements, tested examples, provider work, compiler changes, and runtime improvements. Read CONTRIBUTING.md before opening a pull request.

License

WOML is released under the Apache License 2.0.

woml (dali-benothmen/woml)

Ищем в базе…

174 ·GitHub
Что это такое?WOML — это язык разметки с открытым исходным кодом, ориентированный на код, и среда выполнения для создания автоматизированных процессов, серверных приложений и ИИ-агентов. Процесс описывается в разметке, похожей на HTML, логика пишется на JavaScript, а надёжная среда выполнения на Rust запускает всё это со встроенными повторными попытками, ожиданиями и восстановлением после сбоев.
WOML — это инструмент без кода или то, что я пишу в коде?Это подход, ориентированный на код: файлы .woml сочетают читаемую разметку для структуры (триггеры, шаги, ветвления, циклы) и встроенный JavaScript или импортируемые модули JavaScript/TypeScript для логики. Файлы хранятся в Git и проходят обычную проверку через пул-реквесты и CI, как любой другой исходный код.
Как его установить и запустить?Установите глобальный CLI командой npm install -g woml (или эквивалентной командой Bun/pnpm) — все три варианта устанавливают один и тот же исполняемый файл woml. Затем напишите файл .woml и запустите его командой 'woml run yourfile.woml'.
Нужно ли сначала установить Bun?Да, для WOML нужен Bun версии 1.3.14 или новее. Нативные движки для macOS, Linux и Windows выбираются автоматически, а отдельная настройка базы данных не нужна, так как поддержка SQLite и Postgres уже встроена.
На что нужно обратить внимание в первую очередь при работе с вебхуками и сбоями?Пример вебхука из быстрого старта использует auth='none', что безопасно только для локальной разработки — аутентифицированные вебхуки нужно настроить до того, как эндпоинт станет доступен публично. Кроме того, если внешнее действие прервано и его результат неясен, WOML помечает его как неоднозначное и требует ручной сверки, а не молча повторяет попытку.
Для кого это и где это работает?Это для разработчиков, которые создают серверную автоматизацию, конвейеры обработки данных или ИИ-агентов и хотят, чтобы процессы можно было проверять в Git. CLI работает на поддерживаемых системах macOS, Linux и Windows (для Linux нужна glibc 2.31+), локально или на инфраструктуре, которой вы управляете.
Что я могу реально создать с помощью WOML?Автоматизированные процессы (обработка заказов, онбординг, согласования), серверные приложения (вебхуки, запланированные задачи, сервисы на основе событий), ИИ-агентов, конвейеры обработки данных и системы инфраструктуры, например проверки перед развёртыванием и реагирование на инциденты.
Могут ли ИИ-агенты для написания кода, например Claude Code, создавать для меня файлы WOML?Да, есть отдельный навык WOML Skill, который учит агентов структуре языка, привязкам к среде выполнения и процессу проверки, чтобы они могли создавать корректные файлы .woml. Его можно установить для Claude Code или через соглашение Agent Skills для Codex и похожих клиентов.
Что добавляет расширение для VS Code?Оно добавляет к файлам .woml подсветку разметки в стиле HTML, подсветку встроенного синтаксиса JavaScript, подсветку привязок среды выполнения (context, services), подсветку ссылочных выражений и сниппеты, при этом использует вашу текущую тему VS Code.
Как WOML обрабатывает сбои и частично выполненные операции?Среда выполнения сохраняет состояние надёжного выполнения (попытки, решения, ожидания, результаты) при перезапусках, поддерживает повторные попытки с устойчивыми идемпотентными идентификаторами операций, блокировки и аренды с фенсинг-токенами для общих ресурсов, а также явные компенсирующие шаги и шаги очистки для случаев, когда инфраструктура выполнена лишь частично.
Какие есть похожие проекты?agent-autoloop, kestra, evenfire, oh-my-subagents, nocobase, brigade, hyperfide-oss, golive-skill
Автор
dali-benothmen
Размер
15.3 MB
Звёзды
174
Возраст
1 г
Коммиты · 90 дней