Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add znlgis/opengis-skills --skill langchaingit clone --depth 1 https://github.com/znlgis/opengis-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/znlgis/opengis-skills/langchain)<a href="https://agentmods.dev/skills/znlgis/opengis-skills/langchain"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/langchain/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/langchain"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/langchain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00093 | $0.05101 |
| Opus 5.5 | $0.00037 | $0.02040 |
| Sonnet 5.5 | $0.00019 | $0.01020 |
| Haiku 4.5 | $0.00009 | $0.00510 |
Grade A, and why
langchain scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
proc = subprocess.run(args, capture_output=True, text=True, timeout=120) How it starts
The opening of the file, as written. The whole thing — 438 lines — stays where its author put it; the contents beside it link to each section on GitHub.
项目地址: https://github.com/langchain-ai/langchain
官方文档: https://python.langchain.com/(现重定向至 https://docs.langchain.com/oss/python/langchain/overview)
许可证: MIT
最新版本: langchain 1.4.10、langchain-core 1.7.7(截至 2026-11,PyPI 实测,2026-11-10 发布;LangChain 已按包独立发版,GitHub Release 标签跟随最新发布包)
概述
LangChain 是用于构建 LLM 应用的 Python 框架,1.x 起以 LangGraph 为运行时,官方推荐入口为 create_agent 与 LCEL 管道语法。
- 模型层:
init_chat_model统一初始化 OpenAI / Anthropic / Google / DeepSeek / Ollama 等模型 - LCEL:
prompt | model | parser声明式组合 Runnable,天然支持invoke / batch / stream - Agents:
create_agent构建工具调用循环(Tool Calling Loop),基于 LangGraph 图执行 - Tools:
@tool装饰器把 Python 函数暴露给模型 - RAG:文档加载(langchain-community)→ 切分(langchain-text-splitters)→ 向量库 → 检索器
- 记忆:短期会话用 checkpointer +
thread_id;长期记忆用 store(均来自 LangGraph) - 包拆分:主包 langchain、接口层 langchain-core、社区集成 langchain-community、各 provider 独立包
包家族与版本(2026-11):
| 包 | 内容 | 当前版本 |
|---|---|---|
| langchain | 主包:agents、chat_models、tools | 1.4.10 |
| langchain-core | Runnable/LCEL、消息、提示词、解析器、向量库接口 | 1.7.7 |
| langgraph | 运行时:checkpointer、store | 1.2.20 |
| langchain-community | 社区集成:文档加载器、向量库 | 0.4.2 |
| langchain-openai | OpenAI / Azure 集成 | 1.7.4 |
| langchain-text-splitters | 文本切分器 | 1.1.3 |
| langchain-classic | 旧版链与 memory(兼容维护) | 1.0.8 |
1.4.10 / 1.7.7 补丁要点(可选读):langchain 1.4.10 把中间件内部的模型调用从消息流上摘下、
ModelRefusalMiddleware不再上报 trace 输入;langchain-core 1.7.7 给load()加了嵌套深度上限(反序列化安全)。均无破坏性 API 变更。
环境准备
安装
# pip(要求 Python >= 3.10,官方 quickstart 建议 3.11)
pip install -U langchain
# provider 集成是 extras,按需安装
pip install -U "langchain[openai]"
pip install -U "langchain[deepseek]"
pip install -U "langchain[community]" # 文档加载器等社区集成
# RAG 常用配套
pip install -U langchain-text-splitters langchain-postgres pypdf
# uv(官方推荐流程)
uv python pin 3.11
uv init
uv add langchain
uv sync
API Key 配置
export OPENAI_API_KEY="sk-..."
export DEEPSEEK_API_KEY="sk-..." # 使用 DeepSeek 时
export ANTHROPIC_API_KEY="sk-ant-..." # 使用 Claude 时
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 19d ago Changed · +2 lines 2e4f4543ab61
- 21d ago Changed · -5 lines 8e1453234c10
- 1mo ago Changed · -1 lines f3970e3a48ec
- 1mo ago First seen · 442 lines · 93 tokens per session scan A 62f3bfd31234
langchain is a skill published in the GitHub repository znlgis/opengis-skills (87 stars, last pushed 20d ago), licensed MIT. It adds 93 tokens to every session and 5,101 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.
langchain compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| langchainznlgis/opengis-skills | Skill | 87 | 20d ago | MIT | A | 93 | Claude Code, Codex |
| dspyopenamer/openamer | Skill | 10 | yesterday | Apache-2.0 | A | 19 | Claude Code, Codex |
| dspyNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 19 | Claude Code, Codex |
| ai-engineering-toolkitsickn33/agentic-awesome-skills | Skill | 51k | today | MIT | A | 47 | Claude Code |
| llm-app-patternsdavila7/claude-code-templates | Skill | 35k | today | MIT | A | 54 | Claude Code, Codex |
| thinking-out-loudShubhamsaboo/awesome-llm-apps | Skill | 146k | yesterday | Apache-2.0 | A | 206 | Claude Code, Codex |
| ai-productsickn33/agentic-awesome-skills | Skill | 51k | today | MIT | A | 22 | Claude Code |