AI Agent Platform
An enterprise Java AI agent server, built on Spring Boot and LangChain4j, combining ReAct reasoning, hybrid retrieval-augmented generation, and semantic caching for knowledge Q&A.
AI Agent Platform is a Java 17 AI agent backend built on Spring Boot 3.5 and LangChain4j, aimed at enterprise knowledge question-answering and customer service rather than a single-call model demo. It implements a ReAct reasoning loop with protection against infinite loops, timeouts, and excessive steps; adaptive retrieval-augmented generation that routes and rewrites a query, retrieves across multiple rounds, and self-verifies results; hybrid retrieval combining Milvus vector search and BM25 keyword search fused with reciprocal rank fusion; and function calling through a registry of allow-listed database tables and domain-allow-listed external APIs.
To control cost and reliability, it adds semantic caching keyed on embedding similarity with a time-to-live, routing across multiple models such as DeepSeek, Qwen, and local Ollama models with automatic fallback on failure, and observability through Micrometer, Prometheus, and Grafana metrics across chat, retrieval, and ingestion latency. A built-in evaluation service measures recall, accuracy, and latency against an independent dataset.
It runs with Docker Compose for its full dependency stack, including MySQL, Redis, and Milvus, or against a hybrid of local services and a cloud Milvus instance.