Why use LangChain with Alchemyst AI?
LangChain is a popular open-source framework for building context-aware AI applications in JavaScript and TypeScript. It lets you chain together LLMs, retrievers, memory, and tools to create powerful, production-ready AI agents. However, LLMs alone are “forgetful”—they don’t remember previous conversations, business rules, or your proprietary data. This is where context becomes critical. Without context, AI agents give generic, disconnected answers. With context, they become knowledgeable partners that can reason, personalize, and act based on your data and workflows. (See What is AI Context? and Why you need AI Context?) Alchemyst AI’s LangChain integration solves this by providing a plug-and-play retriever that connects your LangChain agents to the context stored in Alchemyst’s memory architecture. This means your agents can:- Instantly access relevant documents, files, and knowledge bases.
- Maintain both short-term and long-term memory across sessions.
- Personalize responses and follow complex workflows using your proprietary data.
- Avoid repetitive questions and deliver context-aware outputs.
Installation
To get started with the Alchemyst Langchain Integration, install the@alchemystai/langchain-js package from npm.
See Source
NOTE: In accordance with the release cycle of LangChain 1.0 release, we have decided to maintain the project separately, as discussed with the maintainers of Langchain Community as well.
Usage
As Retriever
TheAlchemystRetriever class can be used like any other Retriever class in LangChain. See the example below:
retriever.ts
As Memory
TheAlchemystMemory class can be used like any other Memory class in LangChain as well. See the example below:
memory.ts

