Langchain and Langsmith llms.txt files. #2

Closed
opened 2026-02-16 08:18:12 -05:00 by yindo · 10 comments
Owner

Originally created by @Ilaiwi on GitHub (Mar 21, 2025).

Great project!

I can't seem to find the llms.txt for langchain and langsmith. Can you add them to the Readme please

Originally created by @Ilaiwi on GitHub (Mar 21, 2025). Great project! I can't seem to find the llms.txt for langchain and langsmith. Can you add them to the `Readme` please
yindo closed this issue 2026-02-16 08:18:12 -05:00
Author
Owner

@eyurtsev commented on GitHub (Mar 21, 2025):

We don't have them yet, I'll try to create them next week, and we'll update

@eyurtsev commented on GitHub (Mar 21, 2025): We don't have them yet, I'll try to create them next week, and we'll update
Author
Owner

@eyurtsev commented on GitHub (Mar 27, 2025):

@Ilaiwi added langchain and langchainjs here: https://langchain-ai.github.io/langgraph/llms-txt-overview/

We'll add langsmith as well, but you can keep track of that URL

@eyurtsev commented on GitHub (Mar 27, 2025): @Ilaiwi added langchain and langchainjs here: https://langchain-ai.github.io/langgraph/llms-txt-overview/ We'll add langsmith as well, but you can keep track of that URL
Author
Owner

@Ilaiwi commented on GitHub (Mar 27, 2025):

amazing! will test them out tomorrow. Thanks for the great work langstack is amazing, we have been having a blast using it.

@Ilaiwi commented on GitHub (Mar 27, 2025): amazing! will test them out tomorrow. Thanks for the great work langstack is amazing, we have been having a blast using it.
Author
Owner

@Parthiban-3997 commented on GitHub (Mar 31, 2025):

@eyurtsev I have a question regarding multiple url inputs

{
"mcpServers": {
"llm-docs-mcp": {
"command": "uvx",
"args": [
"mcpdoc",
"--urls",
"LangGraph:https://langchain-ai.github.io/langgraph/llms.txt",
"--urls",
"LangChain:https://python.langchain.com/llms.txt",
"--urls",
"HuggingFace_Accelerate:https://huggingface-projects-docs-llms-txt.hf.space/accelerate/llms.txt",
"--urls",
"HuggingFace_Diffusers:https://huggingface-projects-docs-llms-txt.hf.space/diffusers/llms.txt",
"--urls",
"HuggingFace_Space:https://huggingface-projects-docs-llms-txt.hf.space/hub/llms.txt",
"--urls",
"HuggingFace_Hub:https://huggingface-projects-docs-llms-txt.hf.space/huggingface_hub/llms.txt",
"--urls",
"HuggingFace_Transformers:https://huggingface-projects-docs-llms-txt.hf.space/transformers/llms.txt",
"--transport",
"stdio",
"--allowed-domains",
"langchain-ai.github.io",
"python.langchain.com",
"huggingface-projects-docs-llms-txt.hf.space"
]
}
}
}

While i ask questions related to langgraph/ langchain it just only uses HF links and while accessing langgraph/langchian based URLs it says like URL is not allowed even though I have added this in the allowed-domains list? Whats the issue here?

and if I use below code

"llm-docs-mcp": {
"command": "uvx",
"args": [
"mcpdoc",
"--urls",
"LangGraph:https://langchain-ai.github.io/langgraph/llms.txt",
"--transport",
"stdio",
"--allowed-domains",
"langchain-ai.github.io"
]
}

Then it accepts langGraph related questions

@Parthiban-3997 commented on GitHub (Mar 31, 2025): @eyurtsev I have a question regarding multiple url inputs { "mcpServers": { "llm-docs-mcp": { "command": "uvx", "args": [ "mcpdoc", "--urls", "LangGraph:https://langchain-ai.github.io/langgraph/llms.txt", "--urls", "LangChain:https://python.langchain.com/llms.txt", "--urls", "HuggingFace_Accelerate:https://huggingface-projects-docs-llms-txt.hf.space/accelerate/llms.txt", "--urls", "HuggingFace_Diffusers:https://huggingface-projects-docs-llms-txt.hf.space/diffusers/llms.txt", "--urls", "HuggingFace_Space:https://huggingface-projects-docs-llms-txt.hf.space/hub/llms.txt", "--urls", "HuggingFace_Hub:https://huggingface-projects-docs-llms-txt.hf.space/huggingface_hub/llms.txt", "--urls", "HuggingFace_Transformers:https://huggingface-projects-docs-llms-txt.hf.space/transformers/llms.txt", "--transport", "stdio", "--allowed-domains", "langchain-ai.github.io", "python.langchain.com", "huggingface-projects-docs-llms-txt.hf.space" ] } } } While i ask questions related to langgraph/ langchain it just only uses HF links and while accessing langgraph/langchian based URLs it says like URL is not allowed even though I have added this in the allowed-domains list? Whats the issue here? and if I use below code "llm-docs-mcp": { "command": "uvx", "args": [ "mcpdoc", "--urls", "LangGraph:https://langchain-ai.github.io/langgraph/llms.txt", "--transport", "stdio", "--allowed-domains", "langchain-ai.github.io" ] } Then it accepts langGraph related questions
Author
Owner

@eyurtsev commented on GitHub (Mar 31, 2025):

Might be a typo here:

"--allowed-domains",
"langchain-ai.github.io",
"python.langchain.com",
"huggingface-projects-docs-llms-txt.hf.space"

Replace with

--allowed-domains *

while testing or just remove it.


Then try to add just 2 different URLs and see what the IDE does if you prompt it very explicitly. You should be seeing the function calls from the agent. Make sure it it's fetching the LLMs from the appropriate source.

@eyurtsev commented on GitHub (Mar 31, 2025): Might be a typo here: ``` "--allowed-domains", "langchain-ai.github.io", "python.langchain.com", "huggingface-projects-docs-llms-txt.hf.space" ``` Replace with ``` --allowed-domains * ``` while testing or just remove it. --- Then try to add just 2 different URLs and see what the IDE does if you prompt it very explicitly. You should be seeing the function calls from the agent. Make sure it it's fetching the LLMs from the appropriate source.
Author
Owner

@Parthiban-3997 commented on GitHub (Mar 31, 2025):

Sorry, I tried my best; there might be some glitch while inputing multiple URLs. Can you do a test and update the README file

@Parthiban-3997 commented on GitHub (Mar 31, 2025): Sorry, I tried my best; there might be some glitch while inputing multiple URLs. Can you do a test and update the README file
Author
Owner

@eyurtsev commented on GitHub (Apr 1, 2025):

which IDE are you using?

@eyurtsev commented on GitHub (Apr 1, 2025): which IDE are you using?
Author
Owner

@Parthiban-3997 commented on GitHub (Apr 1, 2025):

Cursor

@Parthiban-3997 commented on GitHub (Apr 1, 2025): Cursor
Author
Owner

@rlancemartin commented on GitHub (Apr 1, 2025):

Right, IIUC it's prompting. the Code Agents are still a bit "dumb" when given many choices of llms.txt files.

I just add something like this to my cursor rules:

use the langgraph-docs-mcp server to help answer questions -- 
+ for LangGraph questions use LangGraph:https://langchain-ai.github.io/langgraph/llms.txt
+ for LangChain questions use LangChain:https://python.langchain.com/llms.txt
+ for HuggingFace accelerate questions use HuggingFace_Accelerate:https://huggingface-projects-docs-llms-txt.hf.space/accelerate/llms.txt
+ for other HuggingFace questions use the relevant HuggingFace documetnation (for Hub, Diffusers, Space, Transformers)
+ call list_doc_sources tool to get the available llms.txt file
+ call fetch_docs tool to read it
+ reflect on the urls in llms.txt 
+ reflect on the input question 
+ call fetch_docs on any urls relevant to the question
+ use this to answer the question

I can get the correct retrieval in this case.

We should think about ways of baking this into the MCP server.

For example a step to reflect on the URLs and infer question routing based on the URL names.

Image

@rlancemartin commented on GitHub (Apr 1, 2025): Right, IIUC it's prompting. the Code Agents are still a bit "dumb" when given many choices of llms.txt files. I just add something like this to my cursor rules: ``` use the langgraph-docs-mcp server to help answer questions -- + for LangGraph questions use LangGraph:https://langchain-ai.github.io/langgraph/llms.txt + for LangChain questions use LangChain:https://python.langchain.com/llms.txt + for HuggingFace accelerate questions use HuggingFace_Accelerate:https://huggingface-projects-docs-llms-txt.hf.space/accelerate/llms.txt + for other HuggingFace questions use the relevant HuggingFace documetnation (for Hub, Diffusers, Space, Transformers) + call list_doc_sources tool to get the available llms.txt file + call fetch_docs tool to read it + reflect on the urls in llms.txt + reflect on the input question + call fetch_docs on any urls relevant to the question + use this to answer the question ``` I can get the correct retrieval in this case. We should think about ways of baking this into the MCP server. For example a step to reflect on the URLs and infer question routing based on the URL names. ![Image](https://github.com/user-attachments/assets/42f21684-a5ef-4901-b1ed-ad0bb59cbeab)
Author
Owner

@Parthiban-3997 commented on GitHub (Apr 1, 2025):

Thanks it worked !!

@Parthiban-3997 commented on GitHub (Apr 1, 2025): Thanks it worked !!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/mcpdoc#2