Home / Companies / TestMu AI / Blog / Post Details
Content Deep Dive

NDJSON: How Agents Read a Kane CLI Run

Blog post from TestMu AI

Post Details
Company
Date Published
Author
Bhawana
Word Count
521
Company Posts That Month
64
Language
English
Hacker News Points
-
Summary

Kane CLI's agent mode is designed for AI coding agents or CI runners that require parsable results rather than human-readable logs, using NDJSON format to output one JSON object per line corresponding to each event as it occurs. This mode facilitates programmatic consumption of results, eliminating the need for regex over prose and ensuring immediate action can be taken on events without waiting for an entire run to complete. Events in a run are marked by specific JSON objects indicating their type, such as step_start, step_event, and step_end, which provide a forensic trace of each action taken. The run concludes with a run_end event, summarizing the outcome, status, duration, and final state, which can be crucial for agents to decide subsequent actions like continuing operations or fixing code. Additionally, Kane CLI provides standardized exit codes to help pipelines branch decisions based on the run's success or failure, with automation considerations like auto-disabling interactive prompts when stdin is not a terminal. This setup allows agents to process the results efficiently and determine the next steps based on the NDJSON stream and exit codes.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Coding Assistant 1 1,586 431 148 -12%