Using NEAR documentation with your AI Coding Agents
NEAR Docs hosts a llms.txt file to provide information to help LLMs use the complete NEAR documentation at inference time.
While websites serve both human readers and LLMs, LLMs benefit from concise information gathered in a single, accessible location. This is critical for use cases like development environments, where LLMs need quick access to programming documentation and APIs.
If you want to learn more about the llms.txt standard, check this website.
Using llms.txt
The llms.txt core purpose is to provide context that the AI agent can reference before generating or modifying code.
Using an llms.txt file as a reference for AI coding agents is an advanced technique to guide the AI's behavior, improve code quality, and enforce project-specific patterns. It's essentially a way to provide contextual, in-the-flow documentation.
Next, you can find examples of how to integrate llms.txt with Visual Studio Code and Cursor.
Visual Studio Code
To use NEAR Docs llms.txt as reference when working with Copilot Chat, follow these steps.
- 
Open the Copilot Chat sidebar on VS Code.
 - 
Ask your question, and use the
#fetchkeyword to addhttps://docs.near.org/llms.txtas reference. For example:How can I upgrade a contract state?
#fetch https://docs.near.org/llms.txt
 - 
Get your AI-generated answer, along with direct reference links from the NEAR documentation site.

 
Cursor
When using Cursor, you can add NEAR Docs llms.txt as documentation reference following these steps, so it will be available when asking questions to the AI agent.
- 
Open Cursor Chat window.
 - 
Click on
@, selectDocs, and+ Add new doc. On the text box, enter:https://docs.near.org/llms.txt
 - 
You can now select
NEAR Protocolas documentation reference when asking your questions.
 - 
Get your AI-generated answer based on NEAR documentation.
