Redick01/MaxKB4j

MaxKB4j is an open-source LLMOps platform for LLM workflow applications and RAG developed based on the Java language. The project mainly draws on MaxKB, Dify and FastGPT, and combines the advantages of the two into one project. It is redesigned and developed using the high-performance, high-stability and secure reliable JAVA language.

โ˜… 0Forks 0GitHub โ†—Compare

Project website โ†—

README

๐Ÿง  MaxKB4j โ€” Enterprise-Grade Intelligent Q&A System: Out-of-the-Box RAG + LLM Workflow Engine

MaxKB4j = Max Knowledge Brain for Java A ready-to-use, secure, model-agnostic RAG (Retrieval-Augmented Generation) + LLM workflow engine, purpose-built for enterprise-grade intelligent Q&A systems. Widely used in scenarios such as intelligent customer service, internal enterprise knowledge bases, data analysis, academic research, and education.

License: GPL v3 Java 21+ Spring Boot 3.x LangChain4j
[ไธญๆ–‡(็ฎ€ไฝ“)] | [English]


๐Ÿ’ก Why Choose MaxKB4j?

In today's AI application boom, are you facing these challenges?

  • โŒ Complex Integration: Existing solutions rely on Python ecosystem, making it costly for Java teams to get started?
  • โŒ Serious Hallucinations: Generic large models answer inaccurately and cannot integrate with internal enterprise data?
  • โŒ Concurrency Bottlenecks: Traditional architectures struggle to support high-concurrency scenarios with high response latency?
  • โŒ Limited Functionality: Only simple Q&A, unable to handle complex business workflows and multi-Agent collaboration?

MaxKB4j Provides You with a One-Stop Solution:

Built on Java 21 + Spring Boot 3 + Virtual Threads, perfectly integrating RAG (Retrieval-Augmented Generation) with visual workflow. Empower your applications with AI capabilities of "understanding, reasoning, and execution" without modifying existing systems.


โœจ Core Features

Feature Category Detailed Description
โฐ Triggers โ€ข Scheduled Task Trigger: Supports configuring Cron expressions or visual timeline for unattended automation of agents and tools (e.g., daily automatic data report generation, scheduled competitor information crawling).
โ€ข Event Callback Trigger: Supports Webhook integration with external system events for real-time response (e.g., automatically trigger customer profiling Agent when new leads are added in CRM, trigger alert notifications when database data changes).
๐Ÿ” Out-of-the-Box Knowledge Base Q&A โ€ข Supports uploading local documents (PDF/Word/TXT/Markdown, etc.)
โ€ข Supports automatic web content crawling
โ€ข Supports custom workflow knowledge base writing
โ€ข Automatically handles: text chunking โ†’ vectorization โ†’ storage in vector database โ†’ RAG pipeline construction
โ€ข Significantly reduces LLM "hallucinations", improves answer accuracy and reliability
โšก High Concurrency & High Performance โ€ข Built on Java 21 + Spring Boot 3 + Virtual Threads (Project Loom), fully leveraging modern JVM's lightweight concurrency capabilities for significantly improved throughput and response speed.
โ€ข Adopts reactive programming model (Reactor) and asynchronous non-blocking I/O, effectively handling thousands of concurrent requests with lower resource usage and lower latency.
โ€ข Built-in multi-level caching mechanism to accelerate knowledge retrieval and model call chains.
๐ŸŒ Model-Agnostic & Flexible Integration Supports various mainstream large language models, including:
โ€ข Local Private Models: DeepSeek-R1, Llama 3, Qwen 2, etc. (via Ollama / Xorbits Inference / LocalAI)
โ€ข Chinese Public Models: Tongyi Qianwen, Tencent HunYuan, ByteDance Doubao, Baidu Qianfan, Zhipu GLM, Kimi, DeepSeek, etc.
โ€ข International Public Models: OpenAI (GPT), Anthropic (Claude), Google (Gemini)
โš™๏ธ Visual Workflow Orchestration โ€ข Built-in low-code AI workflow engine, supports conditional branching, function calling, multi-turn conversation memory
โ€ข Provides rich built-in function library (HTTP requests, database queries, time processing, regex extraction, etc.)
โ€ข Suitable for complex business scenarios: customer support ticket generation, data report interpretation, internal policy Q&A, etc.
๐Ÿค Multi-Agent Collaboration โ€ข Built-in Multi-Agent collaboration framework, supports multiple specialized AI Agents working in parallel or sequentially
โ€ข Each Agent can be configured with independent roles (e.g., data analyst, code reviewer, customer service specialist), dedicated knowledge bases and toolsets
โ€ข Supports dynamic task distribution and context-aware Agent routing, complex tasks are automatically decomposed, assigned, and aggregated (e.g., user question โ†’ requirement understanding Agent โ†’ data query Agent โ†’ report generation Agent)
โ€ข Provides inter-Agent communication mechanism and shared memory bus, ensuring information consistency and collaboration coherence
โ€ข Suitable for advanced scenarios: cross-department process automation, end-to-end product design, joint fault diagnosis, etc.
๐Ÿงฉ Seamless Integration into Existing Systems โ€ข Provides RESTful API and frontend embedding components (iframe / Web SDK)
โ€ข No need to modify existing systems, integrate intelligent Q&A capabilities in 5 minutes
โ€ข Provides OpenAI-compatible dialogue interface
๐Ÿค– Skill Tools โ€ข Supports MCP protocol, enabling AI to understand code context, project structure, and dependencies
โ€ข Supports local code function programming tool calls
โ€ข Supports HTTP interface tool calls
โ€ข Supports Claude SKILLS skill calls
๐ŸŽ™๏ธ Multimodal Extensions โ€ข Speech Recognition (ASR), Speech Synthesis (TTS)
โ€ข Image Recognition (OCR), Image Generation (Stable Diffusion)
๐Ÿ”’ User Permission Management โ€ข Fine-grained permission control (application / knowledge base / tool / model)
โ€ข Audit logs, authentication and authorization (based on Sa-Token)
๐ŸŒฑ Ecosystem Extensions (Extensibility & Out-of-the-Box) โ€ข Rich Agent template library: Provides dozens of pre-built Agent templates (e.g., customer service assistant, data analyst, code mentor, meeting note taker), one-click enable, quick adaptation to business scenarios.
โ€ข Flexible plugin tool marketplace: Supports dynamic loading of functional modules through plugin mechanism, including:
โœ… Data connectors (MySQL, PostgreSQL, MongoDB, etc.)
โœ… Third-party service integrations (Feishu, DingTalk, WeCom)
โœ… Web search tools (Google Search, SearchApi, SearXNg, etc.)

๐Ÿš€ Quick Start

1. System Requirements

  • Java 21+
  • PostgreSQL 12+ (with pgvector extension enabled)
  • MongoDB 6.0+ (optional, for full-text search)

2. Deployment

2.1 Local Startup (JAR Mode)

# Start the application
java -jar maxkb4j-start.jar

2.2 Docker Deployment

docker run --name maxkb4j -d --restart always -p 8080:8080 -e SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/MaxKB4j -e SPRING_DATASOURCE_USERNAME=postgres   -e SPRING_DATASOURCE_PASSWORD=123456  -e SPRING_DATA_MONGODB_URI=mongodb://admin:123456@localhost:27017/MaxKB4j?authSource=admin  registry.cn-hangzhou.aliyuncs.com/tarzanx/maxkb4j
  • The first 8080 in -p 8080:8080 is the host port, the second 8080 is the container port
  • -e SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/MaxKB4j -e SPRING_DATASOURCE_USERNAME=postgres -e SPRING_DATASOURCE_PASSWORD=123456 are PostgreSQL database connection parameters, can be modified as needed
  • -e SPRING_DATA_MONGODB_URI=mongodb://admin:123456@localhost:27017/MaxKB4j?authSource=admin is MongoDB connection parameter, can be modified as needed

2.3 Docker-Compose Deployment (Recommended)

# See docker-compose.yml example in project root directory
docker-compose up -d

2.4 Deploy to Third-Party Platforms

Deploy to Sealos

Sealos servers are located overseas, no need to handle network issues separately, supports high concurrency & dynamic scaling.

Click the button below for one-click deployment:

Deploy on Sealos

3. Access Web Interface

On first launch, the database (PostgreSQL + MongoDB) will be automatically initialized, please ensure ports are not occupied.


๐Ÿ›  Tech Stack

Category Technology
Backend Java 21, Spring Boot 3, Sa-Token (Authentication)
AI Framework LangChain4j
Vector Database PostgreSQL 15 + pgvector
Full-Text Search MongoDB 5.0+
Caching Caffeine
Frontend Vue 3, Node.js v20.16.0

๐Ÿ“ธ UI Preview

MaxKB4j team


๐Ÿค Contributing Guide

We welcome community contributions! If you have suggestions, bug reports, or new feature requests, please submit them via Issue or directly submit a Pull Request.

Category Description
๐ŸŽฏ How to Contribute Fix bugs, develop new features, improve documentation, write tests, or optimize UI/UX.
๐Ÿ“‹ Process Fork project โ†’ Create branch โ†’ Commit changes โ†’ Push branch โ†’ Open Pull Request.
๐ŸŽจ Standards Follow Alibaba Java Coding Guidelines, include unit tests, and update documentation.

๐Ÿ’– Support & Sponsorship

๐ŸŒŸ Open source is not easy, persistence is harder MaxKB4j is maintained by individual developers and community members. Your support will be directly used for server costs, token testing consumption, API testing, bug fixes, and new feature development!

Tier Amount Core Benefits Target Audience
โ˜• Coffee Support ยฅ10 โ€ข Add author on WeChat vxhqqh
โ€ข Join core discussion group (mention "sponsored")
โ€ข Priority notification of project updates
Individual developers who recognize project value
๐Ÿ“š Learning Member ยฅ50 โ€ข All Coffee Support benefits
โ€ข Free access to Knowledge Planet๐Ÿ”ฅ
โ€ข Priority answers to questions in the Planet
Developers who want to learn in depth
๐Ÿ”ง Advanced Developer ยฅ200 โ€ข All Learning Member benefits
โ€ข Project deployment assistance
โ€ข Priority technical support response
โ€ข Participate in new feature requirement discussions
Developers who want to deeply understand architecture
๐Ÿข Enterprise Partner ยฅ650 โ€ข All Advanced Developer benefits
โ€ข V2 complete frontend and backend source code
โ€ข Issue after-sales technical support
Enterprise users / Advanced users
๐Ÿ‘‘ Strategic Partner ยฅ1299 โ€ข All Enterprise Partner benefits
โ€ข Free project upgrades within one year
โ€ข Enterprise logo displayed on official website sponsor wall
Deep cooperation partners
Alipay QR Code
WeChat QR Code
Alipay QR Code WeChat QR Code

Sponsorship amount is only used for continuous project development and maintenance, not for profit purposes. ๐Ÿ’ก Open source is not easy, thank you for every support!


๐Ÿ“œ License

Copyright ยฉ 2025โ€“2035 Luoyang Taishan TARZAN. All rights reserved.

Licensed under the GNU General Public License Version 3 (GPLv3) ("License"); you may not use this project file except in compliance with the License. You may obtain a copy of the License at

๐Ÿ”—https://www.gnu.org/licenses/gpl-3.0.html

Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. See the License for the specific language governing permissions and limitations under the License.


๐Ÿ”— Related Resources

๐ŸŒŸ Star this project to support China's open-source AI ecosystem!
๐ŸŽฏ Check this out! ๐Ÿ‘‰ Learn about AI large model application development in practice! ๐Ÿ”ฅ


โœ… MaxKB4j โ€” Easily build high-performance and stable agent workflows and RAG knowledge base solutions

Contributors

taishan666hanfeng20202021u2364596489startewhoaijoo2012ricardo-r-ddns01liguanghui11

Issues