The libraries, and what runs here
Which LangChain.js and LangGraph.js packages an agent needs, what each one does, and how they run in a browser.
From one model call to a guarded agent, with LangChain.js and LangGraph.js, in your browser.
For developers starting with agents. You build one small support agent step by step: a model call, messages and state, a graph, tools, the agent loop, callbacks with human approval, and guardrails. Every chapter runs the real libraries in your browser with a scripted model, so you need no key; you can connect your own model when you want.
Which LangChain.js and LangGraph.js packages an agent needs, what each one does, and how they run in a browser.
Calling a chat model with LangChain.js, reading the AIMessage it returns, and using your own key safely.
The four message types, why the whole conversation is sent every time, and how LangGraph merges state with reducers.
Building a StateGraph from nodes and edges, routing with a conditional edge, and running it step by step.
Defining tools with zod, binding them to a model, and handling the tool calls the model makes.
A model node, a tool node and one conditional edge: the whole agent loop as a LangGraph graph.
Watching a run with callbacks, and pausing it before a risky tool so a person can approve or reject it.
Checks in code around the model: input and output checks, tool allow-lists and step caps, in layers.