toolkits

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

Preconfigured groups of tools and setup code for agents working with specific areas such as SQL databases, CSV files, or OpenAPI-described web services.

In plain words
What is it for?
Use them to query databases, analyze CSV files, or plan and make several REST API calls from an OpenAPI specification. CSV agents can execute Python code and should run in a sandbox.
Why use it?
They reduce the repeated setup needed to connect an agent to related tools for a particular kind of task.

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/toolkits
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 toolkits

README.md
[![agentmods](https://agentmods.dev/badge/agents/xt765/langchain-chinese-comment/toolkits.svg)](https://agentmods.dev/agents/xt765/langchain-chinese-comment/toolkits)
Your own site
<a href="https://agentmods.dev/agents/xt765/langchain-chinese-comment/toolkits"><img src="https://agentmods.dev/badge/agents/xt765/langchain-chinese-comment/toolkits.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 946 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.00946
Opus 5 $0.00000 $0.00473
Sonnet 5 $0.00000 $0.00189
Haiku 4.5 $0.00000 $0.00095

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

Security

Grade A, and why

toolkits 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 4d 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/toolkits.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Toolkits

Agent Toolkits 是为特定任务或领域(如 SQL 数据库、CSV 文件、OpenAPI 规范等)预配置的一组工具和 Agent 初始化逻辑。

核心概念

Toolkit 的目标是简化特定场景下 Agent 的创建过程。它通常包含:

  • Toolkit 类: 封装了一组相关的 BaseTool
  • 工厂函数: 如 create_sql_agent,自动配置 Prompt 并创建 AgentExecutor

常用工具包 (Classic & Community)

在 LangChain Classic 中,许多工具包已迁移至 langchain_communitylangchain_experimental

1. SQL Agent

用于与 SQL 数据库交互。它包含查询数据库、检查模式、检查查询语句等工具。

  • 状态: 已迁移至 langchain_community.agent_toolkits.sql
  • 核心函数: create_sql_agent
  • 迁移建议: 使用 langchain_community 中的版本。

2. CSV Agent

用于分析 CSV 文件。它底层使用 Python REPL 来执行数据分析。

  • 状态: 已迁移至 langchain_experimental.agents.agent_toolkits.csv
  • 安全警告: 该 Agent 会执行任意 Python 代码,必须在沙箱环境中运行。

3. OpenAPI Agent

用于根据 OpenAPI 规范与 RESTful API 交互。它包含一个分阶段的规划器(Planner),负责将复杂请求分解为多个 API 调用。

  • 状态: 已迁移至 langchain_community.agent_toolkits.openapi
  • 核心组件: OpenAPIToolkit, create_openapi_agent

执行逻辑示例 (Verbatim Snippet)

SQL Agent 的创建逻辑 (概念性)

def create_sql_agent(
    llm: BaseLanguageModel,
    toolkit: SQLDatabaseToolkit,
    callback_manager: Optional[BaseCallbackManager] = None,
    prefix: str = SQL_PREFIX,
    suffix: str = SQL_SUFFIX,
    format_instructions: str = FORMAT_INSTRUCTIONS,
    input_variables: Optional[List[str]] = None,
    top_k: int = 10,
    **kwargs: Any,
) -> AgentExecutor:
    # 1. 获取工具列表
    tools = toolkit.get_tools()
    # 2. 构造 Prompt
    prompt = ZeroShotAgent.create_prompt(
        tools,
        prefix=prefix,
        suffix=suffix,
        format_instructions=format_instructions,
        input_variables=input_variables,
    )
    # 3. 初始化 Agent
    llm_chain = LLMChain(llm=llm, prompt=prompt, callback_manager=callback_manager)
    agent = ZeroShotAgent(llm_chain=llm_chain, allowed_tools=[t.name for t in tools])
    # 4. 返回 Executor
    return AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, **kwargs)

迁移指南 (LangGraph)

现代做法是使用 LangGraph 构建更可控的领域特定 Agent。

SQL Agent 迁移 (LangGraph)

不再使用黑盒的 create_sql_agent,而是显式定义图逻辑:

  1. Node 1 (Query Gen): 生成 SQL。
  2. Node 2 (Execute): 执行 SQL。
  3. Node 3 (Refine): 如果出错,修正 SQL;否则返回结果。

Read the full file on GitHub · 88 lines

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. 4d ago First seen · 88 lines · 0 tokens per session scan A 493cfbad1a31

Subscribe to this mod's changes

toolkits 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 946 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

code-reviewer

Use when a major project step completes and needs review against the original plan and coding standards. Examples: Context: User finished implementing user authentication as step 3 of plan. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Let me use the…

axiomantic/spellbook · 190 tokens

onboard-guide

Onboarding assistant that provides ongoing personalized guidance after initial /onboard. Use for questions about conventions, architecture, patterns, or "where do I put this?" — answers are tailored to the engineer's background.

smicolon/ai-kit · 46 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