> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coze.cn/llms.txt
> Use this file to discover all available pages before exploring further.

开发低代码应用时需要使用各种资源包括工作流、知识库、插件等。扣子编程支持为低代码应用创建独享资源使用，也支持使用空间内的共享资源。此外，低代码应用内的独享资源支持转移或复制到空间资源库，供其他项目使用。本文介绍低代码应用中资源管理的相关操作。
## 了解扣子编程资源 {#c827a4b7}
在扣子编程中，工作流、插件、数据库、知识库和变量统称为资源。资源可以在存在于两个实体内，一个是空间的资源库，一个是低代码应用中的资源库。

* **空间资源库（共享资源）**：在空间资源库内创建的资源可以被空间内的低代码应用和智能体使用，属于空间内的共享资源。
* **低代码应用资源库（独享资源）**：在低代码应用中也可以创建资源，但这些资源是低代码应用的独享资源，默认不可以被其他项目使用也不会展示在空间资源库内。
   当需要将低代码应用中的资源转换成公共资源给其他低代码应用或智能体使用时，可以将这些资源转移或复制到空间资源库内。
   :::tip 说明
   智能体没有独有的资源实体，使用空间内的共享资源。
   :::
   
   <div class="flow-chart-container"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="615px" height="472px" viewBox="-0.5 -0.5 615 472"><defs/><g><rect x="47" y="235" width="225" height="217" fill="#ffffff" stroke="#000000" stroke-dasharray="1 1" pointer-events="all"/><rect x="142" y="2" width="110" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 12px; margin-left: 143px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><b>空间资源库</b></div></div></div></foreignObject></g><rect x="129.5" y="42" width="60" height="30" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 57px; margin-left: 131px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">知识库 </div></div></div></foreignObject></g><rect x="222" y="42" width="60" height="32.55" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 58px; margin-left: 223px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">插件 </div></div></div></foreignObject></g><rect x="522" y="312" width="60" height="32.55" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 328px; margin-left: 523px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">数据库 </div></div></div></foreignObject></g><rect x="397" y="42" width="60" height="32.55" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 58px; margin-left: 398px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">卡片</div></div></div></foreignObject></g><rect x="492" y="42" width="60" height="32.55" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 58px; margin-left: 493px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">...</div></div></div></foreignObject></g><rect x="24.5" y="188.27" width="270" height="280" fill="none" stroke="#000000" pointer-events="all"/><rect x="432" y="264.55" width="60" height="30" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 280px; margin-left: 433px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">知识库 </div></div></div></foreignObject></g><rect x="432" y="312" width="60" height="32.55" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 328px; margin-left: 433px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">插件 </div></div></div></foreignObject></g><path d="M 342 112 L 412 112 L 412 150 L 492 150 L 492 181.9" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 492 187.15 L 488.5 180.15 L 492 181.9 L 495.5 180.15 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><path d="M 223.25 112 L 223.2 150.2 L 159.5 150.2 L 159.5 181.9" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 159.5 187.15 L 156 180.15 L 159.5 181.9 L 163 180.15 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/><rect x="104.5" y="2" width="475" height="110" fill="none" stroke="#000000" pointer-events="all"/><rect x="362" y="202" width="110" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 212px; margin-left: 363px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><b>智能体</b></div></div></div></foreignObject></g><rect x="522" y="264.55" width="60" height="32.55" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 281px; margin-left: 523px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">卡片</div></div></div></foreignObject></g><rect x="312" y="40.73" width="60" height="32.55" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 57px; margin-left: 313px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">数据库</div></div></div></foreignObject></g><rect x="2" y="192" width="110" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 202px; margin-left: 3px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><b>AI 应用</b></div></div></div></foreignObject></g><rect x="52" y="244.55" width="110" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 255px; margin-left: 53px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><b>AI 应用资源库 </b></div></div></div></foreignObject></g><rect x="82" y="322" width="170" height="100" fill="#ebebeb" stroke="#000000" pointer-events="all"/><rect x="106.61" y="352.77" width="53.68" height="23.08" fill="#97d077" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 52px; height: 1px; padding-top: 364px; margin-left: 108px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">知识库</div></div></div></foreignObject></g><rect x="180.42" y="352.77" width="53.68" height="23.08" fill="#97d077" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 52px; height: 1px; padding-top: 364px; margin-left: 181px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">插件</div></div></div></foreignObject></g><rect x="106.61" y="391.23" width="53.68" height="23.08" fill="#97d077" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 52px; height: 1px; padding-top: 403px; margin-left: 108px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">数据库</div></div></div></foreignObject></g><rect x="180.42" y="391.23" width="53.68" height="23.08" fill="#97d077" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 52px; height: 1px; padding-top: 403px; margin-left: 181px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">工作流</div></div></div></foreignObject></g><rect x="77" y="327.69" width="91.05" height="15.38" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 89px; height: 1px; padding-top: 335px; margin-left: 78px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; word-wrap: normal; ">应用独享资源</div></div></div></foreignObject></g><rect x="88.32" y="282" width="53.68" height="23.08" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 52px; height: 1px; padding-top: 294px; margin-left: 89px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">知识库</div></div></div></foreignObject></g><rect x="182" y="282" width="53.68" height="23.08" fill="#b5739d" stroke="#000000" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 52px; height: 1px; padding-top: 294px; margin-left: 183px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">插件</div></div></div></foreignObject></g><rect x="372" y="188.27" width="240" height="273.73" fill="none" stroke="#000000" pointer-events="all"/></g></svg></div>


## **为低代码应用添加资源** {#4b929591}
在编排业务逻辑，也就是搭建工作流时，你可以选择使用空间资源库中已有的资源，例如使用空间资源库下其他人创建的插件，也可以为低代码应用创建独有的资源。
:::tip 说明
低代码应用中的资源，必须在低代码应用发布之后才能通过 API 对资源进行操作，例如发布低代码应用之后才能向低代码应用中的知识库上传文件。
:::
扣子编程提供以下两种方式添加资源。

* **创建资源**：直接在低代码应用中创建新的插件、知识库、数据库等资源。
* **引入资源**：将当前空间资源库下已发布的资源复制一份到低代码应用中，成为低代码应用的独享资源使用。

#### 方式一：创建资源 {#addf362c}
在低代码应用中创建的资源是应用独享资源，不能被其他项目使用。
参考以下操作，在低代码应用中创建资源。

1. 在**项目管理**页面，找到已创建的低代码应用。
2. 在低代码应用的业务逻辑页面的**资源**面板区域，找到待添加的资源，并单击 **+ > 新建工作流**。
   ![Image=423x306](https://p9-arcosite.byteimg.com/tos-cn-i-goo7wpa0wc/3f72b5df60454d23b4a157d6fa98e386~tplv-goo7wpa0wc-image.image)
3. 参考以下文档和业务逻辑页面的操作提示，完成各个资源的创建流程。
   无论是在空间资源库还是在低代码应用中进行资源创建，资源配置都是相同的，只是操作入口不同。
   * 创建插件：[基于 API 创建插件](/guides/services)
   * 创建知识库：[创建文本知识库](/guides/create_knowledge)
   * 创建数据库：[创建数据表](/guides/database#26946f3d)
   * 设置变量：[创建变量](/guides/variable#a778d030)

#### 方式二：引入资源 {#dbfe208f}
扣子编程支持将空间内的资源复制到低代码应用中使用。复制后，在低代码应用中对资源配置的修改不会影响空间资源库中原有的资源配置。

1. 在**项目管理**页面，找到已创建的低代码应用。
2. 在低代码应用的业务逻辑页面的资源面板区域，找到待添加的资源，并单击 **+** > **引入资源库文件**。
   ![Image=476x205](https://p9-arcosite.byteimg.com/tos-cn-i-goo7wpa0wc/d33f0a821a15459bb390da83e214884f~tplv-goo7wpa0wc-image.image)
3. 等待复制完成后，关闭复制弹窗。
   :::tip 说明
   引入资源的本质是将资源复制一份到低代码应用中。资源越大，需要的时间也越久。请勿关闭操作窗口，否则会造成引入中断。
   :::

## 复制和移动低代码应用资源 {#88f2e002}
低代码应用中的资源都是独享资源，如果空间下的其他低代码应用或智能体需要使用这些资源，可以复制或转移到空间资源库中。
以低代码应用中的知识库为例，复制和移动的操作方式如下：

1. 在**项目管理**页面，找到你已经创建的低代码应用。
2. 在**业务逻辑**页面的**资源**面板中，找到目标资源。
3. 选中这个目标资源，然后选择**复制到资源库**或**移动到资源库**即可。
   * **移动到资源库**：移动资源是将资源从应用移动至应用所在的空间资源库。
      移动后，资源不再隶属于这个低代码应用，即不再展示在低代码应用的资源列表中，而是在空间资源库列表中。转移后，使用了这些资源的节点不会受到影响。
   * **复制到资源库**：复制一个副本到空间资源库内。
      复制后，在空间资源列表中会出现一个相同配置的资源。
      ![Image=535x467](https://p9-arcosite.byteimg.com/tos-cn-i-goo7wpa0wc/a83f91f0871644bbac008ce8be9285c1~tplv-goo7wpa0wc-image.image)

## 删除低代码应用资源 {#14cd34d5}
当不需要使用资源时，可选中资源，然后单击**删除文件**。
:::notice 注意
* 资源删除后不可恢复，请谨慎操作。
* 在删除前，确保该资源删除后不影响低代码应用的运行。
:::
![Image=431x288](https://p9-arcosite.byteimg.com/tos-cn-i-goo7wpa0wc/794614f837dd4548904ea9c9392b7caa~tplv-goo7wpa0wc-image.image)

