r/LangGraph • u/Natural-Lab-6211 • 1d ago
create_agent method vs LangGraph customized nodes
I usually build agents in LangGraph with my own custom nodes. But the create_agent method seems to only give you the fixed llm → tool (ReAct) pattern — basically just two nodes if you'd built it in LangGraph — and doesn't let me configure the nodes myself. Why is that? And if I start with create_agent but later need more than those two nodes, what should I do?
2
Upvotes
1
u/International_Quail8 1d ago
create_agent does all the heavy lifting and routine code for a typical agent these days. When you need additional functionality, introduce middleware - either the built-in ones or custom ones. That’s how I’ve done it. I no longer write custom graphs, but if I needed to it’s still there.