Examples · 04 of 06
Run the clear requests. Hold the rest for a person.
Triage a file of natural-language requests, one per line. A reflex is a small program you install and ask for in your words. A request runs when it names everything and evoke is sure enough for what it changes. The rest wait for a person, with a note of what is missing. A request that fits nothing runs nothing.
The request and the result
01One line ran, one waits, one fits nothing.
A file of three requests, decided against the ops example's three reflexes. Recorded on 21 September 2026 against Jev, TypeSafe AI's model, which reads each sentence.
- 1A clear request runs. The first line named the service, the number and the
environment. It changes something, so every answer had to be 0.9 or more. It cleared that bar, so
run()ran it. - 2A missing value waits for a person. «silence db-3» named no duration. The decision holds what is missing and why, so a person can answer later.
- 3A request that fits nothing runs nothing. A question about the weather fits no reflex, so nothing ran. The decision keeps the ranking for whoever reads the queue.
The operations
02An app of eleven lines decides each request.
The app reads a line, decides, and runs only what is settled. The reflexes are the three from the ops example, in the same project directory.
scale checkout to 6 in staging silence db-3 what is the weather like
// The inbox as a stream. What is sure runs; the rest is queued for a person, // with the ranking or the missing pieces. import { createInterface } from "node:readline" import { load } from "@evoke-build/evoke" const ops = await load({ root: import.meta.dirname }) for await (const line of createInterface({ input: process.stdin })) { const d = await ops.decide(line) if (d.outcome === "run") console.log((await ops.run(d)).text) else console.log(`queued · ${d.outcome} · "${line}"`) }
- 1
decide()runs nothing. It returns a typed decision: run, confirm, ask or abstain. The app branches on it. - 2Only
runis acted on here. A confirm waits for a person too, since nothing in this app answers it. Your queue decides which person answers it. - 3A decision is plain data. Keep it in any queue or table. Later,
fill()answers an ask, andrun(d, { confirmed: true })runs a confirm. Both need a project built from the same reflexes and words.
One boundary
03With no terminal, a question becomes an exit code.
The evoke command reads the same file, one request per line. With no terminal
attached, as in a cron job, evoke cannot ask. A line that needs an answer prints the command to run
yourself, and the run ends with exit code 3.
$ evoke < inbox.txt scale service="checkout" env="staging" replicas="6" 0.90 deployment.apps/checkout-api scaled an ask needs a terminal → evoke "silence db-3" none 1.00 · 3 more under 0.01 [3]
Every other line is still answered, and evoke exits with the first code that is not zero. The
weather line printed its ranking: none first, at 1.00. No flag answers a question for you. At your
own terminal, evoke asks the question there instead.
Piping requests into evoke, in the manual →
How the bars decide what runs unattended →
Set it up
04Feed a file of requests to the scale reflex.
This uses the project from the ops example, with its scale reflex and your words.
The first request scales a real deployment, so point your words at one you may change.
- The ops projectThe ops example's Set it up builds it: the reflex, your words and your key.
- kubectl, with accessThe first request scales a deployment, for real.
- A classifier keyOne request per line, billed by the provider to your key. The
evokecommand answers a line you repeat from a local cache. - Your queueThe app prints what it would queue. Yours would store each decision and show it to someone.
-
Write the requests
Save three requests in
~/ops/inbox.txt, one per line: one that names everything, one that leaves out the environment, and one that fits no reflex.~/ops/inbox.txtyoursscale checkout to 6 in staging scale checkout to 3 what is the weather like
-
Try the file
Each line is decided, and nothing runs. The first would run, the second asks for its environment, and the third fits nothing.
evoke try < inbox.txt -
Run it at your terminal
The first line scales for real. evoke asks at your terminal for the environment the second line lacks: answer only if that scale may run, or press
Ctrl-Dto decline. The third line prints its ranking.evoke < inbox.txt -
Or run it unattended, and keep every decision
Where no terminal is attached, such as a cron job or CI, each request becomes one JSON line: what ran and its result, what is missing, or the ranking. The first line scales here too, and the run ends with exit code 3. A person works from the file.
evoke --json < inbox.txt > decided.jsonl
Put your own requests in inbox.txt. Each one is decided against the reflexes in the
project, so add yours with evoke add ./<name>.
In your app
05The same file, from a Node application.
queue.ts loads ~/ops and decides each line. It runs only what is settled,
and queues the rest. It needs Node 24.5 or newer, and ES modules.
npm init -y && npm pkg set type=modulenpm install @evoke-build/evokenode queue.ts < inbox.txt- 1Save
queue.tsin~/ops. The first line scales for real. The other two print what the app would queue: an ask and an abstain. - 2Replace the
elsebranch with your queue. Store the decision, then showd.missingord.contendersto a person.