# Feature catalog — langchain-ai/langchain

> Canonical page: https://codevetter.com/unpack/langchain/feature-catalog

# Feature catalog — langchain-ai/langchain

Scanned commit 9e4ea7a3495992c02a79de6fa5788e028b03df11 (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

User-facing surface: agent construction (create_agent with middleware, structured output, persistence, interrupts), model/embeddings factories (init_chat_model, init_embeddings), tool authoring (@tool, BaseTool, ToolRuntime injection), a large built-in middleware catalog (HITL, summarization, PII, retries, limits, shell tool, file search, todo lists, tool selection/emulation), MCP server tool adaptation, and message/rate-limiter re-exports. langchain-classic preserves the legacy chains/agents API. langchain-tests ships a conformance suite for partner authors; langchain-profiles ships a CLI for model capability data.
- `create_agent(model, tools, system_prompt, middleware, response_format, state_schema, context_schema, checkpointer, store, interrupt_before, interrupt_after, debug, name, cache, transformers)` returns a `CompiledStateGraph` implementing the model->tools loop until no tool_calls remain. — [libs/langchain_v1/langchain/agents/factory.py#L840-992](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/factory.py#L840-L992)
- `init_chat_model` supports string specs ('provider:model'), explicit model_provider, configurable_fields producing a deferred `_ConfigurableModel`, and a special 'langsmith' provider that routes ChatOpenAI through the LangSmith gateway (LANGSMITH_GATEWAY_API_KEY / gateway.smith.langchain.com). — [libs/langchain_v1/langchain/chat_models/base.py#L24-38](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/chat_models/base.py#L24-L38) [libs/langchain_v1/langchain/chat_models/base.py#L657](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/chat_models/base.py#L657)
- `init_embeddings` provides the same lazy provider-registry pattern for ~10 embeddings providers (azure_openai, bedrock, cohere, google_genai, huggingface, mistralai, ollama, openai, ...). — [libs/langchain_v1/langchain/embeddings/base.py#L15-34](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/embeddings/base.py#L15-L34) [libs/langchain_v1/langchain/embeddings/base.py#L57-93](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/embeddings/base.py#L57-L93)
- Tools are authored via the `@tool` decorator (langchain_core.tools.convert) or BaseTool subclasses; langchain.tools re-exports these plus ToolRuntime, InjectedState, and InjectedStore for runtime/state injection into tool functions. — [libs/langchain_v1/langchain/tools/__init__.py](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/tools/__init__.py) [libs/core/langchain_core/tools/convert.py#L18](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/core/langchain_core/tools/convert.py#L18)
- The built-in middleware catalog includes: SummarizationMiddleware, HumanInTheLoopMiddleware, PIIMiddleware, TodoListMiddleware, ModelRetryMiddleware, ModelFallbackMiddleware, ModelCallLimitMiddleware, ToolRetryMiddleware, ToolCallLimitMiddleware, ToolErrorMiddleware, LLMToolSelectorMiddleware, LLMToolEmulator, ContextEditingMiddleware, FilesystemFileSearchMiddleware, ProviderToolSearchMiddleware, and ShellToolMiddleware. — [libs/langchain_v1/langchain/agents/middleware/__init__.py#L6-30](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/middleware/__init__.py#L6-L30)
- Structured output is configured via `response_format` accepting a raw Pydantic/dataclass/TypedDict/JSON-schema or explicit ToolStrategy/ProviderStrategy/AutoStrategy; AutoStrategy picks provider-native output when `_supports_provider_strategy` says the model supports it. — [libs/langchain_v1/langchain/agents/structured_output.py#L29-33](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/structured_output.py#L29-L33) [libs/langchain_v1/langchain/agents/factory.py#L1347-1367](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/factory.py#L1347-L1367)
- HumanInTheLoopMiddleware pauses tool calls via langgraph `interrupt()` with ReviewConfig policies allowing approve/edit/reject/respond decisions, and annotates edited calls with an `_EDIT_NOTICE` so the model knows the call was replaced. — [libs/langchain_v1/langchain/agents/middleware/human_in_the_loop.py#L31-78](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/middleware/human_in_the_loop.py#L31-L78)
- ShellToolMiddleware exposes a persistent `shell` tool executing commands under pluggable policies: HostExecutionPolicy (direct subprocess), DockerExecutionPolicy, and CodexSandboxExecutionPolicy, with output redaction via RedactionRule. — [libs/langchain_v1/langchain/agents/middleware/shell_tool.py#L59-120](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/middleware/shell_tool.py#L59-L120) [libs/langchain_v1/langchain/agents/middleware/_execution.py#L92-323](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/middleware/_execution.py#L92-L323)
- PIIMiddleware detects emails/credit cards/IPs/MACs/URLs via `_redaction` helpers and can mutate streaming deltas in flight through `_PIIStreamTransformer` (a 128-char lookback buffer catches patterns straddling token boundaries). — [libs/langchain_v1/langchain/agents/middleware/pii.py#L12-66](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/agents/middleware/pii.py#L12-L66)
- `MCPAdapter` converts FastMCP targets (URL, Path, transport, MCPConfig, in-process server, client/group) into LangChain tools via `list_tools()`, and arms clients so server elicitation requests become LangGraph interrupts answered by humans. — [libs/langchain_v1/langchain/mcp/adapter.py#L125-242](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/mcp/adapter.py#L125-L242) [libs/langchain_v1/langchain/mcp/elicitation.py](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/mcp/elicitation.py)
- langchain.messages re-exports the canonical message model (AIMessage, ToolMessage, HumanMessage, SystemMessage, content-block types, ToolCall, trim_messages) from langchain-core. — [libs/langchain_v1/langchain/messages/__init__.py](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/messages/__init__.py)
- BaseRateLimiter/InMemoryRateLimiter are re-exported from langchain.rate_limiters and are honored by BaseChatModel._generate_with_cache which acquires the limiter before hitting the provider API (but after cache lookup). — [libs/langchain_v1/langchain/rate_limiters/__init__.py](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain_v1/langchain/rate_limiters/__init__.py) [libs/core/langchain_core/language_models/chat_models.py#L1931-1935](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/core/langchain_core/language_models/chat_models.py#L1931-L1935)
- langchain-tests (standard-tests) ships reusable conformance suites — unit_tests/chat_models.py, embeddings.py, tools.py and integration_tests/{chat_models,vectorstores,retrievers,indexer,cache,sandboxes}.py — that partner packages subclass to prove compliance. — [libs/standard-tests/langchain_tests/unit_tests](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/standard-tests/langchain_tests/unit_tests) [libs/standard-tests/langchain_tests/integration_tests](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/standard-tests/langchain_tests/integration_tests)
- langchain-model-profiles ships a `langchain-profiles` CLI that generates per-model capability profile data consumed by partners' data/ dirs. — [libs/model-profiles/langchain_model_profiles/cli.py](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/model-profiles/langchain_model_profiles/cli.py) [AGENTS.md](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/AGENTS.md)
- langchain-classic retains the legacy feature surface: AgentExecutor, agent types (react, conversational, structured_chat, tool_calling_agent, openai_functions_*), and the full chains/ tree (retrieval, combine_documents, graph_qa, etc.). — [libs/langchain/langchain_classic/agents/agent.py#L1012](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain/langchain_classic/agents/agent.py#L1012) [libs/langchain/langchain_classic/agents/types.py](https://github.com/langchain-ai/langchain/blob/9e4ea7a3495992c02a79de6fa5788e028b03df11/libs/langchain/langchain_classic/agents/types.py)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
