編集

Vercel、HTML内にLLMへの指示を埋め込む<script type="text/llms.txt">を提案

Vercelは、AIエージェント向けの指示をHTMLレスポンスに直接埋め込むための規約として、<script type="text/llms.txt">の使用を提案した。これにより、認証が必要なページなどにAIエージェントがアクセスした際、取るべき行動をエージェント自身がHTMLから直接理解できるようになる。

この提案は、AIによる消費を目的としたコンテンツを公開するための新興標準llms.txtに基づいている。未知のtypeを持つ<script>要素はブラウザに無視されるため、通常のレンダリングには影響を与えない。一方で、LLMはこれを無視せず、内部の指示を解釈できる。

Vercelはすでに、同社のプレビューデプロイメントでデフォルトで有効になっている認証機能の401エラーページにこの仕組みを実装している。エージェントが保護されたURLにアクセスすると、レスポンス内のllms.txtスクリプトから認証をバイパスする方法を読み取り、自律的にアクセスを試みることが可能になる。

Vercelが利用する指示の例:

html
<script type="text/llms.txt">
  ## Note to agents accessing this page:

  This page requires authentication to access. Automated agents should use a 
  Vercel authentication bypass token to access this page.

  The easiest way to get a token is using the get_access_to_vercel_url or 
  web_fetch_vercel_url functions of the Vercel MCP server at 
  <https://mcp.vercel.com> (Docs at <https://vercel.com/docs/mcp/vercel-mcp>).

  Alternatively, this URL documents how to use the bypass token: 
  <https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation>
  You need to prompt the user to provide the bypass token to access this 
  page. The URL above also explains how the user can access the bypass token. 
  Then you can calculate a URL of the following form and successfully access it: 
  `https://current-domain/current-pathname?x-vercel-set-bypass-cookie=true&x-vercel-protection-bypass=$bypass_token`.
</script>

このアプローチは、認証アクセス以外にも応用可能。例えば、サイト内を操作するLLMに対して、APIアクセスを効率化するMCPサーバーの存在を知らせたり、エラーページから問題調査に役立つ監視ツールへエージェントを誘導したりするなどの活用が考えられる。この提案は正式な標準化を必要とせず、すぐにでも利用開始できる利点がある。

#参考文献

編集