A human can read command output. An agent needs structured state.

That is why JSON output became a major part of the Agentix MVP.

Why JSON matters

If a future LLM or automation layer needs to decide what to do next, it should not scrape terminal text. It should consume structured output.

Agentix now exposes JSON for several important workflows:

agentix verify --path ~/nixos-config --host nixos --json
agentix proposals list --path ~/nixos-config --json
agentix proposals clean --path ~/nixos-config --stale --yes --json
agentix audit tail --path ~/nixos-config --json
agentix audit summary --path ~/nixos-config --json

This is a foundation for safe automation.

Audit logs

Agentix writes audit events as JSON lines. Audit logs are not decoration. They are part of the safety model.

For an agentic system, you need to answer:

  • what happened?
  • when did it happen?
  • what action was attempted?
  • did it pass or fail?
  • what was applied?
  • what was refused?

Agentix now supports machine-readable audit inspection:

agentix audit tail --path ~/nixos-config --json
agentix audit summary --path ~/nixos-config --json

The summary output counts actions and results. This makes it easier to see whether the system is behaving normally.

Self-test

Agentix also has an installed-command self-test:

agentix self-test

The self-test creates a temporary fixture and checks:

  • proposal JSON listing
  • stale cleanup JSON
  • audit tail JSON
  • audit summary JSON

It does not run sudo. It does not rebuild NixOS. It does not switch the live system.

This is important because testing with uv run is not the same as testing the installed command. The installed command is what the operator actually uses.

Observability before autonomy

Before giving an LLM more authority, the system needs observability.

The current Agentix direction is:

structured state first
auditability second
controlled autonomy later

That ordering is deliberate. If an agent cannot explain what it did, it should not be trusted to do more.