Token导航 LogoToken导航

Agent Skill · 研究检索

langgraph(langgraph 图表绘制)

langgraph 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

langgraph 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 7,528。

总安装 18,745周安装 751GitHub Stars 35,715下载 6,068核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:langgraph(langgraph 图表绘制)
来源仓库:https://github.com/sickn33/antigravity-awesome-skills
仓库路径:skills/langgraph
安装命令:
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill langgraph
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill langgraph

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于构建具有显式图形结构的有状态、多参与者 AI 应用程序的生产级框架。

支持使用 StateGraph 进行图形构建、条件路由、循环和复杂代理工作流程的分支 包括带有减速器的状态管理、持久性检查点和人机循环模式 跨共享状态的多个代理处理工具集成、流式传输和异步执行 需要 Python 3.9+、langgraph 包和 LLM API 访问权限(OpenAI、Anthropic 等)

来源仓库内路径:skills/langgraph

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill lan…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

langgraph 怎么安装?

在终端执行 npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill langgraph。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

langgraph 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

langgraph 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

langgraph 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

langgraph 用的人多吗?

公开数据是累计安装 18,745 次,近一周安装 751 次,下载 6,068 次,GitHub 35,715 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

langgraph 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 来源仓库有 35,715 星,维护活跃度相对可查。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
langgraph

langgraph 图表绘制 · 本页

18,74535,715调用外部服务MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

LangGraph

Expert in LangGraph - the production-grade framework for building stateful, multi-actor AI applications. Covers graph construction, state management, cycles and branches, persistence with checkpointers, human-in-the-loop patterns, and the ReAct agent pattern. Used in production at LinkedIn, Uber, and 400+ companies. This is LangChain's recommended approach for building agents.

Role: LangGraph Agent Architect

You are an expert in building production-grade AI agents with LangGraph. You understand that agents need explicit structure - graphs make the flow visible and debuggable. You design state carefully, use reducers appropriately, and always consider persistence for production. You know when cycles are needed and how to prevent infinite loops.

Expertise

  • Graph topology design
  • State schema patterns
  • Conditional branching
  • Persistence strategies
  • Human-in-the-loop
  • Tool integration
  • Error handling and recovery

Capabilities

  • Graph construction (StateGraph)
  • State management and reducers
  • Node and edge definitions
  • Conditional routing
  • Checkpointers and persistence
  • Human-in-the-loop patterns
  • Tool integration
  • Streaming and async execution

Prerequisites

  • 0: Python proficiency
  • 1: LLM API basics
  • 2: Async programming concepts
  • 3: Graph theory fundamentals
  • Required skills: Python 3.9+, langgraph package, LLM API access (OpenAI, Anthropic, etc.), Understanding of graph concepts

Scope

  • 0: Python-only (TypeScript in early stages)
  • 1: Learning curve for graph concepts
  • 2: State management complexity
  • 3: Debugging can be challenging

Ecosystem

Primary

  • LangGraph
  • LangChain
  • LangSmith (observability)

Common_integrations

  • OpenAI / Anthropic / Google
  • Tavily (search)
  • SQLite / PostgreSQL (persistence)
  • Redis (state store)

Platforms

  • Python applications
  • FastAPI / Flask backends
  • Cloud deployments

Patterns

Basic Agent Graph

Simple ReAct-style agent with tools

When to use: Single agent with tool calling

from typing import Annotated, TypedDict from langgraph.graph import StateGraph, START, END from langgraph.graph.message import add_messages from langgraph.prebuilt import ToolNode from langchain_openai import ChatOpenAI from langchain_core.tools import tool

1. Define State

class AgentState(TypedDict): messages: Annotated[list, add_messages] # add_messages reducer appends, doesn't overwrite

2. Define Tools

@tool def search(query: str) -> str: """Search the web for information.""" # Implementation here return f"Results for: {query}"

@tool def calculator(expression: str) -> str: """Evaluate a math expression.""" return str(eval(expression))

tools = [search, calculator]

3. Create LLM with tools

llm = ChatOpenAI(model="gpt-4o").bind_tools(tools)

4. Define Nodes

def agent(state: AgentState) -> dict: """The agent node - calls LLM.""" response = llm.invoke(state["messages"]) return {"messages": [response]}

Tool node handles tool execution

tool_node = ToolNode(tools)

5. Define Routing

def should_continue(state: AgentState) -> str: """Route based on whether tools were called.""" last_message = state["messages"][-1] if last_message.tool_calls: return "tools" return END

6. Build Graph

graph = StateGraph(AgentState)

Add nodes

graph.add_node("agent", agent) graph.add_node("tools", tool_node)

Add edges

graph.add_edge(START, "agent") graph.add_conditional_edges("agent", should_continue, ["tools", END]) graph.add_edge("tools", "agent") # Loop back

Compile

app = graph.compile()

7. Run

result = app.invoke({"messages": [("user", "What is 25 * 4?")]})

State with Reducers

Complex state management with custom reducers

When to use: Multiple agents updating shared state

from typing import Annotated, TypedDict from operator import add from langgraph.graph import StateGraph

Custom reducer for merging dictionaries

def merge_dicts(left: dict, right: dict) -> dict: return {left, right}

State with multiple reducers

class ResearchState(TypedDict): # Messages append (don't overwrite) messages: Annotated[list, add_messages]

# Research findings merge
findings: Annotated[dict, merge_dicts]

# Sources accumulate
sources: Annotated[list[str], add]

# Current step (overwrites - no reducer)
current_step: str

# Error count (custom reducer)
errors: Annotated[int, lambda a, b: a + b]

Nodes return partial state updates

def researcher(state: ResearchState) -> dict: # Only return fields being updated return {"findings": {"topic_a": "New finding"}, "sources": ["source1.com"], "current_step": "researching"}

def writer(state: ResearchState) -> dict: # Access accumulated state all_findings = state["findings"] all_sources = state["sources"]

return {
    "messages": [("assistant", f"Report based on {len(all_sources)} sources")],
    "current_step": "writing"
}

Build graph

graph = StateGraph(ResearchState) graph.add_node("researcher", researcher) graph.add_node("writer", writer)

... add edges

Conditional Branching

Route to different paths based on state

When to use: Multiple possible workflows

from langgraph.graph import StateGraph, START, END

class RouterState(TypedDict): query: str query_type: str result: str

def classifier(state: RouterState) -> dict: """Classify the query type.""" query = state["query"].lower() if "code" in query or "program" in query: return {"query_type": "coding"} elif "search" in query or "find" in query: return {"query_type": "search"} else: return {"query_type": "chat"}

def coding_agent(state: RouterState) -> dict: return {"result": "Here's your code..."}

def search_agent(state: RouterState) -> dict: return {"result": "Search results..."}

def chat_agent(state: RouterState) -> dict: return {"result": "Let me help..."}

Routing function

def route_query(state: RouterState) -> str: """Route to appropriate agent.""" query_type = state["query_type"] return query_type # Returns node name

Build graph

graph = StateGraph(RouterState)

graph.add_node("classifier", classifier) graph.add_node("coding", coding_agent) graph.add_node("search", search_agent) graph.add_node("chat", chat_agent)

graph.add_edge(START, "classifier")

Conditional edges from classifier

graph.add_conditional_edges("classifier", route_query, {"coding": "coding", "search": "search", "chat": "chat"})

All agents lead to END

graph.add_edge("coding", END) graph.add_edge("search", END) graph.add_edge("chat", END)

app = graph.compile()

Persistence with Checkpointer

Save and resume agent state

When to use: Multi-turn conversations, long-running agents

from langgraph.graph import StateGraph from langgraph.checkpoint.sqlite import SqliteSaver from langgraph.checkpoint.postgres import PostgresSaver

SQLite for development

memory = SqliteSaver.from_conn_string(":memory:")

Or persistent file

memory = SqliteSaver.from_conn_string("agent_state.db")

PostgreSQL for production

memory = PostgresSaver.from_conn_string(DATABASE_URL)

Compile with checkpointer

app = graph.compile(checkpointer=memory)

Run with thread_id for conversation continuity

config = {"configurable": {"thread_id": "user-123-session-1"}}

First message

result1 = app.invoke({"messages": [("user", "My name is Alice")]}, config=config)

Second message - agent remembers context

result2 = app.invoke({"messages": [("user", "What's my name?")]}, config=config)

Agent knows name is Alice!

Get conversation history

state = app.get_state(config) print(state.values["messages"])

List all checkpoints

for checkpoint in app.get_state_history(config): print(checkpoint.config, checkpoint.values)

Human-in-the-Loop

Pause for human approval before actions

When to use: Sensitive operations, review before execution

from langgraph.graph import StateGraph, START, END

class ApprovalState(TypedDict): messages: Annotated[list, add_messages] pending_action: dict | None approved: bool

def agent(state: ApprovalState) -> dict: # Agent decides on action action = {"type": "send_email", "to": "user@example.com"} return {"pending_action": action, "messages": [("assistant", f"I want to: {action}")]}

def execute_action(state: ApprovalState) -> dict: action = state["pending_action"] # Execute the approved action result = f"Executed: {action['type']}" return {"messages": [("assistant", result)], "pending_action": None}

def should_execute(state: ApprovalState) -> str: if state.get("approved"): return "execute" return END # Wait for approval

Build graph

graph = StateGraph(ApprovalState) graph.add_node("agent", agent) graph.add_node("execute", execute_action)

graph.add_edge(START, "agent") graph.add_conditional_edges("agent", should_execute, ["execute", END]) graph.add_edge("execute", END)

Compile with interrupt_before for human review

app = graph.compile(checkpointer=memory, interrupt_before=["execute"] # Pause before execution)

Run until interrupt

config = {"configurable": {"thread_id": "approval-flow"}} result = app.invoke({"messages": [("user", "Send report")]}, config)

Agent paused - get pending state

state = app.get_state(config) pending = state.values["pending_action"] print(f"Pending: {pending}") # Human reviews

Human approves - update state and continue

app.update_state(config, {"approved": True}) result = app.invoke(None, config) # Resume

Parallel Execution (Map-Reduce)

Run multiple branches in parallel

When to use: Parallel research, batch processing

from langgraph.graph import StateGraph, START, END, Send from langgraph.constants import Send

class ParallelState(TypedDict): topics: list[str] results: Annotated[list[str], add] summary: str

def research_topic(state: dict) -> dict: """Research a single topic.""" topic = state["topic"] result = f"Research on {topic}..." return {"results": [result]}

def summarize(state: ParallelState) -> dict: """Combine all research results.""" all_results = state["results"] summary = f"Summary of {len(all_results)} topics" return {"summary": summary}

def fanout_topics(state: ParallelState) -> list[Send]: """Create parallel tasks for each topic.""" return [Send("research", {"topic": topic}) for topic in state["topics"]]

Build graph

graph = StateGraph(ParallelState) graph.add_node("research", research_topic) graph.add_node("summarize", summarize)

Fan out to parallel research

graph.add_conditional_edges(START, fanout_topics, ["research"])

All research nodes lead to summarize

graph.add_edge("research", "summarize") graph.add_edge("summarize", END)

app = graph.compile()

result = app.invoke({"topics": ["AI", "Climate", "Space"], "results": []})

Research runs in parallel, then summarizes

Collaboration

Delegation Triggers

  • crewai|role-based|crew -> crewai (Need role-based multi-agent approach)
  • observability|tracing|langsmith -> langfuse (Need LLM observability)
  • structured output|json schema -> structured-output (Need structured LLM responses)
  • evaluate|benchmark|test agent -> agent-evaluation (Need to evaluate agent performance)

Production Agent Stack

Skills: langgraph, langfuse, structured-output

Workflow:

1. Design agent graph with LangGraph
2. Add structured outputs for tool responses
3. Integrate Langfuse for observability
4. Test and monitor in production

Multi-Agent System

Skills: langgraph, crewai, agent-communication

Workflow:

1. Design agent roles (CrewAI patterns)
2. Implement as LangGraph with subgraphs
3. Add inter-agent communication
4. Orchestrate with supervisor pattern

Evaluated Agent

Skills: langgraph, agent-evaluation, langfuse

Workflow:

1. Build agent with LangGraph
2. Create evaluation suite
3. Monitor with Langfuse
4. Iterate based on metrics

Related Skills

Works well with: crewai, autonomous-agents, langfuse, structured-output

When to Use

  • User mentions or implies: langgraph
  • User mentions or implies: langchain agent
  • User mentions or implies: stateful agent
  • User mentions or implies: agent graph
  • User mentions or implies: react agent
  • User mentions or implies: agent workflow
  • User mentions or implies: multi-step agent

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

平台分布

Claude Code

28.46%
按下载量换算1,727

Antigravity

23.01%
按下载量换算1,396

OpenCode

17.51%
按下载量换算1,063

Gemini CLI

13.29%
按下载量换算806

Cursor

7.65%
按下载量换算464

Codex

3.1%
按下载量换算188

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills