Do I need frameworks like LangChain to build AI apps?
1 Answer
When developers start building with AI, they often encounter frameworks such as LangChain, LlamaIndex, Haystack, Semantic Kernel and many agent frameworks. A common question is whether these are necessary. The honest answer: they can help, but many applications work well without them.
What do these frameworks provide?
1. Abstractions for calling different AI models through one interface.
2. Components for retrieval-augmented generation: document loaders, text splitters, embedding and vector store integrations.
3. Tools and agent loops for multi-step tasks.
4. Memory and conversation management.
5. Integrations with many databases, APIs and services.
6. Observability and evaluation tools in their ecosystems.
Advantages:
Faster prototyping with ready-made components.
Easy experimentation with different models and vector stores.
Many examples and community resources.
Useful integrations, such as loaders for PDFs and websites, that save effort.
Disadvantages:
Extra complexity. Abstraction layers can make it harder to understand what is actually sent to the model.
Debugging difficulty when something goes wrong deep inside the framework.
Frequent changes. Fast-moving frameworks sometimes change their interfaces, requiring code updates.
Overhead for simple tasks. A basic chatbot may need only a few API calls.
When should you skip frameworks? When your application is simple: a chatbot, a summariser, a classifier or a single tool-using assistant. Modern provider SDKs from OpenAI, Anthropic and Google already handle streaming, tool use, structured outputs and retries. Writing direct code keeps it transparent and easy to maintain.
When are frameworks useful? For complex RAG pipelines with many data sources, when quickly testing many components, or when your team already knows the framework well. Some teams also choose agent frameworks or provider-specific agent SDKs, such as Anthropic's Agent SDK or OpenAI's Agents SDK, for building agents with tool loops.
A balanced approach:
1. Learn the fundamentals by building a simple app directly with a provider's SDK. Understand prompts, messages, tool calls and retrieval yourself.
2. Adopt a framework only when it clearly saves effort for a specific need.
3. Use individual components, such as a document loader, without adopting an entire framework.
4. Keep your core prompts and logic visible and testable.
Whatever you choose, good prompts, quality data, sound retrieval and solid evaluation matter far more than the framework.