Building intelligent, tool-enabled AI systems in Java requires more than sending prompts to a language model. A well-structured implementation must…