Skip to content

fastaxi

Build AXI (Agent eXperience Interface) command-line tools from typed Python functions.

AXI is a set of principles for CLIs that AI agents use: compact output, a few fields by default, totals and next-step hints, explicit empty states, structured errors and a live home view. With fastaxi you write ordinary functions that return Pydantic models, and it takes care of all of that. The same commands can also be handed to agent frameworks (PydanticAI, LangChain, the OpenAI Agents SDK, ...) as tools.

@app.command(name="list", next_steps=["{bin} view <id>"])
def list_todos(status: str = "open") -> list[Todo]:
    """List todos."""
    return db.query(status)
$ todo-axi list
id,title,status
41,Fix login redirect,open
42,"Write docs, examples",open
count: 2 of 2 total
help[1]: todo-axi view <id>

See the Quickstart for the full program, including the Todo model.

Install

uv add fastaxi

fastaxi needs Python 3.10 or later.

Where to next