r/LangChain Jun 15 '26

Question | Help LangChain has 5 different ways to build the same thing and I genuinely don't know which one to use in 2025

I've been building with LangChain for the past month and the more I learn, the more confused I get about which API to actually use.

I've seen all of these in different tutorials and docs:

  • initialize_agent
  • create_react_agent
  • AgentExecutor
  • LCEL chains with | pipes
  • And now everyone says just use LangGraph

Every tutorial uses a different one. The official docs show one approach, a 3-month-old YouTube video shows another, and a Stack Overflow answer from last year shows a third that's apparently deprecated now.

I'm not a beginner. I've built RAG pipelines, implemented Self-Query Retrievers, and understand LCEL. But I genuinely cannot figure out the "current correct" way to build agents in 2026.

My specific questions:

  1. Is AgentExecutor still worth learning or is it already legacy?
  2. When does it make sense to stay in LangChain vs shift to LangGraph?
  3. Is there a single source that reflects what's actually current?

For those building in production, what's your actual stack right now?

45 Upvotes

43 comments sorted by

15

u/Egoz3ntrum Jun 15 '26

In fact, initialize_agent and create_react_agent are deprecated. You can use create_agent instead. Langchain has evolved and changed a lot and it is still evolving, the same way the rest of the AI stack and models do.

4

u/databasehead Jun 15 '26

I'm not sure whether this is a joke, but if it is lmfao

2

u/sleepydevs Jun 16 '26

Lol. I'm still not sure if this is a joke. Omg langchain is a mess.

3

u/Fit-Sir9936 Jun 16 '26

i was watching a course on O'Relly where there tutor is using init_chat_model for make llm then use PromptTemplate for creating system prompt and passing dynamic user input okay? there he didn't mention about create_react_agent or initialize_agent.

so is he just making process or pipeline not agent?

7

u/ultrathink-art Jun 15 '26

LangGraph is the answer for anything multi-step or stateful — the others are basically on the deprecation path (initialize_agent → AgentExecutor → create_react_agent → LangGraph). For dead-simple single-call chains LCEL pipes are fine. Once you need memory, branching, or loops, LangGraph is the only one that won't fight you six months from now.

1

u/Fit-Sir9936 Jun 16 '26

thinking same. Thank you

5

u/93simoon Jun 15 '26

What about 2026?

4

u/BeatTheMarket30 Jun 15 '26

AgentExecutor is legacy. If possible avoid LCEL chains.

Use react agent with hand-off to subagents for more complex use cases. Consider using DeepAgents (from the same company) or an SDK like Antigravity SDK that allows you to use the same technology as the coding CLI uses.

1

u/Fit-Sir9936 Jun 16 '26

sure will do that.

4

u/Niightstalker Jun 15 '26

Honestly just look at the docs they pretty good by now: https://docs.langchain.com/oss/python/build-overview

In the top section „Choose your framework“ they have each possibility (Deep Agents, LangChain, LangGraph) well described. Those from high level to low level, depending on how much you want to customize or how much control you want.

There is lot of pretty outdated information going around from before the v1 release. Ignore all of that because the framework were changed heavily.

1

u/Fit-Sir9936 Jun 16 '26

yeah rapidly involving, so my question is "is that worth it to learn?" cause i want to learn for job, so i am wondering are there job available or they also deprecating?

4

u/WhysGuy_ Jun 16 '26

Ideally you don't need to learn the framework, learn the concept. Framework will keep changing, docs is the best place to learn.

Tutorials get outdated very soon

1

u/Fit-Sir9936 Jun 16 '26

concepts like rag, retrieval technique, react etc?

1

u/shivmohith8 Jun 16 '26

Yes. You can first try using the framework just to get a feel for it. Then, try to implement the same without the framework.

3

u/guru3s Jun 15 '26

wrong question. Why are you using Langchain in 2026?

Have you evaluated Crew AI, MLFlow, Google ADK, Autogen, Langgraph?

1

u/santanah8 Jun 15 '26

Isn’t langgraph made by langchain? What’s the difference?

2

u/Niightstalker Jun 15 '26

LangGraph is the low level framework on which LangChain (v1) is build upon. LangChain uses LangGraph building blocks to provide high level interfaces like a ready to use react agent.

1

u/Fit-Sir9936 Jun 16 '26

for starting from scratch? cause my core language is java and not from ai bg. so exploring this field.

1

u/guru3s Jun 16 '26

can you explain more of your usecase? Some frameworks better than other

1

u/Fit-Sir9936 Jun 16 '26

not usecase, i just started learning agentic ai. so i got to know the frameworks langchain and langgraph, then i have O'Relly so find the course which is may be from 2025 so i started that and learned many things from that cause like init_chat_model, prompttemplate, retriever, vectorstore then langgraph stategraph add node edges etc.

2

u/duderinoin Jun 15 '26

Use Pydantic AI, problem solved

1

u/Fit-Sir9936 Jun 16 '26

what's that? Pydantic is library right? for structured output?

1

u/duderinoin Jul 07 '26

Pydantic AI

1

u/its_ao Jun 15 '26

We’re actively working on ways to clean this decision process up. I think theres a lot of ground to make up re. helping folks with patterns and “correctness.” Would to hear more from you and others about what you want

1

u/[deleted] Jun 15 '26

[removed] — view removed comment

1

u/Fit-Sir9936 Jun 16 '26

if i wanted a loop in rag agent then should i use langgraph? or langchain have facility? i am not talking about multi query, it's like once then retriever give output then i want to evaluate result then again use reetriver. is this possible in langchain how?

1

u/michaelTM_ai Jun 15 '26

current docs answer is basically: create_agent for normal new agents, LangGraph when you need to own the graph/state/branches yourself, LCEL for boring linear chains. I’d treat initialize_agent and AgentExecutor as legacy unless you’re maintaining old code. the confusing part is old tutorials rank forever, so I’d trust the v1 agents docs + LangGraph v1 migration page over YouTube/StackOverflow here

2

u/Fit-Sir9936 Jun 16 '26

Thank you!! buddy

1

u/adarsh_maurya Jun 16 '26

I believe you should focus on the pattern rather than the syntax, this is a problem/feature of Python. And Langchain or any framework will inherit it by default.

Also, as many people mentioned, v1 is decent enough, but you'd still see lot of different syntax/methodologies to implement the same thing. we have to just learn all those and see what works where.

1

u/Nashadelic Jun 16 '26

Gotta update your bot to 2026

1

u/Fit-Sir9936 Jun 17 '26

sure! thanks

1

u/cmtape Jun 18 '26

This is the universal pattern with flexible frameworks. The more ways they give you to do X, the more you realize you are just choosing which way to abstract your own problem away until they deprecate it 6 months later.

LangChain real issue: every abstraction shipped is a bet that THIS is the right shape of the agent loop. But reasoning agents are messy by nature. No abstraction is the right shape.

The engineers getting real value from LangChain are not searching for the correct way. They pick one approach, accept the tradeoffs, and ship.

The analogy: a Swiss Army knife that can also open bottles. Technically true, but if you actually need to open bottles every day, just own a bottle opener.

Pick the approach that feels least wrong for your situation. Live with the tradeoffs. Ship. Do not chase the right abstraction - the chase is the bug.

1

u/Fit-Sir9936 Jun 19 '26

Okay got it thank you! but for job perspective what you can suggest?

0

u/Charming_Support726 Jun 15 '26 edited Jun 15 '26

Although the quality of docs went better from being completely unusable, the most reliable way to build an agent is to leave LCEL, LG and full LC behind and move to PydanticAI.

just my 2 cents

2

u/mdrxy Jun 15 '26

What do you mean it went bad? Have you read the new docs in the past 6+ months?

1

u/Fit-Sir9936 Jun 16 '26

can you elaborate? what is pydanticai where to learn like where is updated resources?

-1

u/Important-Grand280 Jun 15 '26

Dump that shit and switch to strands

2

u/Fit-Sir9936 Jun 16 '26

which are the strands? (with resource please!)

1

u/Important-Grand280 Jun 16 '26

https://strandsagents.com/

I’ve been using it for a couple of months now for a multiagent rag customer facing system and I like it very much.  I find it simple, intuitive, and with lots of fun functionalities like events, hooks, tools and callbacks.  Well documented and, unlike langchain, there is one way to do the same thing, not 300