← 返回 Skills 市场
zachysun

langgraph-for-agents

作者 zachysun · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
145
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install langgraph-for-agents
功能描述
Use LangGraph/LangChain to build agents
使用说明 (SKILL.md)

\r \r

LangGraph for Agents\r

\r

When to use\r

  • Use this skill when the user asks to build agents or multi-agent systems using LangGraph/LangChain.\r \r

How to refer\r

Integrated Reference Examples\r

Read the examples in "./references/" to understand common patterns. \r Start with "./references/README.md" for an overview, then read the target file, it will show more details.\r \r !Important: \r To build an agent, API_KEY credentials is necessary. \r This is user privacy, please do not hard-code it, just hold a placeholder, e.g. API_KEY=your-api-key, and let the user manage the actual keys.\r \r

External Resources\r

[Search]\r If the "search" tool is available, you can refine the query keywords and execute the search.\r \r [Browse]\r If the "browse" tool is available, you can visit the following three websites:\r

Project Structure\r

For demos or tests, use a single .py file. For production-grade applications, use:\r

├── app/                      \r
│   ├── api/        # API endpoints\r
│   ├── backend/    # LangGraph/LangChain logic\r
│   └── frontend/   # User interface\r
├── .env.example\r
├── requirements.txt\r
└── README.md\r
```\r
\r
## Process for Agent System Design\r
### Step 1: Determine System Level\r
- Single-Agent System: Focus on the internal structure of one agent.\r
- Multi-Agent System: Focus on collaboration and communication between multiple agents.\r
\r
### Step 2: Choose Framework\r
- LangGraph: Best for stateful, complex workflows.\r
- LangChain: Best for standard agent patterns based on tool calling.\r
\r
### Step 3: Design Specific Implementation\r
#### For Single-Agent Systems:\r
- With LangGraph: Build a workflow with several nodes, or implement a ReAct Agent with manual tool_node.\r
- With LangChain: Build a ReAct Agent by `create_agent` API.\r
\r
#### For Multi-Agent Systems:\r
- With LangGraph:\r
  - Option 1: Treat each node as an independent agent, connecting them via the Graph API.\r
  - Option 2: Encapsulate a multi-node workflow as a single agent, calling other agents as tools.\r
\r
- With LangChain:\r
  - Create a main ReAct Agent and encapsulate other agents as tools for collaboration.\r
\r
## Build Philosophy\r
- Prefer Native: Check if a tool or integration already exists in LangChain before custom building.\r
- Single File First: Keep core logic in one file initially to simplify debugging.\r
- Clean Code: Provide only essential comments and use clear, descriptive variable names.\r
- Real Data: Use actual API URLs and schemas whenever possible.\r
安全使用建议
This skill is a collection of example code and a guidance document for building agents with LangGraph/LangChain. Things to consider before installing or using it: - Missing credential declaration: The registry metadata lists no required env vars, but the examples repeatedly call load_dotenv() and use os.getenv('your-api-key'). Confirm which exact environment variables you must set (and where) before running anything. Do not paste real API keys into example files; follow the SKILL.md advice to use placeholders and let the user supply keys at runtime. - Dependencies are not documented: The references import many third-party packages (langchain, langgraph, bs4, pydantic, etc.). Expect to install these to execute the examples — the skill metadata does not provide an install spec. Only read the examples unless you intentionally install and run their dependencies. - Exercise caution running examples: Several example scripts demonstrate risky patterns if executed as-is. For example, references/langchain_chatmodel_custom_tool.py defines a calculator tool using eval(), which can execute arbitrary Python code. Avoid running provided tools or code directly on untrusted input. - External fetch URL: SKILL.md suggests fetching content from a context7.com URL. That is not an official project domain and may be a mirrored or scraped page. Verify any fetched content before using it. - If you want to use this skill safely: treat it as documentation only (read-only). If you intend to run examples, inspect them carefully, create a controlled environment (isolated VM/container), install only the dependencies you trust, and ensure you provide credentials via secure secrets management rather than embedding them in files. If you want stronger assurance, ask the author to (1) list exact environment variables required and their purpose, (2) provide a requirements.txt or install spec, (3) remove or flag code that uses eval or other risky constructs, and (4) replace third-party fetch links with official documentation URLs.
功能分析
Type: OpenClaw Skill Name: langgraph-for-agents Version: 1.0.2 The skill bundle is a comprehensive collection of LangGraph and LangChain educational examples. It is classified as suspicious due to a critical Remote Code Execution (RCE) vulnerability in 'references/langchain_chatmodel_custom_tool.py', where the 'eval()' function is used to execute user-provided strings within a 'calculator' tool. While this appears to be an unintentional security flaw common in coding tutorials rather than intentional malware, it represents a high-risk capability. The rest of the bundle, including 'SKILL.md' and various workflow examples, follows standard practices for agent development and emphasizes safe API key management.
能力评估
Purpose & Capability
The name/description and the reference code files all focus on LangGraph/LangChain agent patterns, which is coherent. However, the bundle contains many example scripts that import numerous third-party libraries (langchain_openai, langgraph, langchain_community, pydantic, bs4, etc.) even though the skill declares no required binaries, packages, or env vars in its metadata; this is a mismatch between claimed minimal requirements and the examples' real dependency surface.
Instruction Scope
SKILL.md instructs the agent to read the ./references examples (README + sample .py files) and to use placeholder API_KEY values rather than hard-coding secrets. It also suggests using search/browse/fetch tools if available and points to a specific external URL (https://context7.com/...). The instructions do not explicitly tell the agent to execute the example code, but they do encourage reading and potentially fetching external content; that external fetch target is not the official project docs and may be a scraped/third-party mirror.
Install Mechanism
There is no install spec (instruction-only), which minimizes install-time risk. However, the included reference scripts require many runtime packages; the absence of an install specification or dependency list in the metadata is surprising and could mislead users about what must be installed to actually run the examples.
Credentials
The skill metadata declares no required environment variables, yet every reference file calls load_dotenv() and uses os.getenv('your-api-key') repeatedly. SKILL.md mentions a generic API_KEY placeholder but doesn't declare the exact env var name. This mismatch is misleading: the examples clearly require credentials to call LLMs but the registry entry doesn't request or document any specific credential names. Additionally, some example code uses eval() (calculator tool) which could execute untrusted input if the examples were run.
Persistence & Privilege
The skill does not request always:true, does not declare system config paths or attempt to modify other skills, and is user-invocable with normal agent invocation allowed. No elevated persistence or privilege is requested in the metadata.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install langgraph-for-agents
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /langgraph-for-agents 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Omit the name of specific LLM providers.
v1.0.1
- Added guidance about managing API keys: clearly state that API credentials are necessary and should only be used as placeholders, not hard-coded. - Emphasized user privacy by instructing not to hard-code sensitive information. - No functional or structural changes to usage instructions or project layout.
v1.0.0
Initial release of langgraph-for-agents. - Provides guidance for building agents and multi-agent systems using LangGraph/LangChain. - Details step-by-step agent system design, including when to choose LangGraph vs. LangChain. - Includes directory structure suggestions for demos and production applications. - Offers references (integrated and external) for best practices and further learning. - Recommends build philosophy: prefer native tools, begin with a single file, maintain clean code, and use real data/APIs.
元数据
Slug langgraph-for-agents
版本 1.0.2
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 3
常见问题

langgraph-for-agents 是什么?

Use LangGraph/LangChain to build agents. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 145 次。

如何安装 langgraph-for-agents?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install langgraph-for-agents」即可一键安装,无需额外配置。

langgraph-for-agents 是免费的吗?

是的,langgraph-for-agents 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

langgraph-for-agents 支持哪些平台?

langgraph-for-agents 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 langgraph-for-agents?

由 zachysun(@zachysun)开发并维护,当前版本 v1.0.2。

💬 留言讨论