Learn kapi › The content engine
Tools, flows and the demo provider
One tool at a time, then a flow, with every prompt in the open.
A tool is one processing step over blocks; a flow composes tools; a provider is what a translate step talks to. This lab lists both, runs the built-in translate flow on the About page with the demo provider, prints the prompts a model would receive, and runs a check as a single tool.
- The tool registry
kapi toolsA tool is one processing step: it reads blocks and writes blocks. The registry groups them by what they do: translation, quality, analysis, text processing. - Flows compose tools
kapi flowsA flow is a named composition. The built-in translate flow is recycle, then translate, then the deterministic checks: reuse before AI, and verify what AI produced. - Where content enters and leaves
kapi run translate -i src/about.md -o src/about.fr.md --target-lang fr --explainA run binds a source and a sink. --explain prints the binding without running anything: a file in, a file out, since this is an ad-hoc run with no project. - Run the flow
kapi run translate -i src/about.md -o src/about.fr.md --target-lang frIn the browser every provider is the demo stub: deterministic, keyless, and marked. The flow ran for real; only the model is illustrative. - The marked output
head -8 src/about.fr.mdEvery sentence the stub wrote carries its marker, so nobody ships it by mistake. - What reaches a model
kapi exec translate src/about.md --target-lang de -o src/about.de.md --explain-prompts 2>&1 | head -36exec runs one tool with nothing around it. --explain-prompts prints what the translate step sends: the task, the constraints, the block's place in the document, the text. Nothing is hidden. - Checks are tools too
kapi exec placeholder-check src/en.json --target src/de.json --target-lang deThe German catalog is missing a select; the placeholder check finds it. An exec reports and never fails a build; the gate that stops one is kapi check. - Every command speaks JSON
kapi stats src/en.json --json --jq .total.words--json prints the structured result and --jq filters it in place, which is what scripts and agents read.