Skip to main content
Back to registry

langgraph-fundamentals

langchain-ai/langchain-skills

Graphs must be compile() d before execution.

Installs1
Install command
npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-fundamentals
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykPASS
About this skill
Graphs must be compile() d before execution. Follow these 5 steps when building a new graph: class State(TypedDict): name: str # Default: overwrites on update messages: Annotated[list, operator.add] # Appends to list total: Annotated[int, operator.add] # Sums integers from typing import Annotated import operator class State(TypedDict): messages: Annotated[list, operator.add] def my_node(state: State) -> dict: return {"field": "updated"} Node functions accept these arguments: class State(TypedDict): input: str output: str def process_input(state: State) -> dict: return {"output": f"Processed: {state['input']}"} def finalize(state: State) -> dict: return {"output": state["output"].upper()} graph = ( StateGraph(State) .add_node("process", process_input) .add_node("finalize", finalize) .add_edge(START, "process") .add_edge("process", "finalize") .add_edge("finalize", END) .compile() ) result = graph.invoke({"input": "hello"}) print(result["output"]) # "PROCESSED: HELLO" class State(TypedDict): query: str route: str result: str def classify(state: State) -> dict: if "weather" in state["query"].lower(): return {"route": "weather"} return {"route": "general"} def route_query(state: State) -> Literal["weather", "general"]: return state["route"] graph = ( StateGraph(State) .add_node("classify", classify) .add_node("weather", lambda s: {"result": "Sunny, 72F"}) .add_node("general",...

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does langgraph-fundamentals do?

Graphs must be compile() d before execution.

Is langgraph-fundamentals good?

langgraph-fundamentals does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does langgraph-fundamentals work with?

langgraph-fundamentals currently lists compatibility with codex, gemini-cli, opencode, cursor, github-copilot, claude-code.

What are alternatives to langgraph-fundamentals?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install langgraph-fundamentals?

npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-fundamentals

Related skills

More from langchain-ai/langchain-skills

Related skills

Alternatives in Software Engineering