CLI for AI Agents
by Gordon Weakliem
Justin Poehnelt just published “You Need to Rewrite Your CLI for AI Agents”. I think he makes a number of points worth thinking about:
- It’s a lot easier for an agent to communicate with JSON. It’s a pain for humans but no problem for an AI.
- Write documentation! I’d say it as “write it for an idiot”.
- That extends into “write it for an ambitious idiot”. Harden your inputs against things like trying control characters, because it seemed like a good idea. Something only a malicious human would do, an AI might try because it’s out of real ideas and it’s in the training data somewhere.
- Being disciplined with both offering filter options and pagination
- Offer a
--dry-runoption, hopefully the user prompts the agent to use it.
I think it’s a great idea to think about making your services CLI friendly, but also agent friendly.
tags: []
navigation