Milo

One typed Python function becomes a CLI command, MCP tool, and llms.txt entry

One Function. Three Surfaces.

Build Python capabilities that stay truthful for humans and agents.

Define a command once with annotations, constraints, defaults, and a docstring. Milo derives the human CLI, direct Python dispatch, MCP JSON Schema and tool, and llms.txt discovery from that shared contract—then verifies the assembled application before you register it with an agent.

Milo, a Russian blue cat, routing one typed command into terminal, MCP, and agent-discovery surfaces

from milo import CLI

cli = CLI(name="greet", description="Say hello", version="1.0")


@cli.command("greet", description="Return a greeting")
def greet(name: str, loud: bool = False) -> str:
    """Greet someone by name."""
    message = f"Hello, {name}!"
    return message.upper() if loud else message


if __name__ == "__main__":
    cli.run()

One Command Contract

Human CLI

Milo derives argparse commands, options, defaults, help, and terminal presentation from the registered function.

MCP Tool

The same signature becomes enforced JSON Schema, tool metadata, structured dispatch, progress, errors, and results.

Agent Discovery

llms.txt and MCPtools/liststay tied to the command definition instead of a separate hand-maintained catalog.

Verification

milo verify app.pychecks import, schema, discovery, MCP Apps, gateway projection, and real subprocess JSON-RPC transport.

Humans and Agents Need Different Presentation

The operation stays shared; the boundary adapts. A human can receive a confirmation, form, multi-screen flow, or live terminal view. An agent receives structured input and output without an interactive prompt blocking the call.

Milo's terminal runtime adds immutable state, pure reducers, Kida templates, commands, sagas, and deterministic test helpers when a command needs a richer human interface.

Build a typed command or build an interactive app.


Know the Boundary

Choose Milo when drift between a human CLI and its agent-facing tool is the problem you want the framework to own. Choose Typer when only the polished human CLI matters. Choose FastMCP when remote MCP transport, auth, clients, deployment, and protocol breadth are the product.

Read the evidence-backed comparison.


Pure Python, Explicit Proof

  • Python 3.14+ with required free-threaded CI lanes.
  • One runtime dependency:kida-templates.
  • Standard annotations and docstrings remain the schema source.
  • Public claims are classified in the repository'spublic-claims.jsonledger.

Python Components Ecosystem

Milo is the terminal and agent-tooling layer in a personal, pure-Python stack built for Python 3.14t.

Project Role
⌁⌁ Chirp Web framework
=^..^= Pounce ASGI server
)彡 Kida Server-side component system
∿∿ Purr Content runtime
ᓚᘏᗢ Bengal Static-site integration
ฅᨐฅ Patitas Markdown parser
⌾⌾⌾ Rosettes Syntax highlighter
ᗣᗣ Milo CLI and agent-tooling framework ← You are here

Python-native. Free-threading ready. No npm required.