Skip to main content

Flows

A flow is a composable pipeline that processes content files through a sequence of tools — AI translation, source QA, terminology enforcement, and more. Flows are a neokapi engine feature; this page covers how they behave inside a Bowrain project. For the mechanics of the streaming pipeline, the full tool catalog, and the supported formats, see the neokapi reference:

  • Tool reference — every processing tool and its inputs and outputs.
  • Format reference — every format reader/writer and its configurable parameters.
  • Flows — the streaming-pipeline model.

Flows in a synced project

In a Bowrain project, a flow reads the source files, streams their blocks through the tools in order, and — with no -o — commits the results to the project store as overlays (a process-only run); kapi merge then materializes the target files (pass -o to write a file directly instead). You then kapi push those changes to the server like any other edit. The flow itself runs locally — it does not touch the server until you push.

Built-in flows

kapi ships a small set of composed flows you can run by name:

FlowDescription
translateTranslate with an AI/LLM provider
translate-qaAI translation followed by quality checks
pseudo-translateGenerate pseudo-translations for UI testing
qaRule-based quality checks (whitespace, punctuation, placeholders)
recyclePre-fill translations from content memory
segmentationSplit source text into sentence segments

List what is available in your installation — including any tools and formats added by plugins — rather than relying on a fixed list:

kapi flows # composed flows
kapi tools # individual tools (flow steps)
kapi formats # supported formats

Run a flow:

# Standalone (no project)
kapi run translate-qa -i input.html -o output.html --source-lang en --target-lang fr

# In a project, against the recipe's content collections
kapi run translate-qa

Custom flows

Define a flow as a YAML file under .kapi/flows/, composing the tools you need:

.kapi/flows/translate-with-qa.yaml:

name: translate-with-qa
description: AI translation with quality checks and terminology enforcement

steps:
- tool: term-lookup

- tool: translate
config:
provider: anthropic
model: claude-sonnet-4.5
temperature: 0.3

- tool: term-enforce
config:
required: true

- tool: qa
config:
rules:
- whitespace
- punctuation
- placeholders
- terminology

Run it with kapi run translate-with-qa. See Custom flows for the full recipe, and the tool reference for each step's configurable parameters.

Next steps