Agent UX
Agent UX is the idea that software libraries and tools designed for AI agents benefit from being shaped around "desire paths" - observing what agents naturally try to do and making those patterns work, rather than relying solely on documentation.
Details
In practice, this means watching how agents attempt to use an API, CLI, or library (including hallucinated commands, flags, and function names), then implementing whatever they repeatedly try. Local coding agents are the primary consumers of these "desire path" interfaces, since they continuously interact with CLIs, libraries, and APIs during development sessions. An interface that matches agent expectations needs less documentation loaded into context, saving tokens at inference time.
Agent UX addresses usability once an offering is already known to the agent; agent SEO addresses the complementary problem of ranking well in agent-mediated search and discovery. Together they represent two sides of the same adoption problem: an offering must be both discoverable and easy to use correctly.
This has a dual-use relationship with hallucination exploitation: the same predictability that lets a tool author make hallucinated interfaces real also lets an attacker register hallucinated package names and serve compromised artifacts. The underlying phenomenon - model familiarity bias, where model outputs are consistent enough to anticipate because they reflect training data distributions - is neutral; the intent determines whether it is a design technique or an attack vector.
Examples
- A CLI tool whose subcommands, flags, and aliases were iteratively added based on what agents hallucinated when trying to use it, until nearly every agent guess is correct.
- A software library whose function names, parameter orders, and module structure mirror the conventions agents expect from similar well-known libraries.
- Naming a tool's operations to match the verbs and patterns agents already use for similar tasks (e.g., mirroring git's command structure).
Counterarguments
- Designing interfaces around what agents hallucinate optimizes for current model biases rather than good interface design. As models improve and hallucination patterns shift, interfaces shaped by today's model quirks may become misaligned with tomorrow's agent expectations, creating maintenance debt.
- The approach may entrench the conventions of dominant models. If most agents hallucinate git-like commands because of training data distribution, tools that adopt those conventions lock in an ecosystem shaped by the training data of a few frontier models rather than by interface quality.
- Hallucination-driven design is only feasible when model outputs are consistent enough to form stable desire paths. For less common tools or domains where model behavior is unpredictable, the signal-to-noise ratio of hallucinated patterns may be too low to guide useful design decisions.
- Making every hallucinated command work reduces the friction that prevents misuse. A tool that accepts every plausible-sounding invocation may also accept adversarial ones, expanding the attack surface for prompt injection payloads that guess at tool interfaces.
- Optimizing interfaces for agent expectations may degrade the experience for human users who also need to use the tool directly. If hallucination-driven naming diverges from what human users find intuitive, the tool serves agents better at the cost of human usability - a tradeoff that matters as long as humans remain direct users alongside agents.
- The approach requires tools similar enough to well-known ones that agents produce stable, consistent hallucination patterns to follow. Truly novel tool categories - with no close analogs in training data - lack the repeated hallucination signal that forms desire paths, making the technique inapplicable precisely where interface design guidance would be most valuable.
- Different models hallucinate differently based on their training data and fine-tuning. A tool designed around one model's desire paths - GPT-4's hallucinated flags, Claude's guessed function names - may not match another model's expectations. If the agent ecosystem is multi-model, desire paths fragment rather than converge, and the tool author must either pick a model to optimize for or maintain multiple interface variants.
Confidence
Medium. The desire-path principle is practical and actionable for tool designers today. The dual-use insight (same predictability enables both good UX and hallucination exploitation) is sharp. However, the approach may be transient - if model hallucination patterns shift significantly across generations, interfaces shaped by today's model quirks may need rework.