All Posts
News bits
Vercel、HTML内にLLMへの指示を埋め込む<script type="text/llms.txt">を提案
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が利用する指示の例:
<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サーバーの存在を知らせたり、エラーページから問題調査に役立つ監視ツールへエージェントを誘導したりするなどの活用が考えられる。この提案は正式な標準化を必要とせず、すぐにでも利用開始できる利点がある。
出展:A proposal for inline LLM instructions in HTML based on llms.txt
著者について
Hi there. I'm hrdtbs, a frontend expert and technical consultant. I started my career in the creative industry over 13 years ago, learning on the job as a 3DCG modeler and game engineer in the indie scene.
In 2015 I began working as a freelance web designer and engineer. I handled everything from design and development to operation and advertising, delivering comprehensive solutions for various clients.
In 2016 I joined Wemotion as CTO, where I built the engineering team from the ground up and led the development of core web and mobile applications for three years.
In 2019 I joined matsuri technologies as a Frontend Expert, and in 2020 I also began serving as a technical manager supporting streamers and content creators.
I'm so grateful to be working in this field, doing something that brings me so much joy. Thanks for stopping by.