[KongchangAI]
Concept

create_agent

An API in LangChain 1.x for creating an agent. It returns a LangGraph graph in which the model determines the next action.

Core Facts

Timeline (last 90 days)

Oct 12

LangChain's official documentation calls create_agent a "minimal, highly configurable harness," while LangGraph's documentation describes itself as a low-level orchestration framework and runtime for long-running, stateful agents.

Unverified50%
Oct 12

In LangChain 1.4.3, create_agent returns an object of type CompiledStateGraph (a LangGraph graph) rather than a chain.

Unverified50%
Oct 12

The minimal graph built by create_agent has nodes ['__start__', 'model', 'tools', '__end__'], where the model node calls the large model, the tools node executes the tools requested by the model, and the loop repeats until the model no longer requests tools.

Unverified50%
Oct 12

create_react_agent in langgraph.prebuilt has been marked as deprecated in the tested version, with create_agent recommended instead.

Unverified50%
Oct 12

When using create_agent, checkpointing capability can be obtained directly just by passing the checkpointer parameter, without writing a graph by hand.

Unverified50%
Oct 12

create_agent accepts the checkpointer, store, interrupt_before, interrupt_after, and middleware list parameters.

Unverified50%
Oct 12

When using human approval, the first invoke causes the agent to pause, and a __interrupt__ key appears in the result, whose payload contains action_requests and review_configs.

Unverified50%
Oct 9

The create_agent() provided by LangChain is essentially a factory function, implemented internally based on LangGraph

Unverified50%
Oct 9

create_agent() requires three parameters: tools, model, and system prompt

Unverified50%
Oct 9

Running the Agent is as simple as passing the user query via the agent.invoke() method, with message history maintenance and loop control handled internally by the framework

Unverified50%

3 more timeline events

All Facts (14)

Verified

The create_react_agent in LangGraph is implemented based on the ReAct paradigm, allowing the model to reason at each step and decide whether to call a tool or output a final answer.

70%
Unverified

The underlying implementation of create_agent is still a LangGraph graph, where each tool is a node; the difference is that the LangGraph graph is hardcoded, whereas the Agent's graph is dynamically generated by prompts.

60%
Unverified

LangChain's official documentation calls create_agent a "minimal, highly configurable harness," while LangGraph's documentation describes itself as a low-level orchestration framework and runtime for long-running, stateful agents.

50%
Unverified

The minimal graph built by create_agent has nodes ['__start__', 'model', 'tools', '__end__'], where the model node calls the large model, the tools node executes the tools requested by the model, and the loop repeats until the model no longer requests tools.

50%
Unverified

create_react_agent in langgraph.prebuilt has been marked as deprecated in the tested version, with create_agent recommended instead.

50%
Unverified

When using create_agent, checkpointing capability can be obtained directly just by passing the checkpointer parameter, without writing a graph by hand.

50%
Unverified

create_agent accepts the checkpointer, store, interrupt_before, interrupt_after, and middleware list parameters.

50%
Unverified

When using human approval, the first invoke causes the agent to pause, and a __interrupt__ key appears in the result, whose payload contains action_requests and review_configs.

50%
Unverified

In LangChain 1.4.3, create_agent returns an object of type CompiledStateGraph (a LangGraph graph) rather than a chain.

50%
Unverified

The create_agent() provided by LangChain is essentially a factory function, implemented internally based on LangGraph

50%
Unverified

create_agent() requires three parameters: tools, model, and system prompt

50%
Unverified

Running the Agent is as simple as passing the user query via the agent.invoke() method, with message history maintenance and loop control handled internally by the framework

50%
Unverified

LangChain 1.4.3 adds logic to create_agent to fix invalid tool calls, which can automatically correct tool call parameters with formatting errors or missing fields.

50%
Unverified

LangChain 1.0 uniformly uses create_agent as the entry point for creating agents, ending the confusion caused by more than ten creation methods in older versions.

50%

Source Articles