Be the first to know and get exclusive access to offers by signing up for our mailing list(s).

Subscribe

We ❤️ Open Source

A community education resource

2 min read

Bring AI into your Jakarta EE apps with open source tools

Learn how Jakarta EE and SmallRye LLM make it easy to build conversational agents in Java.

Enterprise Java is evolving, infusing artificial intelligence (AI) into everyday workflows. Imagine a Jakarta EE application that understands user intent, holds conversations, and pulls insights from unstructured documents. With open source tools like SmallRye LLM and LangChain4j, this vision is now reality.

Bringing AI into the Jakarta EE world

Thanks to the SmallRye LLM project, developers can now inject Large Language Models (LLMs) directly into Jakarta EE applications using CDI (Contexts and Dependency Injection). With just a few annotations, your services can access powerful AI capabilities. Even better, you’re not locked into one provider. Whether you want to use OpenAI, Hugging Face, or Ollama, SmallRye LLM can support and adapt.

This stack is designed for serious workloads:

  • Tooling integration: Define backend services as tools callable by LLMs.
  • Contextual memory: Add chat memory with a sliding window—essential for coherent conversations.
  • Retrieval-augmented generation (RAG): Feed in domain-specific documents to ground responses in business logic.
  • Fault tolerance & telemetry: Built-in MicroProfile features make sure your AI agents stay reliable and observable.

Read more: Why AI won’t replace developers

A real example: Car booking assistant

One demo app from Payara Services shows how to build a conversational agent that helps users book rental cars:

  • Runs on Payara Micro with Jakarta EE APIs
  • AI agent parses user input and responds naturally
  • Documents (like fleet info or company policies) are used via RAG to personalize answers
  • Config is declarative: No need to hard-code model access or memory management

Let’s code

This is AI made for Java developers, by Java developers. You don’t need to switch languages or learn a new framework, just bring your Jakarta EE skills and start experimenting.

Want to see it in action? Bring your use case, plug in the AI tools, and try the Payara car booking demo for yourself. It’s open source and ready to explore. Ready to build? Start creating AI agents with the tools you already know.

Get started:

More from We Love Open Source

The opinions expressed on this website are those of each author, not of the author's employer or All Things Open/We Love Open Source.

Working on something worth sharing? Write for us.

Contribute to We ❤️ Open Source

Help educate our community by contributing a blog post, tutorial, or how-to.

Two World-class Events

If you didn't make it to All Things AI, check out the event summary, and make plans to join us October 19-20 for All Things Open.

Open Source Meetups

We host some of the most active open source meetups in the U.S. Get more info and RSVP to an upcoming event.