load_tools

load_tools is an agent for coding agents from xt765/LangChain-Chinese-Comment. It costs 0 tokens per session (488 once invoked), scanned A, original, MIT.

A compatibility module that loads LangChain's built-in tools by name from the community package. A tool is an external action an agent can call, such as a search or terminal operation.

In plain words
What is it for?
Use it to load named tools such as search, terminal, or human input tools, and to list the built-in tool names.
Why use it?
It avoids importing and constructing each supported tool implementation manually. It also keeps older import paths working after the tool implementations moved to another package.

Agent

Install

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.

agentmods
npx agentmods add agents/xt765/langchain-chinese-comment/load_tools
Clone the repo
git clone --depth 1 https://github.com/xt765/LangChain-Chinese-Comment

Wrote 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.

agentmods badge for load_tools

README.md
[![agentmods](https://agentmods.dev/badge/agents/xt765/langchain-chinese-comment/load_tools.svg)](https://agentmods.dev/agents/xt765/langchain-chinese-comment/load_tools)
Your own site
<a href="https://agentmods.dev/agents/xt765/langchain-chinese-comment/load_tools"><img src="https://agentmods.dev/badge/agents/xt765/langchain-chinese-comment/load_tools.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 488 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00488
Opus 5 $0.00000 $0.00244
Sonnet 5 $0.00000 $0.00098
Haiku 4.5 $0.00000 $0.00049

Measured 3d ago against content hash 337e89958bb2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

load_tools scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

code_comment/libs/langchain/langchain_classic/agents/load_tools.md · 45 lines

What it actually says

libs\langchain\langchain_classic\agents\load_tools.py

此文档提供了 libs\langchain\langchain_classic\agents\load_tools.py 文件的详细中文注释。该模块定义了如何动态加载 LangChain 预定义的工具。

功能描述

该模块是工具加载系统的代理层。它本身不包含具体的工具加载逻辑,而是利用 create_importer 将请求转发到 langchain_community

动态导入机制

1. 实现逻辑

_importer = create_importer(
    __package__,
    fallback_module="langchain_community.agent_toolkits.load_tools",
)

def __getattr__(name: str) -> Any:
    return _importer(name)
  • create_importer: 创建一个智能导入器。
  • fallback_module: 指定当在当前包找不到目标属性时,应跳转到的目标模块:langchain_community.agent_toolkits.load_tools
  • getattr: Python 的特殊方法。当用户尝试访问模块中不存在的属性(如 load_tools)时,该方法会被触发,并由 _importer 完成实际的查找和加载。

2. 核心功能

该模块主要导出了以下(动态加载的)功能:

  • load_tools: 最核心的工具加载函数。允许通过字符串名称(如 "arxiv", "terminal", "human")快速实例化工具。
  • get_all_tool_names: 获取所有支持的内置工具名称列表。

迁移与背景

  • 解耦设计: 将具体工具实现移动到 langchain_community 是 LangChain 0.1.0 架构调整的重要部分。
  • 透明性: 对于开发者而言,从 langchain_classic.agents.load_tools 导入 load_tools 仍然有效,但底层实际上是在运行社区包的代码。

使用建议

虽然旧路径仍然有效,但为了保持代码的现代性并减少动态查找开销,建议直接从社区包导入:

from langchain_community.agent_toolkits.load_tools import load_tools
Changes

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.

  1. 3d ago First seen · 45 lines · 0 tokens per session scan A 337e89958bb2

Subscribe to this mod's changes

load_tools is an agent published in the GitHub repository xt765/LangChain-Chinese-Comment (20 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 488 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

strategic-advisor

Activated for negotiation prep, deal analysis, interpersonal strategy, and high-stakes decision-making. Combines game theory with psychological awareness.

winstonkoh87/Athena-Public · 31 tokens

integration-reviewer

Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.

FlorianBruniaux/claude-code-ultimate-guide · 57 tokens

roadmap

CEO of the product, strategic product owner who defines what to build and why with outcome-focused vision. Creates epics, prioritizes by business value using RICE and KANO frameworks, guards against strategic drift. Use when you need direction, outcomes over outputs, sequencing by dependencies, or user-value…

rjmurillo/ai-agents · 64 tokens

statistics-reviewer

你是一位生物統計學家。你只能閱讀草稿,不可修改任何檔案。你的職責是從統計方法學角度進行嚴格審查。.

u9401066/med-paper-assistant · 35 tokens

agent-registry-auditor

Audits agents for DIP-0016 compliance and registry alignment. Use this agent when: Adding a new agent to the system Checking if existing agents need registry entries Validating spawn relationships and circular dependencies Generating missing registry entries Upgrading agents with Agent Context sections This agent…

datacore-one/datacore · 84 tokens

youtube-transcriber

Sub-agent that extracts transcripts and metadata from YouTube videos and playlists. Uses youtube-transcript-api for captions and yt-dlp for metadata. Returns structured markdown with metadata.

datacore-one/datacore · 38 tokens