This article explores the architectural considerations and design patterns for creating effective APIs for AI agents, drawing lessons from Webflow's experience. It highlights the fundamental differences between APIs optimized for human developers and those required for reliable autonomous agent execution, advocating for intent-driven, task-level interfaces, layered tool organization, and code-oriented environments.
Read original on The New StackTraditional APIs are designed for human developers who can interpret documentation, compose granular endpoints, manage state, and manually handle failures. AI agents, particularly large language models (LLMs), operate with less implicit context and rely heavily on the API surface itself to guide their planning and execution. Directly exposing low-level developer APIs to agents leads to chatty interactions, inefficient runtimes, higher latency, increased token consumption, and unreliable task completion due to the agent's need to infer complex execution strategies and preserve intermediate state.
Key Principle
APIs for agents must prioritize execution reliability, fewer ambiguous choices, less state to preserve, and clearer guidance for failure recovery, rather than just flexibility and composability.
Webflow's journey led to several key architectural decisions for their MCP (Multi-Modal Command Protocol) server to support robust agent workflows:
Traditional logging and tracing are insufficient for understanding autonomous agent behavior. New observability systems are needed to grasp *what the agent was trying to accomplish*, which capabilities it used, and how it navigated workflows, rather than just infrastructure metrics.
{
"action": "update_page_section",
"params": {
"page": "home",
"section": "hero",
"changes": {
"heading": "Build faster with Webflow"
}
}
}