Starting from Python development ecosystem
At the beginning of my journey with agentic applications, I started with the Python programming language, leveraging LangChain/LangGraph. For testing and documentation, I relied on the simple yet powerful Jupyter Notebooks. Simultaneously, for rapid prototyping, I adopted the amazing Streamlit framework, which empowered me to quickly develop functional applications with an effective UI and excellent UX.
Moving from Python ecosystem to the Java one
When I started developing LangGraph4j, I tried to replicate my Python development ecosystem in Java. So I've experimented with the Java Notebooks through the rapaio-jupyter-kernel project, which allowed me to replicate the development experience I had with Jupyter Notebooks in Python quite well. For rapid prototyping, I relied almost entirely on Spring Boot framework, which is a fairly fast and enjoyable programming experience.
Javelit come to play ๐
Going on my efforts on LangGraph4j and continuously monitoring the most interesting and promising Java projects on GitHub, I discovered Javelit. This project intrigued me because of its reference to Streamlit, and after a review, I was amazed to realize that the dynamic programming model popularized by Streamlit had been adapted for Java by this initiative, which is cool.๐
So I started to evaluate it as part of may java development ecosystem and below i'll share with you my experience about it.
What is Javelit ๐
Javelit is a tool to quickly build interactive app frontends in Java, particularly for data apps, but itโs not limited to them. It helps you quickly develop rapid prototypes, with a live-reload loop, so that you can quickly experiment and update the app instantly.
How it works
Javelitโs architecture allows you to write apps the same way you write plain Java methods. Any time something must be updated on the screen, Javelit reruns your entire Java main method from top to bottom.
So you have to think about it as if your entire UI code runs inside a continuous loop that refreshes whenever something needs updating on the screen.
Javelit provides developers with a rich set of prebuilt components that make it easy to get started.
Just to provide you an idea of the Javelit approach below the inevitable "Hello World" code snippet
/// usr/bin/env jbang "$0" "$@" ; exit $?
import io.javelit.core.Jt;
public class App {
public static void main(String[] args) {
Jt.title("Hello World!").use();
Jt.markdown("""
## My first official message
Hello World!
""").use();
}
}
Then, once Javelit is installed, youโd run it with the following command:
javelit run App.java
Use Javelit with LangGraph4j
I've decided to use Javelit to develop some examples of LangGraph4j usage and below, I show you how have used Javelit to implement a demo app to run the LangGraph4j powered React Agent.
For simplicity I've reported only the meaningful code snippets, but for a complete code take a look to JtAgentExecutorApp.java for spring AI based implementation.
As Streamlit in Javelit entire application consist in just one main() method.
public class JtAgentExecutorApp {
public static void main(String[] args) {
Jt.title("LangGraph4J React Agent").use();
try {
// create a LangGraph4j Agent
var agent = AgentExecutor.builder()
.chatModel(/* instantiate the preferred ChatModel */)
.toolsFromObject( new MyTools() /* Custom Tools */ )
.build()
.compile();
// input: the user message
var userMessage = Jt.textArea("user message:")
.placeholder("user message")
.labelVisibility(JtComponent.LabelVisibility.HIDDEN)
.use();
// button: start agent processing
var start = Jt.button("start agent")
.disabled(userMessage.isBlank())
.use();
if (start) { // if button pressed
var outputComponent = Jt.expander("Workflow Steps").use();
var input = GraphInput.args(Map.of("messages", new UserMessage(userMessage)));
var generator = agent.stream(input);
final var startTime = Instant.now();
for( var step : generator ) {
Jt.sessionState().remove("streaming");
Jt.info("""
#### %s
%s
""".formatted(s.node(),
s.state().messages().stream()
.map(Object::toString)
.collect(Collectors.joining("\n\n")))
).use(outputComponent);
}
final var elapsedTime = Duration.between(startTime, Instant.now());
Jt.success("finished in %ds%n".formatted(elapsedTime.toSeconds())).use();
}
} catch (Exception e) {
Jt.error(e.getMessage()).use();
}
}
}
The output of the Javelit app looks like:
Chat model selection view
Start agent view
Results view
๐ try yourself ๐ ๐ ๐คฏ
If you want try yourself (after installed javelit) run the command
javelit run https://github.com/langgraph4j/langgraph4j/tree/main/spring-ai/spring-ai-agent/src/test/java
Conclusion
Javelit brings the power of rapid prototyping and interactive web app development to the Java ecosystem, much like Streamlit does for Python. With its simple, loop-based programming model, developers can quickly build data-driven applications without needing extensive frontend knowledge, leveraging familiar Java syntax and the rich JVM ecosystem. The live-reload feature enables instant experimentation and iteration, making it ideal for prototyping AI agents, data visualizations, and interactive tools. By integrating seamlessly with libraries like LangGraph4j combined with both Spring AI and LangChain4j, Javelit empowers Java developers to create engaging user interfaces effortlessly, bridging the gap between backend logic and user-facing applications.
Checkout project, try it and let me know your feedback and ... happy coding! ๐
References
Originally published at https://bsorrentino.github.io on December 20, 2025.



Top comments (0)