docs/PROJECT_MODULES_zh.md
Astron Agent 是一个企业级、商业友好的 Agentic Workflow 开发平台,整合了 AI 工作流编排、模型管理、AI 与 MCP 工具、RPA 自动化和团队协作功能。
模块路径:console/frontend/
使用语言:TypeScript + React
主要职责:
技术栈:React 18、TypeScript 5、Vite 5、Ant Design 5、Tailwind CSS、ReactFlow、Recoil/Zustand
模块路径:console/backend/
使用语言:Java
主要职责:
技术栈:Spring Boot 3.5.4、MyBatis Plus 3.5.7、Spring Security、OAuth2
子模块:
模块路径:core/agent/
使用语言:Python
主要职责:
技术栈:FastAPI、SQLAlchemy 2.0、Pydantic、OpenTelemetry
架构设计:遵循 DDD(领域驱动设计),包含 API 层、服务层、领域层、仓储层
模块路径:core/workflow/
使用语言:Python
主要职责:
技术栈:FastAPI、SQLModel、SQLAlchemy 2.0、Kafka(事件流)、LangChain
事件机制:通过 Kafka Topic workflow-events 进行事件通信
模块路径:core/knowledge/
使用语言:Python
主要职责:
技术栈:FastAPI、RAGFlow SDK、OpenAI API、SQLModel、Redis
事件机制:通过 Kafka Topic knowledge-events 进行事件通信
模块路径:core/memory/
使用语言:Python
主要职责:
技术栈:Python、数据库抽象层
模块路径:core/tenant/
使用语言:Go
主要职责:
技术栈:Go 1.23、Gin 框架、MySQL
设计理念:采用 Go 实现以保证高性能和低内存开销
模块路径:core/plugin/aitools/
使用语言:Python
主要职责:
技术栈:FastAPI、HTTP Client
模块路径:core/plugin/rpa/
使用语言:Python
主要职责:
技术栈:FastAPI、RPA SDK
模块路径:core/plugin/link/
使用语言:Python
主要职责:
技术栈:FastAPI、HTTP Client
模块路径:core/common/
使用语言:Python
主要职责:
技术栈:Python、SQLModel、Redis Client、Kafka Client、OpenTelemetry
核心价值:为所有 Python 微服务提供统一的基础设施抽象
workflow-events - 工作流事件knowledge-events - 知识库事件agent-events - Agent 事件UI Layer(用户界面层)
└── Console Frontend (React/TS)
↓ HTTP/REST/SSE
Console Backend(控制台后端层)
└── Console Backend (Java Spring Boot)
↓ HTTP/REST
Core Microservices(核心微服务层)
├── Agent Service (Python FastAPI)
├── Workflow Service (Python FastAPI)
├── Knowledge Service (Python FastAPI)
├── Memory DB Service (Python)
├── Tenant Service (Go Gin)
├── Plugin: AI Tools (Python FastAPI)
├── Plugin: Link (Python FastAPI)
└── Plugin: RPA (Python FastAPI)
↓
Common Services(公共服务层)
└── Common Module (Python)
↓
Data & Messaging(数据和消息层)
├── MySQL (关系数据库)
├── Redis (缓存/会话)
├── Kafka (事件流)
└── MinIO (对象存储)
↓
External Services(外部服务)
├── LLM Providers (大语言模型)
├── IFLYTEX API (讯飞 API)
└── RPA Executors (RPA 执行器)
| 通信路径 | 协议 | 说明 |
|---|---|---|
| Frontend → Backend | HTTP/REST, SSE | REST API 调用和服务端推送事件 |
| Backend → Core Services | HTTP/REST | RESTful API 调用 |
| Core Services ↔ Core Services | Kafka Topics | 异步事件驱动通信 |
| Core Services → MySQL | JDBC/SQLAlchemy | 数据持久化 |
| Core Services → Redis | Redis Protocol | 缓存读写、会话管理 |
| Core Services → Kafka | Kafka Protocol | 发布/订阅事件 |
| Core Services → MinIO | MinIO API (PUT/GET) | 文件上传下载 |
| Plugins → External Services | HTTP/gRPC | 外部 API 调用 |
| 模块 | 依赖的模块 | 被依赖的模块 |
|---|---|---|
| Console Frontend | Console Backend | - |
| Console Backend | Agent, Workflow, Knowledge, Tenant | Console Frontend |
| Agent Service | Common, Plugin (AI Tools/Link/RPA), Memory | Workflow, Console Backend |
| Workflow Service | Common, Agent, Plugin | Console Backend |
| Knowledge Service | Common, LLM Providers | Agent, Workflow, Console Backend |
| Memory DB Service | Common | Agent |
| Tenant Service | MySQL | 所有服务(租户上下文) |
| Plugin: AI Tools | Common, IFLYTEX API | Agent, Workflow |
| Plugin: RPA | Common, RPA Executors | Agent, Workflow |
| Plugin: Link | Common | Agent, Workflow |
| Common Module | MySQL, Redis, Kafka, MinIO | 所有 Python 服务 |
| 层级 | 模块 | 语言/框架 | 版本 |
|---|---|---|---|
| 前端 | Console Frontend | TypeScript + React | TS 5.9.2, React 18.2.0 |
| 后端 | Console Backend | Java + Spring Boot | Java 21, Spring Boot 3.5.4 |
| 微服务 | Agent Service | Python + FastAPI | Python 3.11+, FastAPI 0.115+ |
| Workflow Service | Python + FastAPI | Python 3.11+, FastAPI 0.115+ | |
| Knowledge Service | Python + FastAPI | Python 3.11+, FastAPI 0.115+ | |
| Memory DB Service | Python | Python 3.11+ | |
| Tenant Service | Go + Gin | Go 1.23, Gin 1.10.1 | |
| 插件 | AI Tools Plugin | Python + FastAPI | Python 3.11+, FastAPI 0.115+ |
| RPA Plugin | Python + FastAPI | Python 3.11+, FastAPI 0.115+ | |
| Link Plugin | Python + FastAPI | Python 3.11+, FastAPI 0.115+ | |
| 公共 | Common Module | Python | Python 3.11+ |
| 数据 | MySQL | 关系数据库 | MySQL 5.7+ |
| Redis | 缓存/内存数据库 | Redis 6.0+ | |
| Kafka | 消息队列 | Kafka 2.5.0+ | |
| MinIO | 对象存储 | MinIO 8.5.10 |
文档版本:v1.0 最后更新:2025-11-25