> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/chinese/gao-ji-gong-neng-yu-gong-ju/docbits-operator/triggering-prompts-with-a-workflow/on-premise-execution-flow.md).

# 本地部署执行流程

对于在本地部署 DocBits Operator 的客户，以下流程说明了已处理的文档如何通过本地 DocBits Agent 触发并执行 Operator 提示。

1. **文档上传与处理**\
   文档上传到 DocBits 后，会经过标准处理流程（提取、验证等）。
2. **工作流触发**\
   处理完成后，DocBits 中已配置的工作流会评估其触发条件。满足条件时，工作流会创建新的 **Operator Task**。
3. **任务创建与派发**
   * 工作流会将脚本文本、变量、最大步数和最大重试次数作为任务载荷发送到共享工作池。
4. **Agent 轮询循环**
   * 安装在客户环境中的本地 DocBits Agent 每 5 分钟轮询一次工作池。如果未找到任务，Agent 会保持空闲状态，并在间隔时间后重试。
5. **任务执行**
   * 工作池中出现任务时，Agent 会获取该任务并开始执行。
6. **日志生成**
   * 对每个步骤，无论成功还是失败，Agent 都会记录详细日志（操作、状态、时间戳）。任务完成后，Agent 会汇总完整日志和最终状态。
7. **返回并显示结果**
   * Agent 会将日志和状态发送回 DocBits。源工作流的运行历史记录会更新，用户可以在 **Workflow Logs** 选项卡中查看详情。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/chinese/gao-ji-gong-neng-yu-gong-ju/docbits-operator/triggering-prompts-with-a-workflow/on-premise-execution-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
