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 agentmods add agents/xt765/langchain-chinese-comment/toolsgit clone --depth 1 https://github.com/xt765/LangChain-Chinese-CommentWhat 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 | $0.00000 | $0.00400 |
| Opus 5 | $0.00000 | $0.00200 |
| Sonnet 5 | $0.00000 | $0.00080 |
| Haiku 4.5 | $0.00000 | $0.00040 |
Grade A, and why
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.
What it actually says
libs\langchain\langchain_classic\agents\tools.py
此文档提供了 libs\langchain\langchain_classic\agents\tools.py 文件的详细中文注释。该模块定义了代理在遇到错误时使用的特殊工具。
功能描述
在代理的执行过程中,模型有时会产生幻觉,调用一个并不存在的工具。为了防止程序直接崩溃,LangChain 提供了一个专门的辅助工具来引导模型修正错误。
核心类:InvalidTool
InvalidTool 是一个容错工具,当 AgentExecutor 无法找到模型请求的工具时,会调用此类。
1. 核心属性
name:invalid_tooldescription: 当工具名无效时调用,用于向模型建议正确的工具名。
2. 运行逻辑
无论同步还是异步执行,该工具都会执行以下逻辑:
- 接收无效的工具名
requested_tool_name和可用工具列表available_tool_names。 - 返回一段描述性文字,指出请求无效,并列出所有可用的选项。
示例返回:
google_searchis not a valid tool, try one of [search,calculator].
意义与作用
- 增强鲁棒性: 防止因模型幻觉导致的执行中断。
- 反馈机制: 将错误作为一种“观察结果”(Observation)反馈给模型,让模型有机会在下一次“思考”(Thought)中修正自己的行为。
导出组件
InvalidTool: 异常处理工具类。tool: 装饰器,用于将普通的 Python 函数快速转换为 LangChain 工具。
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.
- 3d ago First seen · 36 lines · 0 tokens per session scan A 43e6964f0f0c
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 400 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.
Other agents, from other repositories
build-error-resolver
빌드 실패·타입 에러·컴파일 오류·import 에러·의존성 이슈를 최소 변경으로 그린 복구. 리팩토링·아키텍처 변경 절대 금지. Use proactively when CI/빌드가 빨간불이거나, 터미널에 타입 에러·컴파일 에러가 표시될 때 즉시. 런타임 로직 버그는 systematic-debugger, 아키텍처 변경은 architect 사용.
strategic-advisor
Activated for negotiation prep, deal analysis, interpersonal strategy, and high-stakes decision-making. Combines game theory with psychological awareness.
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.
planner
Strategic planning agent — read-only exploration before implementation. Use to decompose tasks, analyze codebases, and produce a detailed plan. Never modifies files.
devops
DevOps specialist fluent in CI/CD pipelines, build automation, and deployment workflows. Thinks in reliability, security, and developer experience. Designs GitHub Actions, configures build systems, manages secrets. Use for pipeline configuration, infrastructure automation, and anything involving environments…
ticket-gate
Ticket readiness gate for actual-mcp-server (forge-kit ticket-gate v6). Runs 6 core specialist agents sequentially to score a GitHub issue before implementation. Each agent scores 1-10; ALL must score 10 to pass. An agent whose domain the ticket does not touch auto-scores 10 (N/A). Extra specialists are added by…