RAG Agent Platform - LLM/SaaS
info
RAG Agent Platform is a multi-tenant agent SaaS platform. Built on LLMs, RAG, and MCP, it lets you build knowledge bases and retrieval-augmented pipelines, quickly create and orchestrate agents/LLM bots, and plug in, switch, and configure model providers with one click.
面向多租户的智能体 SaaS平台。基于 LLM、RAG 与 MCP,您可搭建知识库与检索增强链路,快速创建和编排 Agent/LLM 机器人,并一键接入、切换与配置各类模型服务商。
01 Requisites
- Java 17, Spring Boot 3
- PostgreSQL
- PGVector
- RabbitMQ
- Object Storage Service
- Amazon S3
- ✅ Qiniu Cloud Object Storage (KODO)
- Tencent Cloud Object Storage (COS)
- Model Provider
- ✅ Silicon Flow 硅基流动 (https://www.siliconflow.com/)
- SiliconFlow is an AI platform that gives developers a single API to run many models for text, embeddings, reranking, and multimodal tasks.
- 硅基流动是面向开发者的 AI 模型与算力平台,聚合开源/商用大模型并提供统一 API 的文本、向量、重排与多模态推理服务。
02 Local MacOS Setup 本地原生环境搭建
RabbitMQ
- Management UI: http://localhost:15672
# Check if it has been installed 检验是否已经安装过
command -v rabbitmqctl || echo "rabbitmqctl not found"
command -v rabbitmq-server || echo "rabbitmq-server not found"
brew list | grep rabbitmq || echo "brew 未安装 rabbitmq"
brew services list | grep rabbitmq
# install via homebrew
brew install rabbitmq
brew services start rabbitmq
# stops the locally running RabbitMQ node
brew services stop rabbitmq
PostgreSQL
# 1. install via homebrew
brew install postgresql@14
# 2. added config paths
# - zprofile 适用于登录/新开终端(macOS 默认)
# - zshrc 适用于交互式 shell(如 VS Code 的内置终端)
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
echo 'export PATH="$(brew --prefix)/opt/postgresql@14/bin:$PATH"' >> ~/.zprofile
echo 'export PATH="$(brew --prefix)/opt/postgresql@14/bin:$PATH"' >> ~/.zshrc
source ~/.zprofile || true
source ~/.zshrc || true
# 3. start via homebrew
brew services start postgresql@14
# 4. Query the current user after startup - 尝试用你的 macOS 用户名登录
psql -h 127.0.0.1 -p 5432 -U "$(whoami)" -d postgres -c "\du"
# 5. create super user role
# username: postgres, password: postgres
psql -d postgres -c "CREATE ROLE postgres WITH LOGIN SUPERUSER PASSWORD 'postgres';"
Init Frontend 初始化前端项目
- Nest.js
- TypeScript
- pnpm as package manager
- Tailwind CSS
- shadcn/ui
# 进入你的空目录
cd frontend
# 1) 创建 Next.js + TS + Tailwind + App Router 项目(当前目录)
pnpm dlx create-next-app@latest . \
--ts --eslint --tailwind --app \
--src-dir false \
--import-alias "@/*" \
--use-pnpm
# 2) 初始化 shadcn/ui(会生成 components.json,和你截图一致的文件结构)
pnpm dlx shadcn-ui@latest init -d
# 可选:先加几个常用组件
pnpm dlx shadcn-ui@latest add button card input dialog
# 3) 跑起来
pnpm dev
Qiniu Cloud Object Storage - Used for RAG
- Qiniu Cloud OS or other OSS which supports S3 API. 任意 支持S3 API的对象存储服务商即可
- Support Tenant uploading knowledge base files, and the platform will automatically convert them to vector embeddings via OCR, chunking, sharding.
- 支持租户上传知识库文件,平台自动通过OCR、chunking、sharding等技术将其转换为向量embedding。
platform: amazon-s3-1 # 存储平台标识
region: ${S3_REGION:cn-south-1}
end-point: ${S3_ENDPOINT:https://s3.cn-south-1.qiniucs.com}
bucket-name: ${S3_BUCKET_NAME:agentx-test-lucas}
domain: ${S3_DOMAIN:https://agentx-test-lucas.s3.cn-south-1.qiniucs.com/} # 访问域名,注意“/”结尾,例如:https://abc.hn-bkt.clouddn.com/
base-path: s3/ # 基础路径
03 Docker Setup 容器环境搭建
info
Skipping since facing some issues with Docker on MacOS, and the project is not yet fully containerized. 由于在 MacOS 上使用 Docker 时遇到一些问题,因此跳过此步骤,并且该项目尚未完全容器化。