Agent-First PSQL v0.4: A Native Runtime with Complete Help

by Agent-First Kit Contributors

The v0.4 line removed MCP server mode, generated CLI docs from the source command definition, and made --help complete for agents.

Agent-First PSQL v0.4 was a simplification release.

Earlier versions experimented with MCP server mode. The v0.4 line removed that surface and focused afpsql on the native interfaces that mattered most: CLI, pipe, and psql-style argument translation.

The problem: database tools already have enough moving parts

A PostgreSQL connector has to manage connection settings, params, result sizes, streaming, cancellation, sessions, and error semantics. Adding a second server protocol inside the same binary made the dependency surface larger without making SQL execution clearer.

v0.4.0 removed --mode mcp and the rmcp/schemars dependencies.

The docs change: CLI reference came from the parser

v0.4.1 added generated CLI documentation from the clap derive definitions. That replaced hand-maintained cli.md text with a reference produced from the same source that parses real command-line flags.

For agents, stale docs are not a cosmetic problem. They turn into wrong tool calls. Generated docs reduce that drift.

The help change: one call should expose the whole interface

v0.4.2 then replaced normal shallow --help with recursive help via Agent-First Data’s cli_render_help, and added --help-markdown for generated Markdown docs.

An agent can ask afpsql for help once and see the complete command shape instead of probing subcommands and flags by trial and error.

The discipline change: structured output stayed guarded

The v0.4 line also tightened production-code linting and removed accidental print paths. That matters because a structured database connector cannot leak random terminal text into the protocol stream.

Where this fits: fewer surfaces, clearer contracts

v0.4 did not make afpsql do more kinds of database work. It made the supported path easier to trust: a native CLI/pipe runtime, generated docs, complete help, and less dependency surface.