Inferensys

Glossary

HATEOAS (Hypermedia as the Engine of Application State)

HATEOAS is a core constraint of the REST architectural style where a client interacts with a network application entirely through hypermedia links dynamically provided by the server.
Developer reviewing semantic search engine results on laptop, relevance scores visible, technical search demo.
REST ARCHITECTURAL CONSTRAINT

What is HATEOAS (Hypermedia as the Engine of Application State)?

HATEOAS is a core constraint of the REST architectural style that dictates how clients discover and navigate application state.

HATEOAS (Hypermedia as the Engine of Application State) is a constraint of the REST architectural style where a client interacts with a network application entirely through hypermedia (links and forms) dynamically provided by the server within its responses. The client needs no prior knowledge of the API's URL structure; all possible state transitions are discoverable from the server's hypermedia representations, making the server the sole driver of the application's workflow.

This principle enables loose coupling and server-driven evolution, as clients follow links like "actions": [{"rel": "create", "href": "/orders", "method": "POST"}] instead of constructing URLs themselves. For AI agents acting as API clients, HATEOAS provides a self-describing interface, allowing the agent to dynamically discover executable tool calls and valid next steps without hardcoded integration logic, aligning with the goals of the External System Connectors content group.

REST ARCHITECTURAL CONSTRAINT

Core Principles of HATEOAS

HATEOAS (Hypermedia as the Engine of Application State) is a core constraint of RESTful systems where the client's interaction with an application is driven entirely by hypermedia (links) dynamically provided by the server in its responses.

01

Hypermedia as the Interface

In a HATEOAS-compliant API, the server provides not just data, but also the possible next actions as hypermedia controls (links or forms) embedded within the response. The client does not need prior knowledge of the API structure; it navigates the application by following these server-supplied links. For example, an order API response might include links to cancel, update, or view_payment for that specific order, indicating the valid state transitions.

02

Stateless Client-Server Interaction

The server is stateless; it does not store client session state between requests. All application state necessary to understand a request is contained within the request itself (e.g., in headers, URI, or body). The application state resides on the client, while the resource state resides on the server. HATEOAS links guide the client through the application state machine without the server needing to track the client's position.

03

Dynamic Discoverability

A primary benefit of HATEOAS is runtime discoverability. Clients can start from a single, well-known entry point URI (like the API root) and discover all available resources and actions dynamically. This reduces tight coupling, as clients rely on link relations (e.g., rel="collection" or rel="next") rather than hardcoded URL templates. Changes to URIs or the introduction of new actions can be made on the server without breaking existing clients, as long as link relations remain stable.

04

Uniform Interface Constraint

HATEOAS is a key component of REST's uniform interface constraint, alongside:

  • Resource Identification in Requests (URIs)
  • Manipulation of Resources Through Representations (HTTP methods like GET, POST)
  • Self-Descriptive Messages (Media types like application/hal+json)
  • Hypermedia as the Engine of Application State (HATEOAS) Together, these ensure a standardized, decoupled interaction model between clients and servers.
05

Common Hypermedia Formats

To implement HATEOAS, APIs use media types designed for embedding links and actions. Common formats include:

  • HAL (Hypertext Application Language): A simple format with _links and _embedded properties.
  • JSON:API: Includes a top-level links object and relationship links.
  • Siren: A rich format that can represent entities with class, properties, links, and actions (forms).
  • Collection+JSON: A format specifically designed for managing lists of items. These formats provide a structured way to convey state transitions beyond plain JSON.
06

Contrast with RPC and CRUD APIs

HATEOAS differs fundamentally from RPC-style or basic CRUD APIs.

  • RPC APIs: Expose fixed procedure endpoints. Clients must know the exact endpoint URLs and parameters in advance.
  • Basic CRUD APIs: May expose a predictable resource structure (e.g., /users/{id}) but do not dynamically provide next-step links within responses.
  • HATEOAS APIs: The server dictates the workflow. The client's role is to follow the presented links, making the API a true hypermedia system rather than just a data service.
EXTERNAL SYSTEM CONNECTORS

Why HATEOAS Matters for AI Agents and Tool Calling

HATEOAS (Hypermedia as the Engine of Application State) is a core constraint of REST that fundamentally changes how clients, including AI agents, discover and interact with APIs.

HATEOAS is a constraint of the REST architectural style where a client's interaction with an application is driven entirely by hypermedia links dynamically provided within server responses. Instead of relying on out-of-band API documentation, the client discovers available actions and state transitions by parsing these embedded links. For an AI agent performing tool calling, this transforms an API from a static contract into a navigable state machine, where valid next steps are explicitly declared at runtime.

This dynamic discovery is critical for autonomous agentic systems. An agent can follow links to discover new endpoints or required authentication methods without pre-programmed routes, enabling robust adaptation to API changes. It shifts the integration burden from the agent's initial training to runtime exploration, allowing the system to interact with unfamiliar or evolving services by treating the API's own responses as the sole source of execution truth.

HATEOAS

Frequently Asked Questions

HATEOAS (Hypermedia as the Engine of Application State) is a core constraint of the REST architectural style that dictates how clients should discover and navigate an API. These FAQs clarify its principles, implementation, and role in modern API design for AI agents and external system connectors.

HATEOAS (Hypermedia as the Engine of Application State) is a constraint of the REST architectural style where a client interacts with a network application entirely through hypermedia (links) provided dynamically by the server. The server's responses include not just data but also actionable links that define the possible next states or actions the client can take. The client needs no prior knowledge of the API structure beyond an initial entry point URI and an understanding of the hypermedia format (like HAL or JSON:API). The server drives the application state by telling the client what it can do next, making the API self-descriptive and discoverable at runtime.

For example, a response from an order API might include the order data along with embedded links to cancel, pay, or view_invoice. The client follows these links to transition the application to a new state, rather than constructing URLs based on out-of-band documentation.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.