Designing .NET CLI Output for AI Agents The Albatross.CommandLine team released v9 of its .NET CLI library, targeting .NET 10 and .NET Standard 2.1, with changes aimed at making command output consumable by AI agents. The release removes default console logging so JSON output can be piped cleanly, and adds an Albatross.CommandLine.Outputs package with a CommandOutput envelope carrying the command name, message, errors, exit code and log folder. The team says the design lets agents chain CLI commands into integration tests while still requiring humans to decide which assertions prove the behavior. It’s been about a year since we released Albatross.CommandLine v8. We’ve used it in production across a number of projects, and reusable options have become one of the features we rely on most. Along the way, we added Albatross.CommandLine.CodeAnalysis to help developers catch issues at compile time. We also updated the source generator packaging so consuming projects automatically reference it as a development dependency. With the release of System.CommandLine v3, we’ve released Albatross.CommandLine v9, targeting .NET 10 and .NET Standard 2.1. In my previous article https://dev.to/rushuiguan/systemcommandline-with-dependency-injection-a-complete-solution-128o , I wrote about how a command takes an input like --instrument AAPL and passes an InstrumentSummary to its handler. Much of the work in v9 focuses on the other end of that interaction. What should the command print when the caller is an AI agent? As we use AI agents for more of our development work, verifying their changes becomes increasingly important. We also rely on agents to write and run integration tests, including tests that span multiple services. How do we make sure those tests exercise the behavior we care about? Our systems use a service-oriented architecture, and we rely heavily on CLIs to test them. A CLI gives the agent a defined set of operations it can use to build a test. It can run one command, inspect the result, and use a value from that result in the next command. For that to work reliably, the agent needs to know what to expect from each command’s output. The first change in v9 was to remove default console logging. If a command prints a price as JSON, I want to be able to pipe it straight into ConvertFrom-Json . One log message on standard output is enough to break that pipeline. The second change was to introduce Albatross.CommandLine.Outputs . For a command that returns data, the output is straightforward. A price lookup can serialize the quote to JSON and print it directly. An update is a little different. It might have no data to return, but the caller still needs to know how the operation went. The command can report that outcome using a CommandOutput envelope. public record class CommandOutput { public required string Command { get; init; } public string? Message { get; set; } public IReadOnlyCollection