Get a framework for language agents as graphs, ideal for founders building AI-powered tools, backed by 3.0k+ GitHub stars
2,975 stars499 forksTypeScriptQuality 9/10Updated 6/2/2026100% free ยท open source
What it does
Langgraphjs allows you to build and train language agents that can understand and respond to user input in a more flexible and resilient way by representing their knowledge as graphs.
When to use it
โขWhen you need to create a conversational AI that can handle complex, open-ended user queries.
โขWhen you want to build a language model that can learn from and adapt to new data and user interactions.
โขWhen you're developing a chatbot or voice assistant that requires a high level of contextual understanding and conversational flow.
Quick start
1Install langgraphjs using npm by running `npm install langgraphjs` in your terminal.
2Import the library in your TypeScript project and create a new language agent using the `LangGraph` class.
3Define the nodes and edges of your graph by creating `Node` and `Edge` objects and adding them to your language agent.
4Train your language agent using a dataset of user interactions and evaluate its performance using metrics such as accuracy and F1 score.
Ready-to-paste prompt
const { LangGraph } = require('langgraphjs'); const graph = new LangGraph(); graph.addNode({ id: 'hello', text: 'Hello, how are you?' }); graph.addEdge({ from: 'hello', to: 'goodbye', text: 'Goodbye!' });
Topics
agents
ai
artificial-intelligence
generative-ai
llm
node
typescript
What's inside โ free to inspect
No purchase needed
Read the entire source before you build โ unlike paid marketplaces that hide it behind a buy button.