Day 1 with Spring AI and honestly, I didn't expect it to be this smooth. 🚀 As a Java Full Stack developer, I always thought integrating AI into a Spring Boot app would be complex. Today I proved myself wrong. Here's what I built on Day 1: ✅ Created a Spring Boot project ✅ Added the Spring AI + OpenAI dependency ✅ Configured the API key in application.properties ✅ Wrote a ChatController with a simple GET endpoint ✅ Used Postman to send a question as a query param and got a real AI response back The code was surprisingly clean. Just inject ChatClient.Builder, build the client, call .prompt().user(q).call().content() and that's it. Your Spring Boot app is now talking to GPT. What surprised me most? How little boilerplate Spring AI needs. It follows the exact same patterns I already know from Spring Boot auto-configuration, dependency injection, application.properties. No black magic. But there's a catch nobody talks about upfront. Every single API call costs money. And every question you ask . your data leaves your machine and lands on OpenAI's servers. For learning and testing, that adds up fast. For anything private or sensitive, it's a real concern. So that's my next challenge: run a model 100% locally. Free, private, offline. Exploring Ollama next , it lets you run models like Llama 3 and Mistral directly on your laptop, and Spring AI supports it natively with almost zero code change. #SpringAI #SpringBoot #Java #LearningInPublic #RAG #GenerativeAI #JavaDeveloper
Rizwan Zaheer’s Post
More Relevant Posts
-
✅🚀 𝗝𝗮𝘃𝗮 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 𝘁𝗵𝗲 𝗔𝗜 𝗲𝗿𝗮 𝗶𝘀 𝗰𝗮𝗹𝗹𝗶𝗻𝗴 𝘆𝗼𝘂𝗿 𝗻𝗮𝗺𝗲 💯 . I just discovered Spring AI, and honestly? It changes everything for backend engineers. Here's what it is in plain terms: → An application framework for AI engineering → Inspired by LangChain but built specifically for Java → Lets your Spring Boot apps talk directly to LLMs like OpenAI, Anthropic, and local models via Ollama (Mistral, DeepSeek) I'm currently building a full-stack project to prove this out: • Backend: Spring AI + Spring Boot • Frontend: React • Use case: Prompt-based Q&A connected to both cloud & local models The fact that Java engineers no longer have to sit on the sidelines of the AI revolution is a huge deal. No Python context switching. No rebuilding your stack. Just Spring the way you already know it. 📌 If you're a Java developer wondering how to get started with LLMs Spring AI might be your fastest path in. Are you building anything with Spring AI? Drop it in the comments 👇 #SpringAI #Java #SpringBoot #LLM #AIEngineering #GenerativeAI #SoftwareDevelopment #BackendDevelopment #OpenAI #Ollama
To view or add a comment, sign in
-
-
Most Spring AI apps are stateless by default — every call forgets everything. That's fine for one-shot queries. It's a problem the moment users expect a conversation. Memory & Context in Spring AI fixes this at the architecture level. Instead of manually stitching together message history, you wire a MessageChatMemoryAdvisor into your ChatClient and Spring AI handles context propagation automatically. Pair that with Conversation IDs and you get fully isolated sessions per user — no context bleed, no shared state nightmares in multi-tenant apps. Where this actually matters in production: Imagine a customer support bot that remembers a user reported Issue #42 three messages ago and connects it to their follow-up question — without you writing a single line of session logic. That's what persisted JDBC-backed memory enables. Even after a redeploy, the conversation picks up where it left off. Prompt chaining adds another layer: decompose complex workflows into discrete LLM calls, pass outputs downstream, and map final results directly to typed Java entities. Key insight: Statefulness isn't a UI concern — it's a backend architecture decision. Spring AI gives Java engineers the right abstractions to own it. #SpringAI #Java #AIEngineering #SpringBoot #BackendDevelopment
To view or add a comment, sign in
-
-
🚀 I built an AI-powered backend system using Spring Boot… Here’s what most tutorials don’t tell you. --- Over the last few days, I shared a full breakdown of my system: • AI query generation • Prompt engineering • Validation layers • Dynamic queries • Cost optimization --- But here’s the truth 👇 --- 💡 Building AI systems is NOT about calling an API. That’s the easiest part. --- ⚠️ The real challenges are: • Controlling AI output • Preventing invalid queries • Handling unpredictable responses • Managing cost & latency • Making it production-safe --- 🧠 What I learned: 1️⃣ AI needs guardrails Without validation → it breaks fast --- 2️⃣ Prompt engineering = core backend logic Not just “some text” --- 3️⃣ Backend fundamentals still matter Spring Boot, JPA, architecture → everything is still relevant --- 4️⃣ AI should be optimized, not overused More calls ≠ better system --- 5️⃣ Real systems evolve Feedback loops > static logic --- 🔥 Final takeaway: Most people are building: ❌ AI demos But real engineers should build: ✅ AI-powered systems --- This project changed how I think about backend engineering. --- Thinking of open-sourcing this project. Would you be interested? #SpringBoot #AI #BackendEngineering #Java #SystemDesign
To view or add a comment, sign in
-
-
Every Java developer is watching the AI wave. Most don't know you can ride it without leaving Spring Boot.Save this carousel. The developer who starts with Spring AI in April will be leading the AI project by Q3. #SpringAI #JavaDeveloper #SpringBoot #AIForDevelopers #GenerativeAI
To view or add a comment, sign in
-
🚀 Building a Coding Agent with Spring AI Recently, I came across a great YouTube tutorial by Dan Vega titled: “Build a Coding Agent Like Claude Code with Spring AI” It was one of those demos that looks simple on the surface but teaches a very powerful pattern. 🤖 What did I learn? In just ~60 lines of Java, you can build a CLI-based AI coding assistant using Spring Boot + Spring AI that can: ✅ Read files from a codebase ✅ Search code using grep & glob ✅ Run shell commands ✅ Maintain conversational memory ✅ Reason autonomously about which tool to use and when You point the agent at a project and ask questions like: “What does the main application class do?” “Find all TODOs in the codebase” “Run the tests and tell me what failed” The LLM (Claude) decides which tools to call, chains them together, and responds intelligently — all from your terminal. 🧠 Why this is interesting (beyond the demo) This project isn’t just about a “coding assistant”. It demonstrates a powerful architectural pattern: An LLM + Tools + Memory + Conversational Loop And this same pattern can be applied to: 🔧 DevOps & Infrastructure assistants 📊 Log analysis & debugging 🗄️ Database exploration via JDBC tools 📚 Internal documentation search 🔐 Security auditing (grep + tools like semgrep/trivy) 🧪 Test generation and execution 🧭 Exploring large or legacy codebases 🧩 Tech Stack Used Spring Boot 4.0.2 Spring AI 2.0.0-M2 Spring AI Agent Utils Claude (Anthropic) Java 25 What I loved most 👉 model‑agnostic design. Thanks to Spring AI abstractions, switching from Anthropic to OpenAI, Ollama, or another provider requires config changes only, not code changes. 🌱 Key takeaway AI agents don’t need massive frameworks or thousands of lines of code. With the right abstractions, you can build useful, tool‑aware agents that work directly with real systems — not just chat windows. Big thanks to Dan Vega and the Spring AI community for such a clear and practical example 🙌 📌 I’m sharing this as part of my learning spring ai journey. If you’re experimenting with Spring AI, AI agents, or developer productivity tools, I’d love to hear your thoughts! #SpringAI #Java #AIEngineering #LLM #Claude #DeveloperTools #LearnInPublic #SpringBoot #Agents
To view or add a comment, sign in
-
-
Hello tech community 👋 Is Java becoming the brain of AI? 🧠 I’ve been diving deep into the news regarding Spring Framework 7 this week, and it’s clear we are moving past simple "apps" into the era of "AI Agents." As a developer, what’s most exciting isn't just the code—it's how these updates change the way our applications "think." Here are the highlights that caught my eye: •Multi-Agent Memory: The new Agentic Session API allows different AI agents to work together like a team. It gives them a "memory" so they don't lose track of the conversation context. •Built-in Resilience: Features like retries and rate-limiting are now part of the core. This means cleaner code for us and more stable apps for the users. •JDK 25 Boost: Optimized for the latest Java versions, it handles thousands of tasks simultaneously using very little memory—perfect for high-traffic systems. •Native Performance: Thanks to better GraalVM support, apps start up in milliseconds. As I continue my journey in Full Stack development, seeing Java evolve this natively is incredibly inspiring. The "Full Stack" just got a lot more intelligent! What’s your take? Is your tech stack ready for the shift to Agentic AI? #SpringFramework #Java #FullStack #AI #SoftwareEngineering #TechTrends #ContinuousLearning
To view or add a comment, sign in
-
-
Java is no longer “just backend.” It’s becoming a serious player in AI, RAG, and Agentic systems 🚀 And honestly… I didn’t believe it at first. Like most engineers, I assumed: AI = Python ecosystem. But instead of debating it… I decided to build. I started exploring RAG (Retrieval-Augmented Generation) using LangChain4j and Spring AI inside a Spring Boot service. At first, it felt unfamiliar. Embeddings… vector databases… LLM calls… A completely different mindset from traditional APIs. But then things started to click. I built a simple pipeline: → Convert data into embeddings → Store in a vector database → Retrieve relevant context → Let the LLM generate grounded responses And suddenly… it wasn’t “AI hype” anymore. It was working. So I pushed it further. I simulated a real-world payments scenario: → Query transaction-like data → Retrieve contextual history → Let AI explain failures and anomalies And that’s when it hit me— This is not about replacing systems. It’s about augmenting them with intelligence. 💡 The biggest realization: We don’t need to move away from Java to build AI systems. We can evolve what we already have. Java + RAG =Scalable. Secure. Enterprise-ready AI. Still early. Still experimenting. But this shift feels real. And I’m all in 🚀 #Java #AI #RAG #GenAI #SpringBoot #DistributedSystems #Fintech
To view or add a comment, sign in
-
I've been using GitHub Copilot and Claude AI daily for the past year as a Senior Java engineer. Honest take? They're genuinely useful. But not for the reasons most people think. What AI tools are actually good at: ✅ Boilerplate — Spring Boot service scaffolding, DTOs, test skeletons ✅ Explaining unfamiliar code fast ✅ Writing unit tests (especially edge cases I'd have missed) ✅ Debugging error messages at 11pm when no one's online ✅ First drafts of SQL queries and regex patterns What they're still bad at: ❌ Understanding your actual system context ❌ Architectural decisions — it'll give you an answer, but not necessarily the RIGHT one for your constraints ❌ Anything involving internal business logic it's never seen ❌ Knowing when NOT to use a pattern The engineers getting the most out of AI aren't the ones who trust it blindly. They're the ones who know enough to catch when it's wrong. AI made me faster. It didn't replace the judgment that comes from 8 years of building production systems. #AI #SoftwareEngineering #GitHubCopilot #Java #DeveloperProductivity
To view or add a comment, sign in
-
JetBrains just made a very strategic move for the JVM ecosystem — Koog is now available for Java. For years, AI agent development has been heavily Python-centric. That worked fine for experimentation, but in real enterprise systems, it introduced a familiar set of problems: context switching, fragmented architectures, and operational overhead. With Koog coming to Java, that gap is starting to close. What stands out to me is not just “Java support”, but how it’s being done: • Native JVM-first approach — no sidecar Python services, no glue code • Idiomatic Java APIs — fluent builders, familiar abstractions, fits naturally into existing Spring Boot stacks • Production-grade concerns built-in — persistence, fault tolerance, observability (OpenTelemetry) • Agent workflows as first-class citizens — functional, graph-based, and planning strategies instead of prompt spaghetti This is important. Because the real challenge with AI in enterprises is not calling an LLM. It’s building systems that are predictable, debuggable, and cost-aware at scale. Koog seems to acknowledge that reality. Instead of treating agents as black boxes, it pushes toward structured, observable workflows — something backend engineers have been asking for. Also interesting: it supports multiple LLM providers out of the box and focuses on token optimization (history compression), which becomes critical at scale. My take as a backend engineer: We’re moving from “AI experiments in notebooks” → “AI systems inside core backend services”. Frameworks like Koog are a signal that the JVM ecosystem is not going to stay behind in this shift. If this matures well, I wouldn’t be surprised to see: → AI agents becoming just another Spring bean → Standardized patterns for agent orchestration → JVM-native alternatives to LangChain-style architectures Curious to see how this evolves, especially in high-scale, regulated environments. If you’re building backend systems on Java, this is definitely worth keeping on your radar. #Java #AI #JVM #BackendEngineering #Microservices #LLM #JetBrains #SoftwareArchitecture
To view or add a comment, sign in
-
Building a Deep Research Agent with Spring AI & Browserbase After exploring AI coding agents, I recently watched another excellent tutorial by Dan Vega: “Build a Deep Research Agent with Spring AI & Browserbase” This one dives into something even more exciting 👉 building a deep research agent, similar to ChatGPT’s Deep Research feature — but entirely in Java. 🧠 What does this agent actually do? Given a topic, the agent: Generates diverse search queries using an LLM Fetches real web content via Browserbase’s Search API Handles JS‑rendered pages, auth, and headless browsing (not just static HTML) Synthesizes everything into a structured Markdown research report The final output includes: ✅ Executive summary ✅ Key findings ✅ Major themes ✅ Open questions & next steps This feels much closer to actual research than a simple “search + summarize” flow. ⚙️ What stood out technically A few things I found especially interesting: Multi‑step research pipeline discover → fetch → synthesize using Spring AI’s chat client Browserbase Search API Unlike traditional search APIs, it works with: JavaScript-heavy pages Authenticated content Real browser execution via headless infra Concurrency with virtual threads Parallel page fetching with controlled limits — clean and scalable Custom Spring Boot Starter Dan even created a Browserbase Spring Boot Starter, making integration feel native to the Spring ecosystem Runs on free tooling The entire workflow can run with: Open models (Ollama / LM Studio) Browserbase free tier (1,000 searches/month) 💡 Why this matters This project shows that Java + Spring AI is absolutely capable of building: Research agents Knowledge synthesis systems Internal analyst tools AI-powered documentation miners And it reinforces a powerful idea: LLMs become truly valuable when paired with real-world tools, workflows, and structure. 🌱 Personal takeaway Spring AI is shaping up to be much more than “AI chat in Java”. It’s a foundation for agentic systems, research pipelines, and production‑grade AI workflows — all with the familiarity of Spring Boot. Huge respect to Dan Vega for consistently demonstrating practical, understandable AI patterns for Java developers 🙌 Sharing this as part of my #LearnInPublic journey. If you’re building AI agents, research tools, or exploring Spring AI — would love to exchange ideas! #SpringAI #Java #AIEngineering #DeepResearch #Browserbase #LLM #SpringBoot #LearnInPublic #AgenticAI
To view or add a comment, sign in
-
Explore related topics
- Open Source AI Developments Using Llama
- How to Integrate AI in Software Development
- LLaMA 3 Applications in Machine Learning
- Building AI Applications with Open Source LLM Models
- How Generative AI Models Function
- How to Thrive with Generative AI
- Llama AI Model's Impact on AI Accessibility
- How to Use OpenAI Reasoning Models in Business
- How Openai is Changing AI Consulting
- Best Use Cases for AI Models
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Need to purchase API key Spring AI integration didn't work in the free tire If i am wrong then please tell me how to use it I want to integrate char model in my project not a direct call to the Ai server Please guide