Skip to content

ECO-639: Document the X-Agent-Info attribution header - #1144

Draft
wkoutre wants to merge 1 commit into
Uniswap:mainfrom
wkoutre:nickkoutrelakos/eco-639-x-agent-info-publish-in-dev-docs-llmstxt
Draft

ECO-639: Document the X-Agent-Info attribution header#1144
wkoutre wants to merge 1 commit into
Uniswap:mainfrom
wkoutre:nickkoutrelakos/eco-639-x-agent-info-publish-in-dev-docs-llmstxt

Conversation

@wkoutre

@wkoutre wkoutre commented Aug 3, 2026

Copy link
Copy Markdown

Linear

https://linear.app/uniswap/issue/ECO-639

Summary

Adds developer docs for the optional X-Agent-Info request header (AI-agent traffic attribution on the Trading API):

  • New page content/trading/swapping-api/agent-attribution.mdx: the three-field request schema (decision_origin, integration_name, version), every rule that marks the header malformed, and the x-agent-info-status response contract used to confirm it parsed — with a worked cURL + TypeScript example.
  • meta.json: adds the new page to the Swapping API nav, after Integration Guide.
  • Cross-links from integration-guide.mdx (Authentication section), common-errors.mdx (Headers troubleshooting), and uniswap-ai/overview.mdx (AI-agent audience).

Schema and malformed-detection rules were verified directly against Linear ECO-634 and the backend implementation PR body (Uniswap/backend#11003), not just the docs ticket's own description — two real gaps (the "successful responses only" gating on the diagnostic response header, and the empty-string-is-absent-not-malformed case) were caught by an independent review pass and fixed before this PR was opened.

⚠️ Timing — please read before merging

  1. The backend feature this documents is not yet deployed. Uniswap/backend#11003 (parsing + the x-agent-info-status response header) and its base stack (#11002substreams#670) are all still open, unmerged as of 2026-08-02. The automated security gate passed, but the PR carries an explicit "do not merge before SECURE-274 appsec review closes" note. ECO-634 (the gateway ticket) is in "In Review", not Done. Recommend holding this docs PR until the backend stack merges and the entry-gateway CORS/Pulumi change actually deploys — otherwise these docs describe a header that silently does nothing in production yet.
  2. This repo doesn't build developers.uniswap.org directly. Per this repo's own README.md/CONTRIBUTING.md (added in the recent content/-restructure), Uniswap/docs is a downstream mirror: accepted changes are ported into a separate, private publishing pipeline in batches, and may go live before or after they land here. So there's already a natural delay before this PR (once merged) reaches the live site — worth knowing when coordinating with navbar links fallback to most recent version instead of current version #1 above.
  3. llms.txt / llms-full.txt are not files in this repo. No static llms.txt exists under content/; the previous (now-archived) Docusaurus site generated it from doc content at build time via docusaurus-plugin-llms, and content/uniswap-ai/overview.mdx describes the same live behavior today at developers.uniswap.org/llms.txt. This strongly suggests the new pipeline auto-generates it from content/ the same way — meaning this page should flow into llms.txt/llms-full.txt automatically once ported — but I don't have visibility into that separate pipeline's repo to confirm directly.

Test plan

  • Validated meta.json is well-formed JSON and the new page's nav entry matches its filename.
  • Verified every internal link/anchor added resolves to a real heading in the target page.
  • Independent review pass (fresh-context reviewer) checked the schema, malformed rules, and response contract word-for-word against ECO-634 and backend PR #11003; two gaps found and fixed (see Summary).
  • No local build/lint tooling exists in this repo for content/ (no root package.json) — nothing further to run.

🤖 Autonomously generated by the Linear Task Worker.

Adds a dedicated page covering the optional X-Agent-Info request
header (decision_origin, integration_name, version), the rules that
mark it malformed, and the x-agent-info-status response contract used
to confirm it parsed. Cross-linked from the swapping API integration
guide, troubleshooting page, and the Uniswap AI overview.

ECO-639
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Thanks for contributing to Uniswap Docs! 🦄

Quick heads up on how this repo works: the docs you see on developers.uniswap.org are built from a separate source repo. When we accept a change here, we port it over there, so your fix might show up on the live site before it lands in this repo.

Updates to this repo come in batches on a regular cadence. When yours is included, you'll be credited as a co-author on the commit, so the contribution counts on your GitHub profile and in Uniswap/docs.

We review every PR but can't merge everything. Either way, someone from the docs team will follow up here once we've taken a look.

One legal bit: by submitting a PR you agree your contribution is licensed under the repo's MIT license.

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.

2 participants