Be10x · Interactive

Stop scripting it.
Let it decide.

One order-support agent, three tools, and the exact Python you'd type in LangChain v1. Every widget here runs — click the code, flip the switches, watch what breaks.

01

A chain follows a script. An agent decides.

A chain runs the steps you wrote, in the order you wrote them. An agent loop runs until the model stops asking for things. Same question, same model — press play and count the steps.

Try it
"Where is my order 4471, and can I still return it?"
A chain
prompt model parser one way through — you wrote the order
from langchain_core.output_parsers import StrOutputParser

chain = prompt | model | StrOutputParser()
chain.invoke({"question": q})
0press play
An agent
model tools round again until it stops asking
from langchain.agents import create_agent

agent = create_agent(model=M, tools=T, system_prompt=S)
agent.invoke({"messages": [{"role": "user", "content": q}]})
0press play
Same model, same question. One of them has somewhere to go and look.
02

Three arguments, one agent.

Everything above is built by a single function. Click each argument in create_agent to see what it carries and what breaks without it — then flip the switch on system_prompt and meet the error every pre-1.0 tutorial will hand you.

Click the code

    
What Python says when you run it
03

The docstring IS the description.

The model never reads your function body. It reads the tool description — which @tool lifts straight out of your docstring. Pick one of the three and watch the model decide.

Try it

    
What the model is handed at every turn
The model's decision log
tool calls — wasted calls — answer —
Your docstring is a prompt. It's read on every single turn, by a model choosing between three tools — and it is the only thing standing between a clean call and a guess.
04

What the agent actually passes around.

In and out, an agent's state is one key: {"messages": [...]}. Step through the eight messages that one run of our question produced.

Step through it
result["messages"]
05

Memory is a thread_id.

An agent forgets everything between calls unless you hand it a checkpointer. After that, a thread_id decides which conversation you're continuing — or whether you're a stranger.

Try it
Turn 1 — already sent, thread customer-4471
humanWhere is order 4471?
ai · after 1 tool callOrder 4471 — wireless earbuds, ₹2,499 — was delivered on 12 Sept.
4 messages saved to the checkpoint
Turn 2 — the follow-up
humanCan I still return it?

    
messages restored — resolved "it" —
Old tutorials will tell you to attach ConversationBufferMemory. It's deprecated and lives in langchain-classic now. Memory stopped being an object you hand the chain and became state the runtime saves, keyed by a thread.
06

The five things tutorials still get wrong.

LangChain 1.0 landed in October 2025 and most blog posts predate it. Five APIs you'll still be handed, and what replaced each. Most of the old ones survive in langchain-classic — while LCEL is the one thing here that never went anywhere.

Check your code
One rule for reading any LangChain tutorial: if it imports from langchain.chains or langchain.memory, it predates 1.0. The modern surface is small — create_agent, @tool, messages, a checkpointer.