Since you are using Java you should take a look at Spring AI. You can build an agent with almost any model and model provider, full control over the inference parameters, tool functions, MCP, history, context management and RAG out of the box in less than an hour once you are comfortable with it. It can fit in a single class and you can refactor it later. Easier to get started to see how it all ties together before you break it up to optimize it. Before anyone thinks Java cannot do a good tui. It can and I built one that looks similar to Amp Code. Not an inference engine but an AI Java agent.
P.S. For Java programmers this is a good way to learn then you can branch out on your own and build all of this functionality from scratch. It is a really good learning experience and it is not as hard as you might think.
View all comments
3
u/Ok_Substance1895 19d ago edited 19d ago
Since you are using Java you should take a look at Spring AI. You can build an agent with almost any model and model provider, full control over the inference parameters, tool functions, MCP, history, context management and RAG out of the box in less than an hour once you are comfortable with it. It can fit in a single class and you can refactor it later. Easier to get started to see how it all ties together before you break it up to optimize it. Before anyone thinks Java cannot do a good tui. It can and I built one that looks similar to Amp Code. Not an inference engine but an AI Java agent.
P.S. For Java programmers this is a good way to learn then you can branch out on your own and build all of this functionality from scratch. It is a really good learning experience and it is not as hard as you might think.