LLM Frameworks vs. the Raw SDK in Java

📰 Dev.to · Puneet Gupta

Learn to evaluate LLM frameworks by building the same tool twice, once with the raw SDK and once with a framework, and comparing the costs and benefits

intermediate Published 5 Jul 2026
Action Steps
  1. Build a small tool using an agent on the raw Anthropic Java SDK
  2. Build the same tool using a framework such as LangChain4j or Spring AI
  3. Compare the costs and benefits of each approach
  4. Evaluate the trade-offs between abstraction and control
  5. Choose the best framework for your specific use case
Who Needs to Know This

Software engineers and AI developers can benefit from this approach to evaluate LLM frameworks and make informed decisions about which ones to use

Key Insight

💡 Evaluating LLM frameworks requires a hands-on approach, building the same tool twice to compare costs and benefits

Share This
🤖 Evaluate LLM frameworks by building the same tool twice: once with raw SDK, once with a framework. Compare costs & benefits to make informed decisions #LLM #AI #Java

Key Takeaways

Learn to evaluate LLM frameworks by building the same tool twice, once with the raw SDK and once with a framework, and comparing the costs and benefits

Full Article

Title: LLM Frameworks vs. the Raw SDK in Java

URL Source: https://dev.to/gpuneet/llm-frameworks-vs-the-raw-sdk-in-java-1ldj

Published Time: 2026-07-05T18:42:15Z

Markdown Content:
[Skip to content](https://dev.to/gpuneet/llm-frameworks-vs-the-raw-sdk-in-java-1ldj#main-content)

[![Image 1: DEV Community](https://media2.dev.to/dynamic/image/quality=100/https://dev-to-uploads.s3.amazonaws.com/uploads/logos/resized_logo_UQww2soKuUsjaOGNB38o.png)](https://dev.to/)

[Powered by Algolia](https://www.algolia.com/developers/?utm_source=devto&utm_medium=referral)

[Log in](https://dev.to/enter?signup_subforem=1)[Create account](https://dev.to/enter?signup_subforem=1&state=new-user)

## DEV Community

![Image 2](https://assets.dev.to/assets/heart-plus-active-9ea3b22f2bc311281db911d416166c5f430636e76b15cd5df6b3b841d830eefa.svg)0 Add reaction

![Image 3](https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg)0 Like ![Image 4](https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg)0 Unicorn ![Image 5](https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg)0 Exploding Head ![Image 6](https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg)0 Raised Hands ![Image 7](https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg)0 Fire

0 Jump to Comments 0 Save Boost

Copy link

Copied to Clipboard

[Share to X](https://twitter.com/intent/tweet?text=%22LLM%20Frameworks%20vs.%20the%20Raw%20SDK%20in%20Java%22%20by%20Puneet%20Gupta%20%23DEVCommunity%20https%3A%2F%2Fdev.to%2Fgpuneet%2Fllm-frameworks-vs-the-raw-sdk-in-java-1ldj)[Share to LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Fgpuneet%2Fllm-frameworks-vs-the-raw-sdk-in-java-1ldj&title=LLM%20Frameworks%20vs.%20the%20Raw%20SDK%20in%20Java&summary=Building%20the%20same%20small%20tool-using%20agent%20on%20the%20raw%20Anthropic%20Java%20SDK%2C%20LangChain4j%2C%20and%20Spring%20AI%2C%20to%20see%20honestly%20where%20each%20framework%20earns%20its%20weight.&source=DEV%20Community)[Share to Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fdev.to%2Fgpuneet%2Fllm-frameworks-vs-the-raw-sdk-in-java-1ldj)[Share to Mastodon](https://s2f.kytta.dev/?text=https%3A%2F%2Fdev.to%2Fgpuneet%2Fllm-frameworks-vs-the-raw-sdk-in-java-1ldj)

[Share Post via...](https://dev.to/gpuneet/llm-frameworks-vs-the-raw-sdk-in-java-1ldj#)[Report Abuse](https://dev.to/report-abuse)

[![Image 8: Puneet Gupta](https://media2.dev.to/dynamic/image/width=50,height=50,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4015110%2F8d5a953f-c00b-4567-bccc-9c4a01d41176.jpeg)](https://dev.to/gpuneet)

[Puneet Gupta](https://dev.to/gpuneet)
Posted on Jul 5 • Originally published at [pg-blogs.netlify.app](https://pg-blogs.netlify.app/posts/26-llm-frameworks-vs-the-raw-sdk-in-java/)

# LLM Frameworks vs. the Raw SDK in Java

[#java](https://dev.to/t/java)[#ai](https://dev.to/t/ai)[#llm](https://dev.to/t/llm)[#langchain4j](https://dev.to/t/langchain4j)

## [](https://dev.to/gpuneet/llm-frameworks-vs-the-raw-sdk-in-java-1ldj#introduction) Introduction

Every LLM ecosystem now has at least one framework promising to make agents easier to build, and every framework post either oversells the abstraction or dismisses it outright. Neither is useful. The only honest way to evaluate a framework is to build the same thing twice — once on the vendor's raw SDK, once on the framework — and compare what each version actually cost you and actually gave you back.

This post builds the small tool-using agent from [Building Agentic Workflows in Java](https://pg-blogs.netlify.app/posts/14-building-agentic-workflows-in-java/) three ways: on the raw Anthropic Java SDK, on [
Read full article → ← Back to Reads

Related Videos

5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
How to create & run Native Ads with AI (I show everything)
How to create & run Native Ads with AI (I show everything)
Nick Theriot
What is RAG? (the fix for AI making things up) #RAG #AIexplained #LLM #ChatGPT #AIforBusiness
What is RAG? (the fix for AI making things up) #RAG #AIexplained #LLM #ChatGPT #AIforBusiness
__beginnerscode__
OpenAI's GPT-5.6 Sol: millions want it, 20 can use it #AInews #OpenAI #GPT56 #ChatGPT #AIsecurity
OpenAI's GPT-5.6 Sol: millions want it, 20 can use it #AInews #OpenAI #GPT56 #ChatGPT #AIsecurity
__beginnerscode__
Proprietary vs open-weight AI: What’s the difference? | Artificial Intelligence
Proprietary vs open-weight AI: What’s the difference? | Artificial Intelligence
Business Standard
Google Omni Masterclass FREE: Generate Unlimited Realistic Videos under 20 Mins 🔥
Google Omni Masterclass FREE: Generate Unlimited Realistic Videos under 20 Mins 🔥
Damini Tripathi