Imagine managing your Jakarta EE applications not just with Maven goals, but by asking natural questions.
With the experimental AI Agent built into the Payara Server Community’s Maven Plugin, you can now query server internals and perform admin tasks using plain English — directly from the same terminal where you build and deploy your applications.
Thanks to this integration, developers can inspect, query and even execute server commands using natural language. It’s a powerful and intuitive way to interact with Payara Server — no need to remember long command syntax or dig through documentation.
In this post, I’ll walk you through how it works, with real examples that show just how seamless the AI-powered CLI experience can be.
What Is the Payara Server Maven Plugin?
The Payara Server Maven Plugin simplifies server lifecycle management and app deployment via Maven goals like:
start: Launch the server with configurable options.
dev: A development-friendly mode enabling auto build, auto deploy, live reload browser, and session persistence.
Now, with the AI Agent, it goes a step further, bringing intelligence control directly to your terminal.
Meet the AI Agent (Experimental)
The AI Agent listens to natural language queries typed in your terminal. Instead of memorizing asadmin commands, you can now just ask:
“What is the current heap usage? Show thread pool stats. Create a JDBC connection pool Ping a JDBC pool. “
It interprets your questions, queries internal APIs (JMX, domain.xml, logs, etc.), and responds intelligently. Perfect for speeding up diagnostics and reducing context switching.
Demo #1 – Memory & Threads, in Plain English
In the first clip below, I ran the mvn payara-server:dev goal and started typing natural queries into the CLI:
✅ What’s happening:
Asked about current non-heap memory usage (both absolute and percentage)
Queried heap memory
Requested details on thread pools
Asked how many threads are allocated
👉 See it in action: No need to dig through JMX or logs manually. The AI Agent fetches and summarizes it instantly.
Demo #2 – JDBC, JMX, and JMS Made Easy
In the second demo, I explored resource management features:
✅ What’s happening:
Asked the AI to create a JDBC connection for a PostgreSQL DB named alphadb using user alphauser
Listed all existing JDBC connection pools
Pinged a known pool (h2pool)
Asked how to create a JMX resource
Checked for existing JMS resources
👉 See it in action: Instead of navigating the admin console or writing XML config, AI does the heavy lifting.
Configuring the AI Agent
To unlock the full capabilities of the Payara AI Agent, you can fine-tune its behavior using system properties or environment variables. Here’s what you need to know:
Essential Configuration Variables
Environment Variable
System Property
Description
PAYARA_AI_AGENT
payara.ai.agent
Enables the AI Agent (true or false). Default: true in dev mode.
PAYARA_AI_API_KEY
payara.ai.api.key
Your API key for accessing the AI service provider (e.g., OpenAI). Required for most providers.
PAYARA_AI_PROVIDER
payara.ai.provider
Defines the AI provider to use. See list below.
PAYARA_AI_MODEL
payara.ai.model
Specifies the AI model (e.g., gpt-4o-mini, claude-3-opus, etc.).
This gives you flexibility to run models locally (e.g., Ollama, LM Studio), via API (e.g., OpenAI, Google, Mistral), or even from custom endpoints.
Final Thoughts
The Payara Server Maven Plugin already simplified the Jakarta EE development lifecycle but with the AI Agent, it becomes an intelligent assistant. Whether you’re inspecting memory, managing JDBC pools, or just experimenting, it drastically reduces friction and boosts productivity.
⚠️ As powerful as the AI Agent is, it’s still experimental and not recommended for production environments.
⚠️ Also, since it accesses sensitive runtime internals like JMX metrics, logs, configuration files and connection pool details, keep it restricted to local development, testing or isolated sandboxes.
Want to see this in action?
We’re hosting a free, 45-minute webinar where we’ll demo the AI Agent in the Payara Server Community Maven Plugin. You’ll discover how to query server metrics, manage JDBC and JMS resources, and run diagnostics in plain English — all from your terminal. This session is designed for the community: experimental, fun, and a glimpse into how AI can make Jakarta EE development more intuitive. Watch the Replay of the webinar!
Ready to check out our latest AI tool? Get the latest version of Payara Server Community now and give the enhanced plugin a try in your next project!
Start Using Payara Server Maven Plugin with AI Agent
Streamline builds, automate repetitive tasks, and experiment with intelligent code assistance—all within your familiar Maven environment.
How to Run and Scale AI Java Applications in Production: An Overview for Developers with no Machine Learning Expertise
Organizations are increasingly interested in adopting artificial intelligence (AI) and generative AI (GenAI) to improve operations and offer next-generation […]
3 minutes
Community
Dominika Tasarz
30 Sep 2025
The Payara Monthly Catch -September 2025
Welcome aboard the September issue of The Monthly Catch! With summer holidays wrapping up, the Java world is back […]
4 minutes
Community
Dominika Tasarz
02 Sep 2025
The Payara Monthly Catch – August 2025
Welcome aboard the August 2025 issue of The Payara Monthly Catch! With summer in full swing, things may have felt […]