# Repository: iflytek/astron-agent
# Stars: 9411
## CLAUDE.md
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## 项目概述
Astron Agent 是一个企业级 Agentic Workflow 开发平台,采用微服务架构,整合了 AI 工作流编排、模型管理、AI 工具、RPA 自动化和团队协作功能。
### 技术栈概览
- **前端**: TypeScript + React 18 + Vite + Ant Design (位于 `console/frontend/`)
- **控制台后端**: Java 21 + Spring Boot 3.5.4 (位于 `console/backend/`)
- **核心微服务**: Python 3.11+ + FastAPI (位于 `core/` 目录)
- **租户服务**: Go 1.23 + Gin (位于 `core/tenant/`)
- **基础设施**: MySQL, Redis, Kafka, MinIO
## 项目架构
### 目录结构
```
astron-agent/
├── console/ # 控制台模块
│ ├── frontend/ # React 前端 (TypeScript)
│ └── backend/ # Spring Boot 后端 (Java)
│ ├── hub/ # 主 API 服务
│ ├── toolkit/ # 工具模块
│ └── commons/ # 公共模块
├── core/ # 核心微服务
│ ├── agent/ # Agent 服务 (Python FastAPI)
│ ├── workflow/ # 工作流服务 (Python FastAPI)
│ ├── knowledge/ # 知识库服务 (Python FastAPI)
│ ├── memory/ # 内存数据库服务 (Python)
│ ├── tenant/ # 租户服务 (Go Gin)
│ ├── common/ # 公共模块 (Python)
│ └── plugin/ # 插件系统
│ ├── aitools/ # AI 工具插件
│ ├── rpa/ # RPA 插件
│ └── link/ # 链接插件
├── docker/ # Docker 配置
├── docs/ # 文档
├── helm/ # Kubernetes Helm Charts
└── makefiles/ # Makefile 工具链
```
### 核心架构模式
#### 1. 微服务通信
- **Frontend → Backend**: HTTP/REST + SSE (服务端推送)
- **Backend → Core Services**: HTTP/REST API
- **Core Services ↔ Core Services**: Kafka 事件驱动 (异步)
- **数据持久化**: MySQL (关系数据) + Redis (缓存/会话)
- **文件存储**: MinIO (对象存储)
#### 2. Kafka 事件主题
- `workflow-events`: 工作流事件
- `knowledge-events`: 知识库事件
- `agent-events`: Agent 事件
#### 3. Python 服务架构 (DDD)
所有 Python 微服务遵循领域驱动设计 (DDD):
```
service/
├── api/ # API 层 (FastAPI 路由)
├── service/ # 服务层 (业务逻辑)
├── domain/ # 领域层 (领域模型)
├── repository/ # 仓储层 (数据访问)
└── main.py # 服务入口
```
#### 4. 公共模块 (core/common)
为所有 Python 服务提供统一的基础设施:
- 认证和审计系统 (MetrologyAuth)
- 可观测性支持 (OpenTelemetry)
- 数据库、缓存、消息队列连接管理
- 统一日志系统
- OSS 对象存储集成
## 部署
### Docker Compose 部署 (推荐快速开始)
```bash
cd docker/astronAgent
cp .env.example .env
vim .env # 配置环境变量
# 启动所有服务 (包括 Casdoor 认证)
docker compose -f docker-compose-with-auth.yaml up -d
# 访问地址
# - 前端: http://localhost/
# - Casdoor 管理: http://localhost:8000 (admin/123)
```
## 重要注意事项
### 开发约定
1. **禁止直接推送到 main/develop 分支** - 必须通过分支开发 + PR 流程
### 模块间依赖
- **Common Module** 被所有 Python 服务依赖,修改时需谨慎
- **Agent Service** 被 Workflow 服务调用
- **Knowledge Service** 为 Agent 和 Workflow 提供 RAG 能力
- **Tenant Service** 为所有服务提供租户上下文
## 相关文档
- [项目模块说明](docs/PROJECT_MODULES_zh.md) - 详细架构说明
- [部署指南](docs/DEPLOYMENT_GUIDE_WITH_AUTH_zh.md) - 完整部署步骤
- [前端开发指南](console/frontend/CLAUDE.md) - 前端特定指南
## README.md
[](https://agent.xfyun.cn)
[](LICENSE)
[](https://github.com/iflytek/astron-agent/stargazers)
[](https://deepwiki.com/iflytek/astron-agent)
English | [简体中文](docs/README-zh.md)
## 🔭 What is Astron Agent
Astron Agent is an **enterprise-grade, commercial-friendly** Agentic Workflow development platform that integrates AI workflow orchestration, model management, AI and MCP tool integration, RPA automation, and team collaboration features.
The platform supports **high-availability** deployment, enabling organizations to rapidly build **scalable, production-ready** intelligent agent applications and establish their AI foundation for the future.
### Why Choose Astron Agent?
- **Stable and Reliable**: Built on the same core technology as the iFLYTEK Astron Agent Platform, providing enterprise-grade reliability with a fully available high-availability version open source.
- **Cross-System Integration**: Natively integrates intelligent RPA, efficiently connecting internal and external enterprise systems, enabling seamless interaction between Agents and enterprise systems.
- **Enterprise-Grade Open Ecosystem**: Deeply compatible with various industry models and tools, supporting custom extensions and flexibly adapting to diverse enterprise scenarios.
- **Business-Friendly**: Released under the Apache 2.0 License, with no commercial restrictions, allowing free commercial use.
### Key Features
- **Enterprise-Grade High Availability:** Full-stack capabilities for development, building, optimization, and management. Supports one-click deployment with strong reliability.
- **Intelligent RPA Integration:** Enables cross-system process automation, empowering Agents with controllable execution to achieve a complete loop “from decision to action.”
- **Ready-to-Use Tool Ecosystem:** Integrates massive AI capabilities and tools from the [iFLYTEK Open Platform](https://www.xfyun.cn), validated by millions of developers, supporting plug-and-play integration without extra development.
- **Flexible Large Model Support:** Offers diverse access methods, from rapid API-based model access and validation to one-click deployment of enterprise-level MaaS (Model as a Service) on-premises clusters, meeting needs of all scales.
## 📰 News
### 🔄 Ongoing
### 📅 Past
- **[Astron Hackathon @ 2025 iFLYTEK Global 1024 Developer Festival](https://luma.com/9zmbc6xb)** 🎤
@mklong
- **[Astron Agent Zhengzhou Meetup](https://github.com/iflytek/astron-agent/discussions/672)** 🎤
@lyj715824
@wowo-zZ
- **[Astron on Campus @ Zhejiang University of Finance and Economics](https://mp.weixin.qq.com/s/oim_Z0ckgpFwf5jOskoJuA)** 🎤
@lyj715824
- **[Astron Agent & RPA · Qingdao Meetup Brings Agentic AI!](https://github.com/iflytek/astron-agent/discussions/740)** 🎤
@vsxd
@doctorbruce
@MaxwellJean
- **[Astron Training Camp · Cohort #1](https://www.aidaxue.com/astronCamp)** 🎤
@lyj715824
@Thomas1024-Astron
@abelzha
- **[Astron Talk @ Chongqing Mini Tech Fest](https://mp.weixin.qq.com/s/HROf1zZpkPVDSsCQrv2jRg)** 🎤
@lyj715824
- **[Astron Agent @ MWC Barcelona 2026](https://www.iflytek.com/en/news-events/mwc2026.html)**
- **[Astron Agent & RPA · Hefei Meetup](https://mp.weixin.qq.com/s/tDJaoOLUrjBlgMLDurvHCw)** 🎤
@lyj715824
@doctorbruce
- **[Astron Industrial Intelligence Hackathon](https://awesome-astron-workflow.dev/activities/astron-industrial-intelligence-hackathon)** 🎤
@lyj715824
@horizon220222
## 🚀 Quick Start
We offer two deployment methods to meet different scenarios:
### Option 1: Docker Compose (Recommended for Quick Start)
```bash
# Clone the repository
git clone https://github.com/iflytek/astron-agent.git
# Navigate to the Docker deployment directory
cd docker/astronAgent
# Copy environment configuration
cp .env.example .env
# Configure environment variables
vim .env
```
For environment variable configuration, please refer to the documentation:[DEPLOYMENT_GUIDE_WITH_AUTH.md](https://github.com/iflytek/astron-agent/blob/main/docs/DEPLOYMENT_GUIDE_WITH_AUTH.md#step-2-configure-astronagent-environment-variables)
```bash
# Start all services (including Casdoor)
docker compose -f docker-compose-with-auth.yaml up -d
```
#### 📊 Service Access Addresses
After startup, you can access the services at the following addresses:
**Authentication Service**
- **Casdoor Admin Interface**: http://localhost:8000
**AstronAgent**
- **Application Frontend (nginx proxy)**: http://localhost/
**Note**
- Default Casdoor login credentials: username: `admin`, password: `123`
### Option 2: Helm (For Kubernetes Environments)
> 🚧 **Note**: Helm charts are currently under development. Stay tuned for updates!
```bash
# Coming soon
# helm repo add astron-agent https://iflytek.github.io/astron-agent
# helm install astron-agent astron-agent/astron-agent
```
---
> 📖 For complete deployment instructions and configuration details, see [Deployment Guide](docs/DEPLOYMENT_GUIDE_WITH_AUTH.md)
## 📖 Using Astron Cloud
**Try Astron**:Astron Cloud provides a ready-to-use environment for creating and managing Agents. Get quick access at [https://agent.xfyun.cn](https://agent.xfyun.cn).
**Using Guide**:For detailed usage instructions, please refer to [Quick Start Guide](https://www.xfyun.cn/doc/spark/Agent03-%E5%BC%80%E5%8F%91%E6%8C%87%E5%8D%97.html).
## 📚 Documentation
- [🚀 Deployment Guide](docs/DEPLOYMENT_GUIDE.md)
- [🔧 Configuration](docs/CONFIGURATION.md)
- [🚀 Quick Start](https://www.xfyun.cn/doc/spark/Agent02-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B.html)
- [📘 Development Guide](https://www.xfyun.cn/doc/spark/Agent03-%E5%BC%80%E5%8F%91%E6%8C%87%E5%8D%97.html#_1-%E6%8C%87%E4%BB%A4%E5%9E%8B%E6%99%BA%E8%83%BD%E4%BD%93%E5%BC%80%E5%8F%91)
- [📖 Tutorial](https://scn5s6198j3j.feishu.cn/wiki/VefnwvPbridJBikCUb1cYXO9nYb)
- [💡 Best Practices](https://www.xfyun.cn/doc/spark/AgentNew-%E6%8A%80%E6%9C%AF%E5%AE%9E%E8%B7%B5%E6%A1%88%E4%BE%8B.html)
- [📱 Use Cases](https://www.xfyun.cn/doc/spark/Agent05-%E5%BA%94%E7%94%A8%E6%A1%88%E4%BE%8B.html)
- [❓ FAQ](https://www.xfyun.cn/doc/spark/Agent06-FAQ.html)
- [🌐 Open Source Workflows](https://awesome-astron-workflow.dev/#workflows)
## 🤝 Contributing
We welcome contributions of all kinds! Please see our [Contributing Guide](CONTRIBUTING.md)
## 🌟 Star History
## 📞 Support
- 💬 Community Discussion: [GitHub Discussions](https://github.com/iflytek/astron-agent/discussions)
- 🐛 Bug Reports: [Issues](https://github.com/iflytek/astron-agent/issues)
- 👥 WeChat Work Group:
## 📄 Open Source License
This project is licensed under the [Apache 2.0 License](LICENSE), allowing free use, modification, distribution, and commercial use without any restrictions.