We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Verbose Output

As you debug and build your AI agent, you'll probably want to dump a lot more context into the console... but at the same time, we don't want to make the user experience of our CLI tool too noisy...

Let's add an optional command-line flag, --verbose, that will allow us to toggle "verbose" output on and off. When we want to see more info, we'll just turn that bad boy on.

Assignment

  1. parser.add_argument("--verbose", action="store_true", help="Enable verbose output")
    

    Otherwise, this metadata should not be printed – only the response.

  2. uv run main.py "What is the meaning of life?" --verbose
    
    uv run main.py "How much wood would a woodchuck chuck if a woodchuck could chuck wood?"
    

If everything looks good, run and submit the CLI tests.