Skip to content

Add Link response headers for agent discovery (RFC 8288)#2442

Closed
kaankacar wants to merge 2 commits into
mainfrom
2441-add-link-response-headers-for-agent-discovery
Closed

Add Link response headers for agent discovery (RFC 8288)#2442
kaankacar wants to merge 2 commits into
mainfrom
2441-add-link-response-headers-for-agent-discovery

Conversation

@kaankacar
Copy link
Copy Markdown
Collaborator

Closes #2441.

Makes developers.stellar.org discoverable to AI agents and other automated clients via standard HTTP link relations (RFC 8288) and an API catalog (RFC 9727).

Changes

  • nginx/nginx.conf: emits 10 Link headers on /, covering all four Stellar APIs (Horizon, Stellar RPC, Anchor Platform, SDP) with rel="service-desc", rel="service-doc", rel="api-catalog", and rel="describedby" for /llms.txt. Headers live inside location / because nginx add_header inheritance is shadowed by inner location blocks.
  • static/.well-known/api-catalog: RFC 9264 linkset (served as application/linkset+json) listing all four APIs with their service descriptions and human docs in one machine-readable document.
  • static/openapi/{horizon.yml,anchor-platform.yaml,stellar-disbursement-platform.yaml}: raw OpenAPI bundles published at stable URLs so each API has a service-desc target (previously only Stellar RPC's OpenRPC spec was served).

Copilot AI review requested due to automatic review settings May 12, 2026 15:44
@kaankacar kaankacar linked an issue May 12, 2026 that may be closed by this pull request
@kaankacar kaankacar self-assigned this May 12, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds standardized discovery metadata to developers.stellar.org so automated clients (AI agents, tooling) can find machine-readable API descriptions and documentation via RFC 8288 Link headers and an API catalog linkset.

Changes:

  • Add multiple RFC 8288 Link response headers (service descriptions/docs, API catalog, /llms.txt) from nginx.
  • Add /.well-known/api-catalog as an RFC 9264 JSON linkset listing the major Stellar-related APIs and their specs/docs.
  • Publish bundled OpenAPI specs at stable /openapi/* URLs (Horizon, Anchor Platform, Stellar Disbursement Platform).

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
nginx/nginx.conf Emits Link headers for discovery and serves /.well-known/api-catalog as application/linkset+json.
static/.well-known/api-catalog Adds a machine-readable API catalog (JSON linkset) pointing to specs and human docs.
static/openapi/horizon.yml Publishes Horizon OpenAPI bundle at a stable URL for service-desc.
static/openapi/anchor-platform.yaml Publishes Anchor Platform OpenAPI bundle at a stable URL for service-desc.
static/openapi/stellar-disbursement-platform.yaml Publishes SDP OpenAPI bundle at a stable URL for service-desc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nginx/nginx.conf
Comment on lines 17 to +30
location / {
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri $uri.html $uri/index.html =404;

add_header Link "</.well-known/api-catalog>; rel=\"api-catalog\"; type=\"application/linkset+json\"" always;
add_header Link "</openapi/horizon.yml>; rel=\"service-desc\"; type=\"application/yaml\"; title=\"Horizon OpenAPI\"" always;
add_header Link "</openapi/anchor-platform.yaml>; rel=\"service-desc\"; type=\"application/yaml\"; title=\"Anchor Platform OpenAPI\"" always;
add_header Link "</openapi/stellar-disbursement-platform.yaml>; rel=\"service-desc\"; type=\"application/yaml\"; title=\"Stellar Disbursement Platform OpenAPI\"" always;
add_header Link "</stellar-rpc.openrpc.json>; rel=\"service-desc\"; type=\"application/json\"; title=\"Stellar RPC OpenRPC\"" always;
add_header Link "</docs/data/apis/horizon/api-reference>; rel=\"service-doc\"; title=\"Horizon API reference\"" always;
add_header Link "</docs/data/apis/rpc/api-reference>; rel=\"service-doc\"; title=\"Stellar RPC API reference\"" always;
add_header Link "</docs/platforms/anchor-platform/api-reference>; rel=\"service-doc\"; title=\"Anchor Platform API reference\"" always;
add_header Link "</docs/platforms/stellar-disbursement-platform/api-reference>; rel=\"service-doc\"; title=\"Stellar Disbursement Platform API reference\"" always;
add_header Link "</llms.txt>; rel=\"describedby\"; type=\"text/plain\"; title=\"LLM-friendly site description\"" always;
type: string
description: The memo type of the transaction in the Stellar network. Should be present if memo is not null.
enum:
- text id hash
Comment on lines +58 to +60
description: |-
Specifies order. Note, that when the field is null, all transactions with null value will be last, regardless of soring order (NULLS LAST).
For example, transfer time may not be specified for some transactions, resulting into `transfer_received_at` being null. If so, transactions with non-null values will be sorted and returned first, followed by all transactions with null timestamps.
Comment on lines +63 to +65
There are two parts to the registration flow. First, the wallet must authenticate and initiate a registration flow using the Anchor Platform Endpoints defined below. Note that these endpoints are hosted on a different host than the Stellar Disursement Platform.

The second part of the registration flow is handled by the webview that is opened within the wallet application. This webview uses the endpoints defined in the Stellar Disbursement Platfrom Endpoints section to complete the registration process. The wallet application can chose not to use the webview and intstead integrate directly with the API.
post:
tags:
- Authentication
summary: Reset Rassword
Comment on lines +910 to +912
message: File uploaded succesfully
example:
message: File uploaded succesfully
@stellar-jenkins-ci
Copy link
Copy Markdown

@kaankacar
Copy link
Copy Markdown
Collaborator Author

Closing since this PR heavily overlaps with #2440

@kaankacar kaankacar closed this May 13, 2026
@kaankacar kaankacar deleted the 2441-add-link-response-headers-for-agent-discovery branch May 13, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Link response headers for agent discovery

2 participants