Skip to main content

Using Claude Code, Cursor, or another coding agent? Paste this into your prompt to run cross-browser and real-device tests, debug sessions, and wire up CI on the TestMu AI cloud:
Agent Mode outputs structured NDJSON instead of the interactive terminal UI. It’s how AI coding agents (Claude Code, Codex CLI, Gemini CLI) consume Kane CLI results: parse events programmatically, extract the final result, and present it to the user.

Enable Agent Mode

Add --agent to any run command:
When --agent is active:
  • The interactive TUI is fully suppressed (no boot screen, no menus)
  • Stdin is not used (no interactive prompts)
Always combine --agent with --headless in non-interactive environments (CI/CD, agent contexts) to avoid display server errors.

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


The run_end Event

run_end is always the last line. It contains the complete test result:

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 the run_end event:

Handling ask_user Events

If an objective requires user input mid-run, Kane CLI fires ask_user:
ask_user is auto-disabled 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.
If stdin IS a TTY, respond by writing JSON to stdin:
To cancel:

Agent Mode vs Interactive Mode


Next Steps

  • Error Codes: Complete reference of result_code values 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