Agent skill · Audited from source
langgraph-fundamentals
skill · langchain-ai/langchain-skillsMIT licenceAudited 31 Oct 2026 · source a78b2e2257e3
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit a78b2e2257e3 and found no filesystem, network or shell access and no hard-coded secrets. What it does: INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.
Cite
Cite this page
ModelsAtlas. “langgraph-fundamentals (langchain-ai/langchain-skills)”. Retrieved 31 Oct 2026. https://modelsatlas.com/skills/langchain-ai/langgraph-fundamentals
Trust audit
Audit 0.4.1 · source read 31 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 16,667 of 17,602 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha a78b2e2257e3 · 31 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherlangchain-ai GitHub organizationOwner of the repository this skill is read from
- Source folderlangchain-ai/langchain-skills/config/skills/langgraph-fundamentalsThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdicta78b2e2257e3A new audit runs when the source changes
- Repository statusNot archivedLast push 1 day ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.
---
name: langgraph-fundamentals
description: "INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling."
---
<overview>
LangGraph models agent workflows as **directed graphs**:
- **StateGraph**: Main class for building stateful graphs
- **Nodes**: Functions that perform work and update state
- **Edges**: Define execution order (static or conditional)
- **START/END**: Special nodes marking entry and exit points
- **State with Reducers**: Control how state updates are merged
Graphs must be `compile()`d before execution.
</overview>
<design-methodology>
### Designing a LangGraph application
Follow these 5 steps when building a new graph:
1. **Map out discrete steps** — sketch a flowchart of your workflow. Each step becomes a node.
2. **Identify what each step does** — categorize nodes: LLM step, data step, action step, or user input step. For each, determine static context (prompt), dynamic context (from state), retry strategy, and desired outcome.
3. **Design your state** — state is shared memory for all nodes. Store raw data, format prompts on-demand inside nodes.
4. **Build your nodes** — implement each step as a function that takes state and returns partial updates.
5. **Wire it together** — connect nodes with edges, add conditional routing, compile with a checkpointer if needed.
</design-methodology>
<when-to-use-langgraph>
| Use LangGraph When | Use Alternatives When |
|-------------------|----------------------|
| Need fine-grained control over agent orchestration | Quick prototyping → LangChain agents |
| Building complex workflows with branching/loops | Simple stateless workflows → LangChain direct |
| Require human-in-the-loop, persistence | Batteries-included features → Deep Agents |
</when-to-use-langgraph>
---
## State Management
<state-update-strategies>
| Need | Solution | Example |
|------|----------|---------|
| Overwrite value | No reducer (default) | Simple fields like counters |
| Append to list | Reducer (operator.add / concat) | Message history, logs |
| Custom logic | Custom reducer function | Complex merging |
</state-update-strategies>
---
## Nodes
<node-function-signatures>
Node functions return partial state updates. Signatures for configuration and runtime access differ by language; use the applicable implementation reference.
</node-function-signatures>
---
## Edges
<edge-type-selection>
| Need | Edge Type | When to Use |
|------|-----------|-------------|
| Always go to same node | `add_edge()` | Fixed, deterministic flow |
| Route based on state | `add_conditional_edges()` | Dynamic branching |
| Update state AND route | `Command` | Combine logic in single node |
| Fan-out to multiple nodes | `Send` | Parallel processing with dynamic inputs |
</edge-type-selection>
---
## Command
Command combines state updates and routing in a single return value. Fields:
- **`update`**: State updates to apply (like returning a dict from a node)
- **`goto`**: Node name(s) to navigate to next
- **`resume`**: Value to resume after `interrupt()` — see human-in-the-loop skill
<command-return-type-annotations>
**Python**: Use `Command[Literal["node_a", "node_b"]]` as the return type annotation to declare valid goto destinations.
**TypeScript**: Pass `{ ends: ["node_a", "node_b"] }` as the third argument to `addNode` to declare valid goto destinations.
</command-return-type-annotations>
<warning-command-static-edges>
**Warning**: `Command` only adds **dynamic** edges — static edges defined with `add_edge` / `addEdge` still execute. If `node_a` returns `Command(goto="node_c")` and you also have `graph.add_edge("node_a", "node_b")`, **both** `node_b` and `node_c` will run.
</warning-command-static-edges>
---
## Send API
Fan-out with `Send`: return `[Send("worker", {...})]` from a conditional edge to spawn parallel workers. Requires a reducer on the results field.
---
## Running Graphs: Invoke and Stream
<invoke-basics>
Call `graph.invoke(input, config)` to run a graph to completion and return the final state.
</invoke-basics>
<stream-mode-selection>
| Mode | What it Streams | Use Case |
|------|----------------|----------|
| `values` | Full state after each step | Monitor complete state |
| `updates` | State deltas | Track incremental updates |
| `messages` | LLM tokens + metadata | Chat UIs |
| `custom` | User-defined data | Progress indicators |
</stream-mode-selection>
---
## Error Handling
Match the error type to the right handler:
<error-handling-table>
| Error Type | Who Fixes | Strategy | Example |
|---|---|---|---|
| Transient (network, rate limits) | System | `RetryPolicy(max_attempts=3)` | `add_node(..., retry_policy=...)` |
| LLM-recoverable (tool failures) | LLM | `ToolNode(tools, handle_tool_errors=True)` | Error returned as ToolMessage |
| User-fixable (missing info) | Human | `interrupt({"message": ...})` | Collect missing data (see HITL skill) |
| Unexpected | Developer | Let bubble up | `raise` |
</error-handling-table>
---
## Core boundaries
- Return partial state updates from nodes instead of mutating state directly.
- Route loops through a named node; `START` is entry-only.
- Define reducers for accumulated list fields; otherwise, the last write wins.
- Account for static edges when using `Command` with `goto`, because both routes execute.
## Implementation references
If writing, modifying, or debugging LangGraph code, determine the project's language from its existing files, then read the applicable reference before implementing:
- For Python, read [references/python.md](references/python.md).
- For TypeScript, read [references/typescript.md](references/typescript.md).
Read both only when the task covers both languages. For conceptual questions that require no code, do not load either reference.Excerpt, first 5,882 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit a78b2e2
git clone https://github.com/langchain-ai/langchain-skills git -C langchain-skills checkout a78b2e2257e3
The author documents no install command, so this uses the repository directly. Our verdict covers commit a78b2e2257e3 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
a78b2e2257e3
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/langchain-ai/langgraph-fundamentals/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
obra/superpowers
Use when creating new skills, editing existing skills, or verifying skills work before deployment
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Add this badge to your README
[](https://modelsatlas.com/skills/langchain-ai/langgraph-fundamentals/)
<a href="https://modelsatlas.com/skills/langchain-ai/langgraph-fundamentals/"><img src="https://modelsatlas.com/skills/langchain-ai/langgraph-fundamentals/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about langgraph-fundamentals
Is langgraph-fundamentals safe to install?
What can langgraph-fundamentals access on my machine?
How current is this page?
Sources
- github.com/langchain-ai/langchain-skills/tree/main/config/skills — the audited source at commit a78b2e2257e3 and every finding aboveObserved · 31 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- Is langgraph-fundamentals safe to install?
- What can langgraph-fundamentals access on my machine?
- How current is this page?