Why Java Developers Are Suddenly Building AI Agents (And Why It Matters)
Java is making an unexpected comeback in artificial intelligence, not as a legacy language, but as a serious contender for building enterprise AI agents. Rod Johnson, the legendary creator of the Spring Framework, recently unveiled Embabel, a new open-source agentic AI framework built on top of Spring Boot. The framework has already attracted over 3,000 GitHub stars and a team of more than five full-time engineers since its May 2025 launch. This move signals a significant shift in how enterprises might approach AI agent development, challenging the Python-dominated landscape that has defined generative AI for the past two years .
The emergence of Java-based agentic frameworks represents more than just another tool option. It reflects a fundamental recognition that Python, while excellent for research and prototyping, may not be the ideal language for building AI systems that need to run actual business processes reliably. Johnson's core argument is straightforward: enterprises have spent decades building their infrastructure, domain models, and business logic in Java. Why force them to rewrite everything in Python just to add AI capabilities ?
What Makes Embabel Different From Python Frameworks?
Embabel takes a radically different approach to agent orchestration compared to popular Python frameworks like LangChain and CrewAI. Instead of letting large language models (LLMs) decide which tools to call at runtime, or using rigid state machines defined ahead of time, Embabel employs a technique called Goal-Oriented Action Planning (GOAP). This algorithm, borrowed from game development, dynamically selects execution paths at runtime while remaining deterministic and predictable .
The key innovation is how Embabel integrates LLMs into Java's type system rather than treating them as black boxes. When a Java field carries a validation constraint, Embabel surfaces that constraint to the LLM as part of the prompt. If the LLM's response fails validation, the framework loops back and explains why, allowing the model to correct itself. This means the LLM becomes a participant in the application's type system, not just an external endpoint .
Johnson emphasized that model selection should be a per-step decision, not a global application setting. Different steps in a workflow may warrant different models depending on cost, latency, or capability requirements. Embabel supports multiple LLM providers out of the box, including OpenAI, Anthropic, and Llama, making it flexible for enterprises with diverse AI infrastructure needs .
How Are Java Frameworks Closing the AI Agent Gap?
The broader ecosystem of Java-based agentic frameworks is expanding rapidly. Beyond Embabel, developers now have access to LangChain4j, Crew4j, and JetBrains Koog, each offering different approaches to agent orchestration. This proliferation is significant because it addresses what many in the industry see as a widening gap between Python and Java adoption in the AI space .
Simon Ritter, deputy CTO at Azul Systems, a Java runtime provider, noted the strategic importance of this trend:
"My personal opinion is that the increasing availability of Java frameworks will help close the gap between Python and Java usage in the AI agent space," Ritter stated.
Simon Ritter, Deputy CTO at Azul Systems
The timing aligns with Java's evolution. Java 26, released recently, includes features that natively support the agentic nature of frameworks like Embabel. This suggests that the Java ecosystem is actively evolving to meet the demands of AI-driven applications, rather than treating AI as an afterthought .
Steps to Build Enterprise AI Agents With Java
If you're a Java developer considering building AI agents, here's how the modern approach differs from traditional chatbot development:
- Decompose Problems: Break large tasks into discrete steps. Some steps run as ordinary Java code, others invoke LLMs, and those LLM invocations can themselves call tools. This decomposition is the core job of a real agent framework.
- Leverage Type Safety: Use Java records, Plain Old Java Objects (POJOs), and Jakarta EE validation annotations. Embabel understands these natively and surfaces constraints to the LLM, ensuring valid responses before generation.
- Inject Context Automatically: Embabel automatically injects contextual information into every LLM prompt, including the current date, time, and the model's knowledge cutoff. This matters when LLM-driven steps need to make time-sensitive decisions.
- Design for Observability: Use the framework's tracing and monitoring capabilities to observe agent decisions, tool use, actions, and failures. This is essential for production systems where you need audit trails and compliance evidence.
- Plan Execution Paths Dynamically: Use GOAP or similar algorithms to find execution paths at runtime that were never explicitly programmed, while maintaining determinism and the ability to explain why a particular path was chosen.
Why Enterprises Are Paying Attention to Java Agents
The enterprise software world has a massive installed base of Java applications. According to industry analyst James Governor, co-founder of RedMonk, the logic is compelling: "With the distributed systems and cloud revolution, so much of the applications and systems that were built, so much of the infrastructure, were built in Java. The idea that somehow Java isn't going to play well with AI doesn't make any sense" .
Johnson himself emphasized that he doesn't view himself primarily as a Java person. Rather, he's focused on solving enterprise software problems. In the early 2000s, that problem was productivity with Java. In the mid-2020s, the problem is making generative AI relevant to business applications. For many enterprises, that means building on top of existing Java infrastructure rather than starting from scratch .
The broader agentic AI landscape includes numerous frameworks designed for different use cases. LangGraph excels at multi-step agent systems with human-in-the-loop capabilities. CrewAI focuses on role-based agent teams that collaborate autonomously. AutoGen from Microsoft emphasizes conversational interactions between agents. LlamaIndex specializes in retrieval-augmented generation (RAG) for data-heavy applications. Semantic Kernel targets enterprise .NET developers. And PydanticAI serves Python developers focused on type safety .
What distinguishes Embabel is its positioning as an "agent harness" rather than a low-level orchestration library. It sits at a higher level of abstraction and includes integration points for coding agents such as Claude Code and GitHub Copilot, allowing Embabel-based applications to incorporate those tools directly .
The emergence of Java-based agentic frameworks signals that the AI agent space is maturing beyond the initial Python-dominated phase. As enterprises begin deploying AI agents into production, they're discovering that language choice matters less than predictability, type safety, and integration with existing infrastructure. For organizations with substantial Java codebases, Embabel and similar frameworks offer a path to AI adoption that doesn't require a complete technology rewrite.