Skip to main content
NEAR Docs hosts an 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 llmstxt.org.

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:
1

Open Copilot Chat

Open the Copilot Chat sidebar in VS Code.
2

Ask your question with reference

Use the #fetch keyword to add the llms.txt as reference:
How can I upgrade a contract state?
#fetch https://docs.near.org/llms.txt
3

Get AI-generated answers

Receive answers with direct reference links from the NEAR documentation site.

Cursor

When using Cursor, you can add NEAR Docs llms.txt as documentation reference:
1

Open Cursor Chat

Click on the Chat window in Cursor.
2

Add documentation

  1. Click on @
  2. Select Docs
  3. Click + Add new doc
  4. Enter in the text box:
https://docs.near.org/llms.txt
3

Use NEAR docs as reference

Select NEAR Protocol as documentation reference when asking questions.
4

Get contextual answers

Receive AI-generated answers based on NEAR documentation.

Benefits

Accurate code generation

AI agents generate code that follows NEAR best practices and conventions

Up-to-date information

Always reference the latest NEAR documentation and APIs

Faster development

Reduce time spent searching documentation manually

Consistent patterns

Maintain code consistency across your project

What’s next?

NEAR MCP Server

Use the Model Context Protocol for deeper AI integration

Build AI agents

Create autonomous AI agents on NEAR

Start building

Begin developing on NEAR with AI assistance

Join Discord

Get help from the NEAR developer community

Build docs developers (and LLMs) love