agent_types

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

A list of named agent designs used by LangChain classic. Each design defines a different way for a language model to choose tools, answer questions, or keep conversation context.

In plain words
What is it for?
Use it to choose designs for document search, follow-up web searches, multi-input tools, chat history, or OpenAI function calls.
Why use it?
It gives code a standard way to select an agent style without referring directly to implementation classes. The module is deprecated, so it mainly helps maintain older LangChain code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/xt765/langchain-chinese-comment/agent_types.svg)](https://agentmods.dev/agents/xt765/langchain-chinese-comment/agent_types)
Your own site
<a href="https://agentmods.dev/agents/xt765/langchain-chinese-comment/agent_types"><img src="https://agentmods.dev/badge/agents/xt765/langchain-chinese-comment/agent_types.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 739 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.00739
Opus 5 $0.00000 $0.00369
Sonnet 5 $0.00000 $0.00148
Haiku 4.5 $0.00000 $0.00074

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

Security

Grade A, and why

agent_types 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/agent_types.md · 40 lines

What it actually says

libs\langchain\langchain_classic\agents\agent_types.py

此文档提供了 libs\langchain\langchain_classic\agents\agent_types.py 文件的详细中文注释。该模块定义了 LangChain 经典代理的类型枚举。

功能描述

AgentType 是一个字符串枚举类,用于在 initialize_agent 函数中快速指定要使用的代理架构。每个枚举值都对应一个具体的代理实现。

核心枚举:AgentType

以下是 langchain_classic 中支持的主要代理类型及其特点:

枚举值 描述
ZERO_SHOT_REACT_DESCRIPTION 零样本 ReAct 代理:最常用的基础代理。仅根据工具的文本描述决定调用哪个工具,不需要示例。
REACT_DOCSTORE 文档库 ReAct 代理:专门设计用于与文档存储交互,通常包含 SearchLookup 两个工具。
SELF_ASK_WITH_SEARCH 自问自答代理:将复杂问题拆分为一系列简单的子问题,通过搜索工具获取答案后再整合。
CONVERSATIONAL_REACT_DESCRIPTION 对话式 ReAct 代理:基础 ReAct 的对话版本,能够记住历史对话上下文。
CHAT_ZERO_SHOT_REACT_DESCRIPTION 聊天模型零样本代理:针对 Chat Model(如 GPT-4)优化的零样本 ReAct 实现。
CHAT_CONVERSATIONAL_REACT_DESCRIPTION 聊天模型对话代理:针对 Chat Model 优化的对话式 ReAct 实现。
STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION 结构化聊天代理:支持多输入工具的调用,使用 JSON 格式进行推理,逻辑更严谨。
OPENAI_FUNCTIONS OpenAI 函数调用代理:利用 OpenAI 官方的 functions 接口,效率更高且更稳定。
OPENAI_MULTI_FUNCTIONS OpenAI 多函数调用代理:允许在单次推理中生成多个工具调用。

弃用说明

该模块已被标记为弃用。

弃用原因

  • 硬编码限制: 枚举方式限制了开发者对代理逻辑的微调。
  • 架构演进: LangChain 已全面转向基于 LCEL 的 Runnable 架构。

迁移路径

不要再依赖 AgentType 枚举和 initialize_agent 函数。请使用对应的工厂函数:

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 · 40 lines · 0 tokens per session scan A 116c55e47c80

Subscribe to this mod's changes

agent_types 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 739 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