Nuwax Backend

March 31, 2026 · View on GitHub

Java Spring Boot License

Enterprise-grade AI Agent Development and Operation Platform - Providing a complete solution for agent creation and distribution, knowledge base management, model proxy, memory system, and plugin ecosystem.

English | 简体中文


Table of Contents


Core Features

Agent Engine

  • Visual Orchestration: Drag-and-drop workflow design, zero-code agent creation
  • Code-based Development: Support for Java/Python plugin development, flexible extension
  • Multi-model Support: OpenAI, Claude, Ollama, Qwen, and other mainstream models
  • Streaming Output: SSE real-time response, smooth user experience
  • Multi-turn Conversations: Complete session context management

Knowledge Base Management

  • Document Parsing: PDF, Word, Excel, Markdown, and other formats
  • Vector Storage: Milvus vector database, efficient similarity search
  • Intelligent Chunking: Automatic document segmentation and overlap processing
  • Hybrid Retrieval: Vector search + Full-text search + QA search

Memory System

  • Long-term Memory: Persistent user data and preferences
  • Short-term Memory: Session context management
  • Classification System: 12 main categories, 50+ sub-categories
  • Sensitive Information Filtering: Automatic desensitization

Model Proxy (In Development)

  • Unified Interface: Shield differences between different model APIs
  • Intelligent Routing: Select the optimal model based on scenarios
  • Quota Management: Token billing and rate limiting
  • Failover: Automatic fault tolerance switching

Plugin Ecosystem

  • Plugin Market: Publish and discover plugins
  • MCP Protocol: Model Context Protocol support
  • Page Applications: No-code page builder

Architecture

Tech Stack

CategoryTechnologyVersion
LanguageJava17
FrameworkSpring Boot3.3.8
DatabaseMySQL8.0+
Vector DatabaseMilvus2.5.4
CacheRedis7.0+
ORMMyBatis Plus3.5+
API DocumentationKnife4j4.0+
ContainerDocker-
OrchestrationKubernetes-

Architecture Diagram

┌────────────────────────────────────────────────────────────────────────────┐
│                           Frontend Layer                                   │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌─────────────────────────┐  │
│  │  PC Web  │  │   H5     │  │ Mini App │  │  IM (Feishu/DingTalk/  │  │
│  │          │  │          │  │          │  │   WeCom/Slack)         │  │
│  └──────────┘  └──────────┘  └──────────┘  └─────────────────────────┘  │
└────────────────────────────────────────────────────────────────────────────┘


┌────────────────────────────────────────────────────────────────────────────┐
│                        Access Layer                                        │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────────────┐   │
│  │  REST API    │  │  Long        │  │       WebSocket             │   │
│  │              │  │ Connection   │  │                             │   │
│  └──────────────┘  └──────────────┘  └──────────────────────────────┘   │
└────────────────────────────────────────────────────────────────────────────┘


┌────────────────────────────────────────────────────────────────────────────┐
│                      Application Layer                                     │
│                                                                              │
│  ┌─────────────────────────────────────────────────────────────────────┐  │
│  │              Component Library                                       │  │
│  │  ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │  │
│  │  │ Model│ │Know- │ │ Data │ │Plugin│ │ Work-│ │  MCP │ │ Skill│ │  │
│  │  │      │ │ ledge│ │ Table│ │      │ │ flow │ │      │ │      │ │  │
│  │  └──────┘ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘ │  │
│  └─────────────────────────────────────────────────────────────────────┘  │
│                                                                              │
│  ┌─────────────────────────────────────────────────────────────────────┐  │
│  │              Management Portal                                        │  │
│  │  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │  │
│  │  │  User    │ │  Audit   │ │  Public  │ │ Content  │ │   Task   │ │  │
│  │  │Management│ │Management│ │  Model   │ │Management│ │Management│ │  │
│  │  ├──────────┤ ├──────────┤ ├──────────┤ ├──────────┤ ├──────────┤ │  │
│  │  │   Log    │ │   Menu   │ │ System   │ │          │ │          │ │  │
│  │  │  Query   │ │Permission│ │  Config  │ │          │ │          │ │  │
│  │  └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │  │
│  └─────────────────────────────────────────────────────────────────────┘  │
│                                                                              │
│  ┌─────────────────────────────────────────────────────────────────────┐  │
│  │              Product Applications                                    │  │
│  │  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────────┐  │  │
│  │  │   Web App    │  │   Q&A        │  │    General Agent         │  │  │
│  │  │              │  │   Agent      │  │                          │  │  │
│  │  └──────────────┘  └──────────────┘  └──────────────────────────┘  │  │
│  └─────────────────────────────────────────────────────────────────────┘  │
└────────────────────────────────────────────────────────────────────────────┘


┌────────────────────────────────────────────────────────────────────────────┐
│                    Infrastructure Layer                                    │
│                                                                              │
│  ┌─────────────────────────────────────────────────────────────────────┐  │
│  │                    Lower-level Components                            │  │
│  │                                                                       │  │
│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────────────┐ │  │
│  │  │   Cloud     │  │  nuwaclaw   │  │   General Agent Engine     │ │  │
│  │  │   Sandbox   │  │   PC Client │  │                            │ │  │
│  │  │             │  │ (mac/win/   │  │  ┌───────────────────────┐ │  │
│  │  │             │  │  docker)    │  │  │  MCP Integration      │ │  │
│  │  │             │  │             │  │  ├───────────────────────┤ │  │
│  │  │             │  │             │  │  │  File Management      │ │  │
│  │  │             │  │             │  │  │  Skill Management     │ │  │
│  │  │             │  │             │  │  │  ACP Adapter Layer    │ │  │
│  │  │             │  │             │  │  │  ┌─────────────────┐ │ │  │
│  │  │             │  │             │  │  │  │ Supported Agent:│ │ │  │
│  │  │             │  │             │  │  │  │ claudecode      │ │ │  │
│  │  │             │  │             │  │  │  │ opencode        │ │ │  │
│  │  │             │  │             │  │  │  │ codex           │ │ │  │
│  │  │             │  │             │  │  │  │ openclaw        │ │ │  │
│  │  │             │  │             │  │  │  │ kimicli         │ │ │  │
│  │  │             │  │             │  │  │  └─────────────────┘ │ │  │
│  │  │             │  │             │  │  ├───────────────────────┤ │  │
│  │  │             │  │             │  │  │  Browser             │ │  │
│  │  │             │  │             │  │  │  Automation          │ │  │
│  │  │             │  │             │  │  │  GUI Automation      │ │  │
│  │  │             │  │             │  │  │  Network Channel     │ │  │
│  │  │             │  │             │  │  │  Runtime Integration │ │  │
│  │  │             │  │             │  │  └───────────────────────┘ │  │
│  │  │             │  │             │  └─────────────────────────────┘ │  │
│  │  └─────────────┘  └─────────────┘                                   │  │
│  └─────────────────────────────────────────────────────────────────────┘  │
│                                                                              │
│  ┌─────────────────────────────────────────────────────────────────────┐  │
│  │                    Core Infrastructure                                │  │
│  │  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────┐  │  │
│  │  │ Database │ │  Cache   │ │  Vector  │ │  Search  │ │ Model │  │  │
│  │  │  MySQL   │ │  Redis   │ │  Milvus  │ │ Elastic  │ │ Proxy│  │  │
│  │  └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────┘  │  │
│  └─────────────────────────────────────────────────────────────────────┘  │
└────────────────────────────────────────────────────────────────────────────┘

Project Repository Overview

The Nuwax AI Agent Platform consists of multiple interconnected repositories:

Frontend & Mobile

RepositoryDescriptionURL
nuwaxFrontend Webhttps://github.com/nuwax-ai/nuwax
nuwax-mobileMobile Applicationhttps://github.com/nuwax-ai/nuwax-mobile
noVNCWeb-based VNC Clienthttps://github.com/nuwax-ai/noVNC

Backend & Application Layer

RepositoryDescriptionURL
nuwax-backendApplication Layer (Backend) - This Repositoryhttps://github.com/nuwax-ai/nuwax-backend

Agent Engine & Clients

RepositoryDescriptionURL
nuwaclawAgent PC Client (mac/win/docker)https://github.com/nuwax-ai/nuwaclaw
nuwaxcodeNuwa Agent Engine (based on open-source opencode)https://github.com/nuwax-ai/nuwaxcode
claude-code-acp-tsClaude Code ACP based on Zedhttps://github.com/nuwax-ai/claude-code-acp-ts

Infrastructure & Services

RepositoryDescriptionURL
rcoderSandbox & Container Scheduling (includes General Agent Engine)https://github.com/nuwax-ai/rcoder
mcp-proxyMCP Service (used by nuwaclaw and sandbox)https://github.com/nuwax-ai/mcp-proxy
nuwax-file-serverFile Service (used by sandbox and nuwaclaw, includes skill sync)https://github.com/nuwax-ai/nuwax-file-server

Web Application Development

RepositoryDescriptionURL
xagi-frontend-templatesWeb Application Development Templateshttps://github.com/nuwax-ai/xagi-frontend-templates
vite-plugin-design-modeVisual Editor Vite Pluginhttps://github.com/nuwax-ai/vite-plugin-design-mode
dev-injectWeb Application Smart Script Injectionhttps://github.com/nuwax-ai/dev-inject

Plugin & Script Execution

RepositoryDescriptionURL
run_code_rmcpPlugin Script Execution (TypeScript/JavaScript/Python)https://github.com/nuwax-ai/run_code_rmcp

Network & Utilities

RepositoryDescriptionURL
lanproxy-go-clientNetwork Tunnel Client (used by nuwaclaw)https://github.com/ffay/lanproxy-go-client

Design Patterns

  • DDD (Domain-Driven Design): Clear layer separation
  • CQRS: Command Query Responsibility Segregation
  • Strategy Pattern: Model selection, plugin invocation
  • Observer Pattern: Message broadcasting
  • Repository Pattern: Data access abstraction

Quick Start

Prerequisites

ComponentMinimumRecommended
JavaJDK 17OpenJDK 17
MySQL8.0+8.0+
Redis6.0+7.0+
Milvus2.5+2.5+
Elasticsearch9.2.19.2.1
Memory4GB8GB+
CPU2 cores4 cores+

1. Clone the Repository

git clone https://github.com/nuwax-ai/nuwax-backend.git
cd nuwax-backend

2. Start Basic Services

For development and testing, you can use the official deployment package to run all basic services directly.

3. Add Configuration File

Copy application-${env}.sample.yml to application-${env}.yml:

4. Start the Application

Option 1: Using IDE (IntelliJ IDEA, etc.)

  • Open app-platform-bootstrap/app-platform-web-bootstrap/src/main/java/com/xspaceagi/PlatformApiApplication.java
  • Click the run button to start

Option 2: Using Maven Commands

# Build the project
mvn clean package -DskipTests

# Start the application
cd app-platform-bootstrap/app-platform-web-bootstrap
java -jar target/app-platform-web-bootstrap-*.jar

# Or run directly with Maven
mvn spring-boot:run -pl app-platform-bootstrap/app-platform-web-bootstrap -Pdev

Option 3: Using IDEA Maven Panel

  • Open the Maven panel
  • Find the app-platform-web-bootstrap module
  • Right-click and select Run -> spring-boot:run

5. Access the Application

After starting, access the application (default port 8081):


Module Description

Project Structure

agent-platform/
├── app-platform-bootstrap/          # Bootstrap module
│   └── app-platform-web-bootstrap/  # Web application entry point
├── app-platform-foundation/         # Foundation module
│   ├── system-spec/                 # System specification
│   ├── system-sdk/                  # System SDK
│   └── system-domain/               # System domain models
├── app-platform-modules/            # Business modules
│   ├── app-platform-agent/          # Agent core module
│   ├── app-platform-knowledge/      # Knowledge base module
│   ├── app-platform-memory/         # Memory module
│   ├── app-platform-model-proxy/    # Model proxy module
│   ├── app-platform-mcp/            # MCP protocol module
│   ├── app-platform-compose/        # Custom table module
│   ├── app-platform-custom-page/    # Custom page module
│   ├── app-platform-eco-market/     # Ecosystem market module
│   ├── app-platform-sandbox/        # Sandbox module
│   ├── app-platform-log/            # Logging module
│   └── platform-system/             # Platform system module
├── fast-boot-dependencies/          # Dependency management
└── specs/                           # Specification documents

Core Modules

ModuleDescription
AgentAgent creation, session management, message processing
KnowledgeKnowledge base management, document upload, vector search
MemoryLong-term memory storage and retrieval
Model ProxyUnified model proxy interface
MCPModel Context Protocol implementation
Eco MarketPlugin market and template management
ComposeCustom table functionality
Custom PageNo-code page builder

Configuration

Configuration File Structure

app-platform-web-bootstrap/src/main/resources/
├── application.yml                 # Main configuration file (common settings)
├── application-dev.yml            # Development environment configuration (local use, not committed)
├── application-test.yml           # Test environment configuration (optional)
└── application-prod.yml           # Production environment configuration (optional)

Complete Environment Variable List

Database Configuration

VariableDescriptionRequiredDefault
DB_HOSTMySQL database hostlocalhost
DB_PORTMySQL port3306
DB_NAMEDatabase nameagent_platform
DB_USERNAMEDatabase usernameroot
DB_PASSWORDDatabase password-

Custom Table Component Database (Doris not tested, supports MySQL)

VariableDescriptionRequiredDefault
DORIS_HOSTDoris hostlocalhost
DORIS_DB_NAMEDoris database nameagent_custom_table
DORIS_USERNAMEDoris usernameroot
DORIS_PASSWORDDoris password-

Redis Configuration

VariableDescriptionRequiredDefault
REDIS_HOSTRedis hostlocalhost
REDIS_PORTRedis port6379
REDIS_PASSWORDRedis password-
REDIS_DBRedis database number1

Milvus Vector Database

VariableDescriptionRequiredDefault
MILVUS_URIMilvus connection URIhttp://localhost:19530
MILVUS_USERMilvus usernameroot
MILVUS_PASSWORDMilvus password-

Elasticsearch (Optional)

VariableDescriptionRequiredDefault
ES_URLElasticsearch URLhttp://localhost:9200
ES_USERNAMEElasticsearch usernameelastic
ES_PASSWORDElasticsearch password-
ES_API_KEYElasticsearch API Key-

Security Configuration

VariableDescriptionRequiredDefault
JWT_SECRET_KEYJWT signing key- (at least 32 characters)

Tencent Cloud COS (Optional)

VariableDescriptionRequiredDefault
COS_SECRET_IDTencent Cloud COS secret ID-
COS_SECRET_KEYTencent Cloud COS secret key-
COS_BASE_URLCOS access domainhttps://...

File Storage

VariableDescriptionRequiredDefault
FILE_UPLOAD_FOLDERFile upload directory/tmp/uploads
FILE_BASE_URLFile access URLhttps://yourdomain/api/file
STORAGE_TYPEStorage type, currently supports Tencent Cloud COS and local file storagefile

External Services (Optional)

VariableDescriptionRequiredDefault
CODE_EXECUTE_URLCode execution servicehttp://localhost:8020/...
LOG_SERVICE_URLLog service URL, can be omitted, deprecatedhttp://localhost:8097
MCP_PROXY_URLMCP proxy URLhttp://localhost:8020

Page Application Development Services (Optional)

VariableDescriptionRequiredDefault
DEV_SERVER_HOSTDevelopment server hosthttp://localhost
PROD_SERVER_HOSTProduction server hosthttp://localhost:8099
BUILD_SERVER_URLBuild server URLhttp://localhost:60000/api
AI_AGENT_URLAI agent URLhttp://localhost:8086
DOCKER_PROXY_URLDocker proxy URLhttp://localhost:8088

Internal Network Tunnel Proxy Configuration (Optional)

VariableDescriptionRequiredDefault
SERVICE_HOSTInternal service address127.0.0.1
BIND_HOSTBind address0.0.0.0
REVERSE_PORTSPort range30000-40000
OUTER_HOSTClient connection IP address-
OUTER_PORTClient connection port6443

Model Proxy (Optional)

VariableDescriptionRequiredDefault
MODEL_API_BASE_URLModel API URL, corresponding to accessible MODEL_PROXY_PORT-
MODEL_PROXY_ENABLEWhether to enable proxytrue
MODEL_PROXY_PORTProxy port18086
MODEL_PROXY_SAVE_LOGWhether to save logs, depends on Elasticsearchtrue

Development Guide

Code Standards

The project follows DDD layered architecture:

UI Layer → Adapter Layer → Application Layer → Domain Layer → Infrastructure Layer

Contributing

Contributions of code, documentation, and bug reports are welcome!

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contributors

Thanks to all developers who have contributed to this project!


License

This project is licensed under the Apache License 2.0.

See LICENSE file for details.


Commercial License

Open Source Use (Free)

This software can be used, modified, and distributed for free, but you must:

  • ✅ Retain original copyright notices
  • ✅ Include the Apache 2.0 license text
  • ✅ State that your product is based on this software

Commercial License (Paid)

If you need:

  • 🏢 Remove copyright notices (white-label products)
  • 🔄 OEM partnership (integrate into your products for resale)
  • 🎨 Custom branding (use your own brand)
  • 🚀 Priority support (enterprise-level technical support)

You can apply for a commercial license to obtain additional rights.

For details, see: COMMERCIAL_LICENSE.md