Flows
A flow runs content files through a sequence of tools, such as AI drafting, source checks and term checks. Flows are a neokapi engine feature, and the sections below cover how they behave inside a Bowrain project. For 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 and streams their blocks
through the tools in order. With no -o, it commits the results to the project
store as overlays (a process-only run), and kapi merge then writes the
target files. Pass -o to write a file directly instead. You then
kapi push the changes to the server like any other
edit. The flow runs locally and reaches the server only when you push.
Day to day, kapi up runs the project's default flow for
you, on the server when the project is connected. Run a named flow yourself
for one composition in one pass, without the gate loop.
Built-in flows
kapi ships a small set of composed flows you can run by name:
| Flow | Description |
|---|---|
translate | Draft with an AI provider |
translate-qa | AI drafting followed by quality checks |
pseudo-translate | Generate pseudo-translations for UI testing |
qa | Rule-based quality checks (whitespace, punctuation, placeholders) |
recycle | Pre-fill targets from content memory |
segmentation | Split source text into sentence segments |
To list what your installation provides, including tools and formats added by plugins:
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 in the directory your recipe names with
flows_dir: (here flows_dir: flows), composing the tools you need.
Step config keys are the tool's own schema keys, in camelCase, as the
tool reference lists
them; an unrecognized key is ignored.
flows/translate-with-checks.yaml:
name: translate-with-checks
description: AI drafting with quality checks and a term check
steps:
- tool: translate
config:
provider: anthropic
model: claude-sonnet-5
- tool: term-check
config:
caseSensitive: false
- tool: qa
config:
checkDoubleSpaces: true
checkPatterns: true
checkTargetInconsistency: true
Run it with kapi run translate-with-checks. See
Custom flows for more compositions, and the
tool reference for each step's
configurable parameters.