@@ -21,8 +21,11 @@ AgentCraft是一个开放的智能体构建平台,致力于推进AI原生应
2121
2222<p align =" center " >
2323
24- <a href =" https://fcnext.console.aliyun.com/applications/create?template=AgentCraft " target =" _blank " >
25- <img height="21" src="https://img.shields.io/badge/快速部署体验-7d09f1?style=flat-square" alt="document">
24+ <a href =" https://agentcraft-docs.serverless-developer.com/quick-start/cloud-deploy " target =" _blank " >
25+ <img height="21" src="https://img.shields.io/badge/云端部署-7d09f1?style=flat-square" alt="document">
26+ </a >
27+ <a href =" #docker-compose-deploy " >
28+ <img height="21" src="https://img.shields.io/badge/私有化部署-7d09f1?style=flat-square" alt="document">
2629 </a >
2730 <a href =" #local-developement " >
2831 <img height="21" src="https://img.shields.io/badge/本地开发-%23d4eaf7?style=flat-square&logo=xcode&logoColor=7d09f1" alt="development">
@@ -83,34 +86,56 @@ AgentCraft是一个开放的智能体构建平台,致力于推进AI原生应
8386 - [x] 支持自定义组件LUI渲染
8487 - [x] 生成式UI能力集成
8588
89+ ## 部署
90+ + 云端
91+ AgentCraft 基于Serverless架构构建,在[ 阿里云函数计算] ( https://www.aliyun.com/product/fc ) 上提供一键部署应用的模版,帮助您快速部署专属的服务,您可以随时进行公共服务转化,[ 详情参考] ( https://agentcraft-docs.serverless-developer.com/quick-start/cloud-deploy )
92+ + <div id =" docker-compose-deploy " >私有化</div >
93+
94+ 使用[ docker-compose.yml] ( ./docker-compose.yml ) 一键部署AgentCraft 服务,请确保已经安装了[ Docker] ( https://docs.docker.com/get-docker/ ) 和 [ Docker Compose] ( https://docs.docker.com/compose/install/ )
95+ 如果您需要访问插件扩展能力以及接入钉钉微信登能力,需要补充docker-compose.yml 中阿里云环境变量相关的信息 如
96+ MAIN_ACCOUNT_ID、
97+ ALIBABA_CLOUD_ACCESS_KEY_ID、
98+ ALIBABA_CLOUD_ACCESS_KEY_SECRET
99+ 不需要请直接执行
100+ ```
101+ docker compose up -d
102+ ```
103+ ## <div id =" local-developement " >开发</div >
104+ 克隆本项目到本地
105+ ```
106+ git clone https://github.com/devsapp/agentcraft.git
107+ ```
108+ ### 启动后端服务 agentcraft-be
109+ 部署后端服务需要先准备好embedding 和 pg
110+ #### embedding
86111
87- ## 本地开发
88- < div id = " local-developement " >克隆本项目到本地,打开 src/agentcraftall 目录,核心代码在该路径下</ div >
112+ + 云端创建,访问函数计算 [ embedding应用模版 ] ( https://fcnext.console.aliyun.com/applications/create?template=fc-embedding-api ) 一键创建,并获取域名
113+ + 本地创建, 执行 ``` docker-compose up embedding -d ``` , 该服务地址为 http://localhost:8001/embedding
89114
90- src/agentcraft-all 包含前后端两个工程 agentcraft-fe和agentcraft-be
91- 需要启动后端服务和前端服务
92- ### 后端工程 agentcraft-be
115+ #### pg
116+ + 云端创建, 通过RDS PostgreSQL实例 https://rdsbuy.console.aliyun.com/create/rds/mysql?spm=5176.19907444.0.0.64b11450FHIgeU 获取, [ 相关教程参考 ] ( https://agentcraft-docs.serverless-developer.com/quick-start/cloud-deploy )
117+ + 本地创建,执行 ``` docker-compose up pg -d ```
93118
94- + 配置准备:修改.env.example -> .env
95- 填写好相关的配置,主要依赖 EMBEDDING_URL 和 数据库的配置,其中EMBEDDING_URL 可以访问
96- https://fcnext.console.aliyun.com/applications/create?template=fc-embedding-api,
97- 创建后获取,
98- 数据库可以创建一个RDS PostgreSQL实例 https://rdsbuy.console.aliyun.com/create/rds/mysql?spm=5176.19907444.0.0.64b11450FHIgeU
99- + 依赖安装:
100- ** pip install -r requirements.txt**
101- + 服务启动:
102119``` shell
120+ cd agentcraft/src/agentcraft-all/agentcraft-be
121+ cp .env.example .env
122+ python3 -m venv venv
123+ source venv/bin/activate
124+ pip install -r requirements.txt
103125export PYTHONPATH=" ${PYTHONPATH} :$( pwd) "
104126python3 -u app/main.py
127+
105128```
106- ### 前端工程 agentcraft-fe
107- + 配置准备:修改.env.example -> .env,将后端服务的域名填写为baseUrl的值,获得阿里云的AK,SK并填写为.env中的值ALIBABA_CLOUD_ACCESS_KEY_ID,ALIBABA_CLOUD_ACCESS_KEY_SECRET(该配置在操作云资源的时候需要,如管理基础模型服务)
108- + 依赖安装:
109- ** npm install -f**
110- + 服务启动
129+
130+ ### 启动前端服务 agentcraft-fe
131+
111132```
133+ cd agentcraft/src/agentcraft-all/agentcraft-fe
134+ cp .env.example .env
135+ npm install -f
112136npm run dev
113137```
138+
114139### 一些问题
115140为什么需要 AK,SK? 本项目依赖阿里云基础设施,因此内置了一部分云资源的管理能力,比如基础模型的部署、连接钉钉机器人,微信,独立站的服务,因此需要提供AK,SK 管理云资源,如果您不需要这些能力,可以忽略此项。另外请注意保管自己的AK,SK
116141## 如何贡献
0 commit comments