LangChain: the role it plays in my design
LangChain is the tools and model-access layer in the agents platform I am designing. It is in construction, in phase 0, and there is no code published yet.
What LangChain is
LangChain is a library for building applications on language models: it defines how a model is invoked, how a tool is described so the model can call it and how information-retrieval steps are chained.
How I use it in the design
In the AI agents platform for companies, the LLM is consumed through LangChain. The agent service exposes two LangChain tools and nothing else:
- The SQL Tool, which is the only access to the tables: read-only, with an allowlist, validated SQL, a timeout, a row limit and RLS.
- The Retrieval Tool, which fetches the top-k chunks of the documents, always within a tenant.
On top of the tools, LangGraph orchestrates which agent answers each question. LangChain provides the pieces; LangGraph decides the route.
Status
Related stack
- LangChain
- LangGraph
- Python
- PostgreSQL + pgvector