Live data from Hacker News

Why we no longer use LangChain for building our AI agents

octomind.dev

21–30 of 307 posts

Re: Why we no longer use LangChain for building our AI agents

#22

Langchain reminds me of GraphQL. A technology that a lot of ppl seem to hype about, sounds like something you should use because all the cool kids use it, but at the end of the day just makes things unncessarily complicated.

GraphQL actually holds value in my view as it gives custom SQL-like functionality instead of basic JSON APIs. With it, you can do fewer calls and retrieve only the attributes you need. Granted, if SQL were directly an API, then GraphQL wouldn't hold too much value. Langchain has no such benefit.

Surely SQL is an API? The line between language and API is fairly blurry.

Re: Why we no longer use LangChain for building our AI agents

#23
post #10

My reading of the article is that because LangChain is abstracted poorly, frameworks should not be used, but that seems a bit far. my experience is that Python has a frustrating developer experience for production services. So I would prefer a framework with better abstractions and a solid production language (performance and safety), over no framework and Python (if those were options)

prompt engineering requires the ability to see what is happening at various steps and langchain makes that harder if not impossible.

honestly I don't need that much abstraction.

Re: Why we no longer use LangChain for building our AI agents

#25

Has anyone else found a good way to swap out models between companies, Langchain has made it very easy for us to swap between openai/anthropic etc

The point is that you don’t need a framework for that; the APIs are already similar enough that it should be obvious how to abstract over them using whatever approach is natural in your programming language of choice.

Re: Why we no longer use LangChain for building our AI agents

#26
post #10

My reading of the article is that because LangChain is abstracted poorly, frameworks should not be used, but that seems a bit far. my experience is that Python has a frustrating developer experience for production services. So I would prefer a framework with better abstractions and a solid production language (performance and safety), over no framework and Python (if those were options)

For most of what people are doing with AI you don't need Python because you don't need the ML ecosystem. You're either going to be talking to some provider's API (in which case there are wrappers aplenty and even if there weren't their APIs are simple and trivial to wrap yourself) or you're going to self-host a model somewhere, in which case you can use something like ollama to give yourself an easy API to code again…

They become agents when the LLM output is function calls.

Re: Why we no longer use LangChain for building our AI agents

#27
post #22

Earlier quoted context omitted.

GraphQL actually holds value in my view as it gives custom SQL-like functionality instead of basic JSON APIs. With it, you can do fewer calls and retrieve only the attributes you need. Granted, if SQL were directly an API, then GraphQL wouldn't hold too much value. Langchain has no such benefit.

Surely SQL is an API? The line between language and API is fairly blurry.

Can you elaborate?

Re: Why we no longer use LangChain for building our AI agents

#28
post #8

Bigger problem might be using agents in the first place. We did some testing with agents for content generation (e.g. "authoring" agent, "researcher" agent, "editor" agent) and found that it was easier to just write it as 3 sequential prompts with an explicit control loop. It's easier to debug, monitor, and control the output flow this way. But we still use Semantic Kernel[0] because the lowest level abstractions tha…

What's the difference? I thought "agents" was just a fancier word for sequential prompts.

"Agent" means that it outputs JSON with a function call name and parameters which you execute and usually then feed the results back to the LLM.

Re: Why we no longer use LangChain for building our AI agents

#29

Has anyone else found a good way to swap out models between companies, Langchain has made it very easy for us to swap between openai/anthropic etc

Use a consistent argument structure and make a simple class or function for each provider that translates that to the specific API calls. They are very similar APIs. Maybe select the function call based on the model name.

Re: Why we no longer use LangChain for building our AI agents

#30

I've seen a lot of stuff recently about how LangChain and other frameworks for AI/LLM are terrible and we shouldn't use them and I can't help but think that people are missing the point. If you need strong customization or flexibility frameworks of any kind are almost always the wrong choice, whether you're building a website or an AI agent. That's kind of the whole point of a framework. Opinionated workflows that en…

As the article points out, the difference between frameworks for building a website vs building an LLM agent is that we have decades more industrial experience behind our website-building opinions. I’ve used heavyweight frameworks before, and would understand your defense in the context of eg complaints about Spring Boot—but Langchain isn’t Spring; it really does kinda suck, for reasons that go beyond the inherent trade offs of using any framework.
Post reply on HN