Enable Agent Mode
Add--agent to any run command:
--agent is active:
- The interactive TUI is fully suppressed (no boot screen, no menus)
- Stdin is not used (no interactive prompts)
Output Format
Kane CLI outputs one JSON object per line (NDJSON) to stdout:Event Schema
Step Events
*optional
**
event values: screenshot, reasoning, action, vision, assertion, evaluation
Flow Events
Unresolved-Variable Warning
Kane CLI checks every{{name}} in the objective before the run starts. If a name has no value, Kane CLI prints a warning and the run continues. The name is typed literally as written, unless a step sets its value first. With --agent, the warning is a single typed event, sent before the first progress event:
reason is value_missing, not_declared, or not_a_dataset_column. The warning does not change the exit code. See Unresolved variables for what each reason means and which names are never checked.
The run_end Event
run_end is the last line of a one-shot run. It contains the complete test result. Always check the process exit code too: an early refusal can exit without a run_end event.
Key Fields
The .evidence proof pack
Every Kane CLI run produces an.evidence pack stored natively in the results folder, so failure context travels with the run instead of living in a separate dashboard. Each pack contains the full execution proof for the run: step-by-step traces, screenshots, video, and command, network and console logs, plus the NDJSON event stream and result codes. Coding agents and humans read the same evidence to see exactly what happened, where it failed, and why.
Parsing Output
Get therun_end event:
Command-Specific Completion
Reading the lastrun_end event works for one-shot run only. Other commands end with their own completion event:
testmd run: readtest_md_doneforoverall_status,duration_s,session_id, and the optionalshare_url. The stream can also containrun_endevents; these finish individual steps, not the file.- Local
testrun runsuites: end withtestrun_done. Suites dispatched to the remote grid then also emitremote_done; keep itsstatus,exit, andsessions_pathfields. generate: ends withgenerate_done.- Assurance commands: conversational agent streams end with
done. The review and read commands have their own completion contracts.
done and failed. Step indices can repeat, so keep track of which child agent and execution each event belongs to.
testrun run prints its NDJSON stream when stdin is not a TTY, or when you pass --agent. See Batch runs (testrun).
Handling ask_user Events
If an objective requires user input mid-run, Kane CLI fires ask_user:
ask_user is turned off automatically when stdin is not a TTY. In CI/CD and AI agent contexts, stdin is never a TTY, so ask_user never fires. Write objectives that don’t require interactive prompts.Agent Mode vs Interactive Mode
Next Steps
- Error Codes: Complete reference of
result_codevalues and recommended actions - Parallel Execution: Run multiple tests concurrently
- Skills: Install the Kane CLI skill for Claude, Codex, or Gemini
- CLI Reference: Full flag and command reference