developing-langgraph-js-agents
Installation
SKILL.md
<essential_principles>
How LangGraph.js Agents Work
LangGraph decomposes agents into discrete nodes (functions) connected through shared state. Execution flows through a graph where nodes do work and edges determine what runs next.
1. State-First Design
State is the shared memory accessible to all nodes. Design state before nodes:
import { Annotation, MessagesAnnotation } from "@langchain/langgraph";