Pop-up logins and multi-step wizards make agents guess from screenshots and burn tokens navigating your UI. Human-only steps stop unattended work.
Agent experience (AX) is the experience of an agent using your product. Give agents a front door - a CLI, an MCP server, or WebMCP tools - to complete tasks through explicit operations and structured data.
Designing for AX means making your product easy for an AI agent to discover and use reliably. Command names, tool descriptions, schemas and error messages become its interface.
The same Northwind task - export orders - can stall behind a human-only step or complete through a tool with scoped access configured in advance.
❌ Figure: Bad example - Screenshot navigation reaches a human-only login - unattended work stops until someone responds
✅ Figure: Good example - A documented MCP tool completes the export in one structured call. A CLI can expose the same operation
People navigate an app using visual cues and shared context. Design the agent interface around explicit inputs, discoverable operations and structured results instead of leaving it to infer your intent.
Pick by where the agent runs. The three surfaces complement each other, so many products offer more than one.
| Surface | Best for | Where it runs | Maturity |
|---|---|---|---|
| CLI | Dev tools and anything scriptable | The agent's shell | Stable - agents already write shell commands well |
| MCP server | Exposing your system or data to any agent | Your server or a local process | Established - open standard with broad client support |
| WebMCP | Actions inside the user's open browser tab | The user's browser | Early - draft spec, browser origin trials |
Let shell-based agents pass flags without interactive prompts and request structured output. Reject unknown flags and return meaningful exit codes.
For single-result commands, print exactly one JSON document to stdout, even on failure, and send diagnostics to stderr. Document streaming output separately.
This Northwind error uses exit status 2. Its response shape and exit values are an example contract:
{"ok": false,"data": null,"error": {"code": "INVALID_DATE","message": "The --since date is invalid.","hint": "Use a real date in YYYY-MM-DD format."}}
Figure: The stable code drives the caller's decision, and the message and hint explain it
| Outcome | Exit status | ok | data | error |
|---|---|---|---|---|
| Rows found | 0 | true | [...] | null |
| No rows match | 0 | true | [] | null |
| Invalid date | 2 | false | null | {"code": "INVALID_DATE", ...} |
Callers should:
Use an MCP server to expose your system through a standard tool interface, locally or remotely. Tool names, descriptions and schemas help agents choose the right operation and supply valid inputs.
See how to build an MCP server for the details.
WebMCP lets a web page register JavaScript tools that an in-browser agent can call, using document.modelContext.registerTool(). The agent reuses the user's session instead of re-authenticating.
WebMCP is a Draft Community Group Report from the W3C Web Machine Learning Community Group. It is not a W3C Standard and not on the Standards Track.
The API has moved from navigator.modelContext to document.modelContext. Check the current specification and browser documentation before copying older examples.
Figure: WebMCP is experimental - check current support before adopting it
Give an AI coding agent your top 3 user tasks and only your CLI or MCP server to do them. Wherever it stalls, fix that spot. That is your AX backlog.
Figure: Find AX gaps by testing real tasks through your agent interface