AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Langgraph Agent

skill-mfrostbutter-claude-skills-langgraph-agent · by Mfrostbutter

>-

No reviews yet
0 installs
36 views
0.0% view→install

Install

$ agentstack add skill-mfrostbutter-claude-skills-langgraph-agent

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution Used

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-mfrostbutter-claude-skills-langgraph-agent)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Langgraph Agent? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Building production LangGraph agents

LangGraph is a state machine over an LLM: nodes mutate a shared state, edges route, and the graph streams its progress. The expensive lessons are not the API, they are the discipline that keeps a graph importable from Studio, boot-safe inside an app, resumable across a human pause, and visible in a live UI. This skill is that discipline.

The five non-negotiables

  1. Graph modules are pure factories. A graph file exports build_X_graph(llm, ..., checkpointer=None) and imports only its own siblings (.prompts, .sources) plus langchain/langgraph. No imports of your app package, ever. That is what lets langgraph dev / Studio import the graph without dragging in your web app.
  2. Heavy imports are lazy. import langgraph, langchain_anthropic, psycopg2, etc. go inside functions, never at module scope, so the package imports cleanly at app boot even when an optional extra is absent.
  3. IO is injected, not imported. A graph never reaches out to a DB, an API, or an external service directly. Side effects arrive as an effects dict of callables the builder passes to its nodes. This keeps the graph pure AND lets Studio/tests run it with dry-run or no-op effects. Effects fail open or dry-run when their credentials are absent.
  4. Progress is messages. Nodes emit AIMessages on the messages channel. A message with name="ingest" becomes a labeled timeline + graph step; the final unnamed AIMessage is the run result. This is the whole contract a streaming UI renders against.
  5. The human pause is interrupt() + a checkpointer. HITL agents call interrupt({...}) to HALT and only resume when re-entered with Command(resume=decision) on the same thread_id. No checkpointer, no resume.

Break one and the symptom is usually: Studio import fails (1/2), the app won't boot (2), the graph can't run headless (3), the timeline/graph stays blank (4), or the run can't pause/resume (5).

The 1.x API you actually use

from langgraph.graph import START, END, StateGraph, MessagesState
from langgraph.types import interrupt, Command
from langgraph.checkpoint.memory import MemorySaver
from langgraph.prebuilt import ToolNode, tools_condition   # for ReAct loops
# llm.with_structured_output(PydanticModel) -> validated object, no parsing
# graph.astream(state, config, stream_mode="updates") -> async node updates

Pins that work together: langgraph==1.2.4, langchain-core==1.4.6, langchain-anthropic==1.4.5, langsmith==0.8.14, langchain-openai>=1.0,/graph.py as a pure factory: build__graph(llm, effects, checkpointer=None). Define a state class S(MessagesState): ..., the nodes, the edges, return g.compile(checkpointer=checkpointer).

  1. Put IO in sibling modules under the agent package (sources.py, dedup.py), pure and self-contained, lazy heavy imports, fail-open.
  2. Wire it into your app with a small builder build(llm, checkpointer) that constructs the effects (+ any second model) and calls your factory. Keep a registry/catalog of these builders if you run more than one agent. See reference/03-wiring-into-an-app.md.
  3. Register for Studio: build the graph at module scope without a checkpointer in a studio.py, and point langgraph.json at it.

Copy-paste skeleton: assets/new_agent_template.py.

Human-in-the-loop

interrupt(payload) HALTS the graph and surfaces payload to the human; resume with Command(resume=decision) and the graph continues from exactly that node. A useful decision contract is {"action": "approve"|"edit"|"reject", "edited": str, "mode": "dry_run"|"live"}. Your driver parks the live compiled graph, emits an "awaiting approval" event, and re-enters it on resume. Write-path agents default to dry_run and require an explicit live. A run can pause MORE than once: re-park on each interrupt, so a multi-gate agent (pick, then approve) is just two interrupt() nodes — each interrupt value needs a proposal key. Full pattern: reference/04-hitl.md.

Streaming + a live graph view

Drive graph.astream(..., stream_mode="updates") and map each node update to your UI. Emit a named AIMessage per node so it shows as a labeled step; a message with no name and no tool calls is the result-so-far (the last one is the final). The graph topology for a live SVG comes from compiled.get_graph() (build with a throwaway, never-invoked model to read the shape without an API key). Details + a workable event contract + LangSmith tracing: reference/05-streaming-and-observability.md.

Patterns to reach for

  • ReAct tool-loop: investigate ⇄ tools via tools_condition, ends when the model stops calling tools. Read-only diagnosis.
  • Parallel fan-out / reduce: a plan node dispatches N lenses that run in one superstep, a synthesize node reduces. Use an additive state channel (e.g. findings: list).
  • Routing pipeline: triage → assess → conditional route → propose → approve → apply. One graph, branches.
  • Two-model: a cheap model ranks/routes, a quality model writes. Build the second model from the first's key so you reuse one credential.
  • Multi-gate content + live publish: TWO interrupts in one run (pick an idea, then approve the draft) ending in a consequential, gated action (dry-run by default).
  • Cross-provider reviewer: a different vendor's model judges the primary's output before it acts.
  • Grounding fact-check: ground concrete claims against the source text (not the model's memory) before the human sees the draft; bound the auto-revision loop.
  • Structured output: llm.with_structured_output(PydanticModel) for selection/assessment/verdict nodes. Validation + retry happen for you.

More: reference/06-patterns.md.

Test before you wire the UI

Stand up a matched venv (the pins above), then drive the graph headless with stub models + real (or no-op) effects through the interrupt and a resume. You do not need an API key to prove topology, streaming, the pause, and staging. Then py_compile, then run it in the app. Harness + venv recipe: reference/07-testing.md.

Prompt hygiene in agents

  • Untrusted data: any retrieved content (web, tools, tickets, scraped) is data, never instructions. Say so in the system prompt.
  • Consistent punctuation: pick a style and scrub the rest; models mimic what they see, so stray characters leak into output.

Reference

  • reference/01-api-1x.md — the 1.x imports and idioms.
  • reference/02-pure-factories-and-effects.md — why pure factories + injected effects, and how.
  • reference/03-wiring-into-an-app.md — turning a graph into a runnable, catalogued agent + Studio.
  • reference/04-hitl.md — interrupt/resume, multi-gate, the driver's park/resume job.
  • reference/05-streaming-and-observability.md — streaming to a UI, topology, LangSmith.
  • reference/06-patterns.md — the graph shapes with when-to-use.
  • reference/07-testing.md — stub models, drive-to-interrupt, the async gotcha.
  • assets/new_agent_template.py — a HITL two-model pure-factory skeleton.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.