| Internet-Draft | AI Discovery Endpoint | March 2026 |
| Choi | Expires 24 September 2026 | [Page] |
This document defines a lightweight mechanism by which web services expose a machine-readable description of their capabilities to autonomous AI agents. The mechanism consists of a well-known resource, served at "/.well-known/ai", that returns a structured JSON document describing the service's identity, available actions, authentication requirements, and operational hints optimized for large language model (LLM) token efficiency.¶
The specification addresses the absence of a standardized method for AI agents to programmatically discover what a web service can do and how to invoke its capabilities, without resorting to parsing human-oriented documentation or HTML content.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 24 September 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The rapid proliferation of autonomous AI agents -- software systems powered by large language models (LLMs) that perform tasks on behalf of users -- has created a fundamental interoperability gap on the World Wide Web. While the web has well-established mechanisms for communicating with human users (HTML) and search engine crawlers (robots.txt [RFC9309], sitemaps), no equivalent standard exists for AI agents seeking to discover and invoke the capabilities of web services.¶
Today, when an AI agent attempts to interact with a web service, it must resort to one or more of the following strategies:¶
These approaches are inefficient, error-prone, and fundamentally unscalable. A single service discovery interaction that could be accomplished in 200-500 LLM tokens with a structured response instead requires 3,000-15,000 tokens of unstructured content parsing -- a 10x to 30x overhead.¶
This document defines the AI Discovery Endpoint, a mechanism whereby a web service publishes a single, structured JSON document at a well-known location. This document describes the service's identity, enumerates its capabilities as discrete invocable actions, specifies authentication requirements, and provides operational hints that enable AI agents to interact with the service efficiently.¶
The design prioritizes:¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
A service provider that implements this specification MUST serve the AI Discovery Document at the following well-known URI [RFC8615]:¶
/.well-known/ai¶
The complete URI is constructed by appending "/.well-known/ai" to the authority (scheme and host) of the service. For example, for a service at "https://example.com", the AI Discovery Document is located at:¶
https://example.com/.well-known/ai¶
A service provider MAY additionally serve an identical copy of the AI Discovery Document at the path "/ai" on the same authority, as a convenience alias. When both locations are served, the content MUST be identical. An AI agent that receives differing content from the two locations MUST treat the "/.well-known/ai" response as authoritative.¶
The AI Discovery Document MUST NOT be served at a path that includes query parameters or fragment identifiers. The resource is a single, complete document.¶
The AI Discovery Document MUST be accessible via an HTTP GET request [RFC9110].¶
The server MUST NOT require authentication to access the AI Discovery Document itself. The purpose of the document is to enable discovery; requiring authentication to discover what authentication is needed creates a circular dependency.¶
The server SHOULD respond to requests within 3 seconds under normal operating conditions. AI agents MAY treat responses exceeding 10 seconds as unavailable.¶
The server MUST respond with HTTP status code 200 (OK) when the AI Discovery Document is available and the request is valid.¶
If the server does not implement this specification, it SHOULD respond with HTTP status code 404 (Not Found). An AI agent receiving a 404 response MUST conclude that the service does not publish an AI Discovery Document.¶
The server MAY respond with HTTP status code 301 (Moved Permanently) or 302 (Found) to redirect to another location. An AI agent MUST follow redirects up to a maximum of 5 consecutive redirections. The agent MUST NOT follow redirects that change the scheme from "https" to "http".¶
The AI Discovery Document MUST be served with the media type "application/json" [RFC8259].¶
Servers SHOULD include the "charset=utf-8" parameter:¶
Content-Type: application/json; charset=utf-8¶
The AI Discovery Document MUST be encoded in UTF-8 [RFC3629]. This ensures consistent handling of non-ASCII characters in service descriptions, capability names, and other textual fields, which is particularly important for services operating in multilingual environments.¶
The AI Discovery Document is a single JSON object [RFC8259] containing the fields defined in this section.¶
The top-level JSON object MUST contain the following fields:¶
The top-level JSON object MAY contain the following fields:¶
A conformant AI Discovery Document MUST NOT contain fields not defined in this specification at the top level. This constraint ensures that future versions of the specification can introduce new top-level fields without conflicting with proprietary extensions. Service providers requiring custom metadata SHOULD use the "meta" object for this purpose.¶
The "service" object describes the identity and classification of the service. It MUST contain the following fields:¶
(string, REQUIRED) The human-readable name of the service. This value SHOULD be the commonly recognized name of the service (e.g., "GitHub", "Stripe", "OpenWeatherMap"). The value MUST be between 1 and 100 characters in length.¶
(string, REQUIRED) A concise, factual description of what the service does. This description is intended for machine consumption and SHOULD be written in a declarative style that prioritizes clarity over marketing language. The value MUST be between 1 and 300 characters in length.¶
Authors SHOULD aim for descriptions under 200 characters to optimize token consumption.¶
The "service" object MAY contain the following fields:¶
(array of strings, OPTIONAL) One or more category labels that classify the service for discovery purposes. The following category values are defined in this version of the specification: "productivity", "ecommerce", "finance", "news", "weather", "maps", "search", "data", "communication", "calendar", "storage", "media", "health", "education", "travel", "food", "government", "developer".¶
Service providers SHOULD select from the above list to maximize interoperability with discovery systems. Future versions of this specification MAY define additional categories. A discovery system encountering an unrecognized category value SHOULD ignore it without error.¶
The array MUST contain at least one element if present, and MUST NOT contain duplicate values.¶
(array of strings, OPTIONAL) The natural languages supported by the service, expressed as BCP 47 [RFC5646] language tags. If omitted, the default value is ["en"].¶
The array MUST contain at least one element if present, and MUST NOT contain duplicate values.¶
The "capabilities" array is the core of the AI Discovery Document. Each element describes a single, discrete action that an AI agent can invoke.¶
The array MUST contain at least one element.¶
Service providers SHOULD limit the array to capabilities that are meaningful for AI agent consumption. Internal endpoints, administrative functions, and endpoints that require complex multi-step human interaction SHOULD be omitted.¶
Each capability object MUST contain the following fields:¶
(string, REQUIRED) A unique identifier for this capability within the service. The identifier MUST match the regular expression ^[a-z][a-z0-9_]*$ (lowercase ASCII letters, digits, and underscores, beginning with a letter). The identifier MUST be between 1 and 64 characters in length.¶
The identifier serves as a stable reference for the capability. Service providers SHOULD NOT change the identifier of an existing capability, as AI agents and external systems may reference it.¶
(string, REQUIRED) A concise description of what this capability does. The value MUST be between 1 and 200 characters in length.¶
This description is the primary mechanism by which an AI agent determines whether a capability is relevant to its task. Authors SHOULD write descriptions that are specific and actionable.¶
(string, REQUIRED) The URI or URI path at which this capability is accessible. The value MUST be non-empty.¶
If the value begins with "/" (U+002F), it is a relative path and MUST be resolved against the authority of the AI Discovery Document's URI. If the value is an absolute URI (beginning with a scheme), it is used as-is. This allows services to expose capabilities hosted on different domains or subdomains.¶
Each capability object MAY contain the following fields:¶
(object, OPTIONAL) A JSON object describing the parameters accepted by this capability's endpoint. Each key is a parameter name, and each value is a string describing the parameter in a compact, structured format.¶
The parameter description string SHOULD follow this pattern:¶
<type>, <requirement>[, <constraints>] [-- <description>]¶
Where:¶
(string, OPTIONAL) A compact description of the response structure. The value MUST NOT exceed 300 characters in length.¶
Authors SHOULD use a concise structural notation that conveys the shape of the response, e.g., "products[] {id, name, price, stock}".¶
The "auth" object describes how an AI agent must authenticate when invoking the service's capabilities.¶
When present, the "auth" object MUST contain the following field:¶
(string, REQUIRED) The authentication mechanism required by the service. The value MUST be one of:¶
The "auth" object MAY contain the following fields:¶
If the "auth" object is omitted entirely, an AI agent SHOULD assume that authentication may be required. Service providers are therefore RECOMMENDED to include the "auth" object even when no authentication is required, with type set to "none".¶
The "token_hints" object provides signals to AI agents about features the service supports to reduce the token cost of capability invocations.¶
All fields in the "token_hints" object are boolean and OPTIONAL. If the object is omitted, all fields default to false.¶
The "rate_limits" object informs AI agents of the service's rate limiting policy, enabling agents to plan their request patterns to avoid throttling.¶
The "meta" object contains metadata about the AI Discovery Document itself (not the service it describes). All fields are OPTIONAL.¶
This section defines how AI agents and other consumers SHOULD process the AI Discovery Document.¶
An AI agent attempting to discover the capabilities of a service at a given authority SHOULD perform the following steps:¶
If the response status is 404 (Not Found), the agent MAY optionally attempt to fetch the resource at "/ai" as a fallback. However, the "/.well-known/ai" location is authoritative, and agents MUST NOT treat a response from "/ai" as valid if the "/.well-known/ai" location returns a different response.¶
An agent MUST NOT issue requests to any capability endpoint described in the AI Discovery Document without first confirming that the document is valid and that the capability's method, endpoint, and parameters are well-formed.¶
The AI Discovery Document is expected to change infrequently. Service providers SHOULD include appropriate HTTP caching headers [RFC9111] in the response. A Cache-Control max-age value of 86400 (24 hours) is RECOMMENDED for most services.¶
Cache-Control: public, max-age=86400¶
AI agents SHOULD respect standard HTTP caching semantics. When the "meta.last_updated" field is present, an agent MAY compare it against a previously stored value to determine whether the document has changed.¶
AI agents MUST handle the following error conditions gracefully:¶
This specification defines version "1.0" of the AI Discovery Document. The "aiendpoint" field identifies the version.¶
An AI agent that encounters an "aiendpoint" value it does not recognize SHOULD still attempt to parse the document using the rules of the highest version it supports. Because this specification mandates additive-only changes across versions, a version 1.0 agent can safely process a version 1.1 document by ignoring unknown fields.¶
An AI agent MUST NOT reject a document solely because the "aiendpoint" value is higher than the version it supports.¶
An AI Discovery Document SHOULD NOT exceed 64 kilobytes in size. Service providers whose capabilities would exceed this limit SHOULD consider splitting their service into logical sub-services, each with its own AI Discovery Document.¶
An AI agent MAY refuse to process a document that exceeds 256 kilobytes.¶
A primary design goal of this specification is to minimize the number of LLM tokens required for an AI agent to discover and understand a service's capabilities.¶
As of this writing, leading LLMs consume approximately 1 token per 4 characters of English text and 1 token per 1-2 characters of JSON structural elements. Non-Latin scripts (e.g., CJK characters) typically consume 1-3 tokens per character.¶
A well-formed AI Discovery Document for a service with 5 capabilities is expected to consume between 200 and 800 tokens. By contrast, extracting equivalent information from a typical HTML documentation page requires 3,000 to 15,000 tokens -- an overhead factor of 10x to 30x.¶
This efficiency gain is achieved through several design choices:¶
The AI Discovery Document inherently exposes information about a service's internal structure and capabilities. Service providers MUST carefully consider the security implications of this disclosure.¶
The AI Discovery Document reveals the existence, paths, methods, and parameter structures of API endpoints. While this information may already be available through documentation or reverse engineering, the structured, machine-readable format significantly lowers the barrier for automated reconnaissance.¶
Service providers MUST NOT include endpoints in the "capabilities" array that they do not intend to be publicly discoverable. Administrative endpoints, internal APIs, and endpoints under development MUST be excluded.¶
The "auth" object describes the authentication mechanism but MUST NOT contain actual credentials, secrets, tokens, or keys. The "header" field specifies the name of the header in which a credential is passed, not the credential itself.¶
An AI agent that stores or caches AI Discovery Documents MUST ensure that no credentials are written into the cached document, even if the agent possesses credentials for the service.¶
When the "auth.type" is "none", the service provider asserts that no authentication is required. Service providers MUST NOT use "none" for endpoints that handle sensitive data, perform write operations, or incur costs.¶
The AI Discovery Document facilitates automated interaction with web services. This creates a potential vector for abuse, including:¶
Service providers MUST implement appropriate rate limiting on all capability endpoints exposed through the AI Discovery Document. Service providers MUST NOT rely solely on agents' voluntary compliance with advertised rate limits.¶
Service providers SHOULD monitor traffic patterns to capability endpoints and implement anomaly detection for automated abuse.¶
An AI agent that fetches an AI Discovery Document over an insecure channel risks receiving a modified or malicious document. A tampered document could redirect the agent to attacker-controlled endpoints or alter parameter descriptions to induce the agent to send sensitive data to unauthorized parties.¶
AI agents MUST fetch the AI Discovery Document over HTTPS (TLS) [RFC8446]. Agents MUST NOT fetch the document over plain HTTP. Service providers MUST serve the document over HTTPS.¶
AI agents SHOULD validate TLS certificates according to [RFC6125] and MUST NOT proceed if certificate validation fails.¶
A malicious or misconfigured AI Discovery Document could describe a very large number of capabilities, extremely long description strings, or deeply nested parameter structures, causing excessive resource consumption in the parsing agent.¶
AI agents SHOULD enforce the size limits described in Section 4.5 and SHOULD impose their own limits on the number of capabilities processed (RECOMMENDED: no more than 100 capabilities per document) and the length of individual string fields.¶
{
"aiendpoint": "1.0",
"service": {
"name": "SimpleNotes",
"description": "Create and retrieve plain text notes."
},
"capabilities": [
{
"id": "create_note",
"description": "Create a new text note",
"endpoint": "/api/notes",
"method": "POST"
},
{
"id": "list_notes",
"description": "List all notes, newest first",
"endpoint": "/api/notes",
"method": "GET"
}
]
}
¶
{
"aiendpoint": "1.0",
"service": {
"name": "ExampleShop",
"description": "Search and browse products.
Supports keyword search, category filtering,
and price sorting.",
"category": ["ecommerce", "search"],
"language": ["en", "ko"]
},
"capabilities": [
{
"id": "search_products",
"description": "Search products by keyword",
"endpoint": "/api/ai/products/search",
"method": "GET",
"params": {
"q": "string, required -- search keyword",
"category": "string, optional -- filter by category",
"max_price": "number, optional -- max price in USD",
"sort": "string, optional --
price_asc|price_desc|relevance,
default relevance",
"limit": "integer, optional, default 10, max 50"
},
"returns": "products[] {id, name,
price_usd, stock, category, url}"
},
{
"id": "get_product",
"description": "Get full details of a product by ID",
"endpoint": "/api/ai/products/:id",
"method": "GET",
"params": {
"id": "string, required -- product ID"
},
"returns": "product {id, name, description,
price_usd, stock, images[], category, url}"
}
],
"auth": {
"type": "apikey",
"header": "X-API-Key",
"docs": "https://exampleshop.com/docs/auth"
},
"token_hints": {
"compact_mode": true,
"field_filtering": true,
"delta_support": false
},
"rate_limits": {
"requests_per_minute": 60,
"agent_tier_available": true
},
"meta": {
"last_updated": "2026-03-10",
"changelog": "https://exampleshop.com/changelog",
"status": "https://status.exampleshop.com"
}
}
¶
{
"aiendpoint": "1.0",
"service": {
"name": "WorldWeather",
"description": "Current weather and 5-day
forecasts for cities worldwide.",
"category": ["weather", "data"],
"language": ["en"]
},
"capabilities": [
{
"id": "current_weather",
"description": "Get current weather for a city",
"endpoint": "/api/weather/current",
"method": "GET",
"params": {
"city": "string, required -- city name",
"units": "string, optional --
metric|imperial, default metric"
},
"returns": "city {name, country}, condition,
temp, humidity_pct, wind_speed, updated_at"
},
{
"id": "forecast",
"description": "Get 5-day weather forecast for a city",
"endpoint": "/api/weather/forecast",
"method": "GET",
"params": {
"city": "string, required -- city name",
"days": "integer, optional, default 5, max 5",
"units": "string, optional --
metric|imperial, default metric"
},
"returns": "city {name, country},
forecast[] {date, condition, temp_high,
temp_low, precipitation_pct}"
}
],
"auth": {
"type": "none"
},
"token_hints": {
"compact_mode": false,
"field_filtering": true,
"delta_support": true
},
"rate_limits": {
"requests_per_minute": 100,
"agent_tier_available": false
},
"meta": {
"last_updated": "2026-03-15"
}
}
¶
robots.txt communicates access restrictions to web crawlers. It answers the question "where should you NOT go?" but provides no information about what a service can do or how to interact with it programmatically. The AI Discovery Endpoint is complementary: while robots.txt defines boundaries, the AI Discovery Endpoint defines capabilities within those boundaries.¶
OpenAPI provides exhaustive, formal descriptions of REST APIs. It is designed as a complete contract between API provider and consumer, typically running to thousands of lines for a non-trivial service. A typical OpenAPI specification for a service with 10 endpoints consumes 5,000-20,000 tokens when processed by an LLM. The equivalent AI Discovery Document consumes 300-800 tokens.¶
The AI Discovery Endpoint does not replace OpenAPI. A service MAY publish both, using the AI Discovery Document for initial capability discovery and linking to the OpenAPI specification for agents that require detailed contract information.¶
MCP defines a runtime protocol for connecting AI agents to external tools and data sources. It requires a dedicated server process, a custom transport layer, and framework-specific integration. The AI Discovery Endpoint operates at a different layer: it is a static discovery mechanism with no runtime dependencies. A service's AI Discovery Document can be used to automatically generate an MCP server configuration, making the two approaches complementary.¶
llms.txt [LLMSTXT] proposes a convention for placing a plain text file at the root of a website containing a natural language summary for LLMs. While simple to implement, it is unstructured, not machine-queryable, and does not describe invocable actions. An LLM can read an llms.txt file to understand what a service is, but cannot determine from it how to programmatically interact with the service.¶
| Criterion | /ai | OpenAPI | MCP | llms.txt |
|---|---|---|---|---|
| Discovery focus | Yes | No | No | Partial |
| Token efficient | Yes | No | N/A | Partial |
| Machine-queryable | Yes | Yes | Yes | No |
| Actions described | Yes | Yes | Yes | No |
| No infrastructure | Yes | Yes | No | Yes |
| Implementation time | <30 min | Hours | Hours | <10 min |
A formal JSON Schema (draft 2020-12) for the AI Discovery Document is maintained at:¶
https://www.aiendpoint.dev/spec/v1/schema.json¶
This schema provides machine-verifiable validation of AI Discovery Documents and is the normative reference for field types, constraints, and enumerated values defined in this specification. The schema is versioned in parallel with this specification; version "1.0" of the schema corresponds to this document.¶
The Well-Known URI mechanism [RFC8615] provides a standardized namespace for resources that need to be located without prior knowledge of a site's URL structure. This is precisely the use case for AI agent discovery: an agent needs to find the AI Discovery Document given only the service's hostname. The alternative -- requiring services to register their AI Discovery Document location in a central registry -- would create a dependency on a third-party service and limit adoption.¶
JSON is the de facto standard for structured data exchange on the web. Every mainstream programming language includes JSON parsing in its standard library. Every LLM is trained on extensive JSON data and can parse it reliably.¶
Alternatives considered:¶
The decision to represent parameter descriptions as single-line strings (e.g., "string, required -- search keyword") rather than structured objects (as in OpenAPI's Parameter Object) was driven by token efficiency. A structured representation requires approximately 8-12 JSON tokens for structural elements alone. The compact string format eliminates this overhead while remaining parseable by both humans and LLMs.¶
This specification deliberately omits examples from the discovery document for two reasons:¶
The design of this specification was informed by the long history of web standards that enable automated interaction with web resources, including the Robots Exclusion Protocol [RFC9309], the Sitemaps protocol, the OpenAPI Specification [OPENAPI], and the Model Context Protocol [MCP].¶
The authors thank the early adopters and contributors to the AIEndpoint open-source project for their feedback on the specification design.¶