Skip to main content

Text output

Every command prints aligned text for you to read.
  • Tables pad their columns.
  • A row that reports a state starts with a glyph: ✓ ok, ! warning, ✗ failure, • information.
  • A command that changes something confirms it on one line, such as agentx config set label "work laptop":
agentx did not write some of the text it prints, such as skill names and descriptions, MCP server command lines and messages from git servers. In that text, agentx replaces tabs, newlines and other control characters with spaces. This keeps each item on one row, and that text cannot control your terminal. If a path holds a control character, agentx prints it in double quotes with escapes, as git status does. You can still copy the path:

Colour

Text output is coloured when it goes to a terminal. Each colour has one meaning: Output that goes to a file or another program has no colour, so a script reads plain text. To choose yourself, use the global --color flag:
Set the NO_COLOR environment variable to any value, or set TERM to dumb, to turn colour off. --color on turns it back on.

Logs

agentx writes logs to stderr. A line that starts with warning: reports a problem that did not stop the command. Add --verbose to also see debug: lines, such as which agentx home and library the command used. Some warnings put what to do on a second line, indented under the warning.

Errors

A failed command prints error: ... on stderr. If there is a fix, a hint: ... line follows. With --json, the error is an error event on stdout.

Exit codes

Stop a run

To stop a run, press Ctrl-C or send SIGTERM. agentx stops the git command it is running, prints an error with a hint, and exits 9:
A change that had already started is finished before the run stops, and one that had not started leaves nothing behind. Ctrl-C in a terminal also reaches the git command agentx is running, so a change can stop part way. The next agentx command finishes or rolls back that change, and agentx doctor shows if one is waiting. Run the command again when you are ready. To kill a run that does not stop, press Ctrl-C a second time. The next agentx command cleans up in the same way. If the run had already done everything you asked, it exits 0 and reports what it did.

Environment variables

Set either variable to move that directory. agentx needs HOME, and reads XDG_CONFIG_HOME (default ~/.config) to find your agent clients. agentx update --nightly reads GITHUB_TOKEN, if set, to list the releases on GitHub.

JSON output

Add --json to any command to print one JSON object per line. The agentx desktop app reads this output. From a terminal, the text output is all you need. Each object carries its type and the output schema_version, which agentx version prints. Schema version 2 names the result of a scan inventory, emitted by agentx scan and agentx serve; version 1 called it snapshot. If a script reads snapshot events, change it to read inventory events.