Integrate Moss semantic search into LangChain using a custom retriever and agent tool. This setup lets you use Moss in standard LangChain RAG pipelines and agentic workflows with sub-10ms retrieval latency.Documentation Index
Fetch the complete documentation index at: https://docs.moss.dev/llms.txt
Use this file to discover all available pages before exploring further.
Note: For complete examples including RAG chains and ReAct agents, see the LangChain cookbook.
Why use Moss with LangChain?
LangChain’s retriever interface is the standard way to plug external knowledge into LLM chains. Moss delivers sub-10ms semantic search that slots directly into this interface, giving your chains and agents fast, accurate retrieval without the latency overhead of traditional vector databases.Required tools
Integration guide
Use as a retriever
The cookbook provides a
MossRetriever class that implements LangChain’s BaseRetriever interface. It loads the Moss index once and returns Document objects with metadata and relevance scores.