Kai Ole Hartwig
Fünf mechanische Stop-Stationen mit Flag-Armen in unterschiedlichen Positionen auf einer gebürsteten Brass-Schiene, weiches Tageslicht.
Extension · koh/ai-workflows

ai-workflows — AI pipelines as YAML, not as custom code.

Multi-step AI operations as declarative YAML pipelines: steps, conditions, blocking/resume, expression resolution and pluggable notifiers. The engine for everything that doesn't fit into a single prompt — and shouldn't disappear into custom PHP code.

Das Problem

Otherwise multi-step AI logic ends up scattered across the code.

With ai-workflows

  • Workflow as a YAML file — versionable, reviewable, copyable
  • Blocking steps for human-in-the-loop, cleanly resumable
  • Expression resolution for inputs/outputs between steps
  • Custom step types registerable (extensible step architecture)
  • Pluggable notifiers (Slack/email/webhooks)
  • DDD architecture with deptrac enforcement

Until now

  • AI multi-step logic spread across several custom classes
  • Pauses/reviews as a hand-hacked status field
  • No reuse between use cases
  • No central tracing, no pipeline view

Four building blocks

Pluggable notifiers

Custom notification providers (Slack, Teams, email, webhook) registerable via interface — a central notify layer for all workflows.

Expression resolution

Outputs of one step are available to subsequent steps via expression syntax. Branches and conditions without PHP code.

Blocking/resume

Workflows can pause — e.g. for human approval — and be cleanly resumed without losing state.

YAML workflows

Workflows as declarative YAML files. Every step has a type, input/output definition, and optional conditions.

Available on Packagist — GPL-2.0-or-later, source on GitHub

composer require koh/ai-workflows. For help integrating it into your TYPO3 platform, use the contact form.

Architecture

Classes/
├── Domain/          # Value objects, enums, contracts (interfaces)
├── Application/     # Orchestration services
├── Infrastructure/  # Steps, adapters, persistence
└── Presentation/    # Controllers, event listeners

 

Layer dependencies are enforced via deptrac — Domain has zero external dependencies, Application depends only on Domain, Infrastructure and Presentation may use framework classes.

Extension points

  1. Define an interface in Domain/Contract/
  2. Add an implementation in Infrastructure/
  3. Auto-discovery via _instanceof tags in Services.yaml

Configuration and dependencies

Workflows are defined as YAML files and registered through TYPO3's configuration system. Each workflow consists of ordered steps with optional conditions and expressions.

Dependencies

PackageTypePurpose
symfony/yamlRequiredYAML workflow parsing
koh/content-intelligenceOptionalContent quality analysis integration
koh/semantic-deliveryOptionalMulti-channel delivery integration
koh/devDevShared QA tooling

Source code & docs

Composer package

composer require koh/ai-workflows – on Packagist, source on GitHub.

On GitHub
Composer package

Repository

Source code and issues on GitHub. Pull requests are welcome.

ohartwig/ai-workflows
Repository

Mirror

Development happens on a private GitLab instance. GitHub is the public mirror: every release appears there with its tag, and Packagist reads it from there.

Next step

Set up your first workflow together?

ai-workflows is open source. If you want to set up your first production workflow with me — including step types, notifier integration and an eval setup — get in touch.

Request workflow support →

Or email me directly: mail@ole-hartwig.eu