I work on a small team building internal applications for a few hundred users. I'm starting to architect a new app and need to support people who prefer traditional web workflows as well as users who rely on chat-based AI or multiple autonomous agents.
I'm unsure whether the right approach is to build a standard web application with a well-designed, well-documented API, add an MCP server, or take other AI-specific considerations into account. My assumption is that a clear, human-friendly application and API should also be understandable to AI systems, but I suspect there may be important differences in how endpoints, data, and interactions should be designed.
For anyone who has built software intended for both human users and AI agents, what architecture and interface choices worked well? What lessons did you learn, and what would you do differently?
3 Answers
It’s also worth making the browser interface easier for automation. Give important controls and form fields stable, descriptive identifiers or data attributes so automated tools can reliably find them. That said, treat browser automation as a fallback; agents should generally use a supported API for business operations instead of clicking through the UI. Keep the web client and agent interface on top of the same permission and business-logic layer so they cannot bypass the same rules.
The main difference is that an API designed for a human UI is not automatically efficient for an agent. A response containing hundreds of records and dozens of fields may work perfectly for a table, but it can consume an agent’s entire context window. Provide focused queries, useful filtering and pagination, concise responses, stable identifiers, and actions that are clear and composable. You’ll probably need to tune the API around the tasks agents actually perform rather than simply exposing every database operation.
Your basic instinct is right: start with a solid domain model and a well-designed API rather than building the AI layer first. Make the API predictable, document the operations and data clearly, and keep authentication, permissions, validation, and error messages consistent. An MCP server or similar adapter can then expose the most useful capabilities to agents without forcing the core application to depend on one AI protocol.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically