I'm designing a new internal application for a relatively small organization—probably a few hundred users at most. Some people will use a conventional web interface and established workflows, while others may rely on chat-based assistants or multiple AI agents to interact with the system.
I'm trying to decide how much of the architecture should be designed specifically for AI use. Should I focus on building a well-designed, well-documented API and let agents use that directly? Is it worth adding an MCP server or other agent-specific interface? Are there patterns for making APIs and user interfaces easier for AI systems to understand and operate?
My current assumption is that a well-designed application with a clear API should serve both humans and AI, but I'm wondering what others have learned from building systems with both audiences in mind.
4 Answers
Don’t forget the browser layer if agents may operate the application through the UI. Give important controls stable, semantic identifiers and accessible labels so automation can reliably find them. That said, direct API access is generally more robust than having an agent click through the web interface, so treat UI automation as a fallback rather than the primary integration.
It can help to think of AI as another client with different constraints, not as a completely separate type of user. Design the permissions, audit logs, confirmations for risky actions, rate limits, and idempotency carefully. Then add agent-friendly documentation and a small set of high-value tools based on real workflows instead of exposing every internal endpoint at once.
The main difference is usually not the core functionality but how much data and ambiguity each interface exposes. A response with hundreds of records and dozens of fields may work for a human table view but consume an agent’s entire context window. Provide focused queries, useful filters, pagination, concise response shapes, explicit action names, and APIs that make the next valid step obvious.
Your basic approach is sound: make the underlying application and API reliable first, then expose the same capabilities to the web client and to AI tools. An MCP server can be useful as an adapter for agent tooling, but it shouldn’t replace a clean domain API. Start with clear operations, predictable errors, strong authentication and authorization, good documentation, and safe defaults.

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