Index of every page on this site: llms.txt
All skills
langchain-ai avatar

/langgraph-fundamentals

@7a385cd official
Run it yourself

Retired skill, replaced by `langchain-build-agent`. Use for building LangGraph graphs, state, nodes, and edges: it tells you to switch to `langchain-build-agent`.

Use this Skill: https://skilld.dev/gh/langchain-ai/langchain-skills/langgraph-fundamentals

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈47 tokens for metadata: the name and description. ≈123 when used: this file.

Description uses 2.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈187 characters, or 2.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

langgraph-fundamentals (retired)

langgraph-fundamentals was retired from langchain-skills. Use the langchain-build-agent skill instead.

  1. If langchain-build-agent is available, use it for this task.

  2. Otherwise, install it, then use it:

    npx skills add langchain-ai/langchain-skills --skill langchain-build-agent --yes
  3. Tell the user that langgraph-fundamentals is retired and that they can remove it with npx skills remove langgraph-fundamentals.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warningtoday5 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    This skill is a retired utility designed to guide users to an updated version. It includes considerations for external downloads and command execution for skill management, both of which target official vendor resources as part of its intended migration purpose.

  • Sockettoday

    No alerts

  • Snyk1d

    Risk: MEDIUM · 1 issue

  • Runlayer8mo

    1 file scanned · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 7a385cd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated yesterday
metadata
{
  "internal": "true"
}
  • Python
  • TypeScript
  • langgraph
  • state-management
  • workflow-orchestration
  • agent-patterns
  • graph-based-systems
  • conditional-routing

README badge

README badge for langchain-ai/langchain-skills/langgraph-fundamentals

Builds directed graph workflows using StateGraph, nodes, edges, and state schemas with reducers. Covers state design, node function signatures, conditional routing with Command, and compilation — essential for any LangGraph application in Python or TypeScript.

Generated from the current SKILL.md.

What is a reducer and when do I need one?
A reducer controls how state updates are merged. Use one when a field should accumulate values (like appending to a list or summing integers) rather than overwriting. Without a reducer, returning a list from a node will overwrite the previous value instead of appending to it.
What should a node function return?
Node functions must return a partial update (a dict with only the fields being changed), not the full state object. Returning the entire state object or mutating state in place will cause errors.
When should I use Command instead of add_edge or add_conditional_edges?
Use Command when you need to update state and decide the next node to route to in a single return value. This is cleaner than using separate conditional edges when the routing decision depends on computed state changes.
What arguments can a node function accept?
A node can accept just state, or state plus config (to access thread_id or configurable values), or state plus runtime (for Python only, to access context and store). The signature determines what information is available to the node.
Do I need to compile a graph before running it?
Yes. Graphs must be compiled with .compile() before invoking or streaming them. Compilation prepares the graph for execution.

Generated from the current SKILL.md. These answers refresh after source changes.