Skip to content

Commit 8c2873a

Browse files
committed
Merge branch 'main' into feat/opt_benefit_1
# Conflicts: # .gitignore # backend/infra/platestwrite/latest_write_tracker.go
2 parents a073b53 + 1a8aa3c commit 8c2873a

File tree

788 files changed

+247442
-41091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

788 files changed

+247442
-41091
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,27 @@ test: Adding missing tests or correcting existing tests
1515
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
1616
-->
1717

18-
#### Check the PR title.
18+
#### Check the PR title
1919
<!--
2020
The description of the title will be attached in Release Notes,
2121
so please describe it from user-oriented, what this PR does / why we need it.
2222
Please check your PR title with the below requirements:
2323
-->
24-
- [ ] This PR title match the format: \[\<type\>\]\[\<scope\>\]: \<description\>. For example: \[fix\]\[backend\] flaky fix
24+
- [ ] This PR title match the format: \[\<type\>\]\[\<scope\>\] \<description\>. For example: \[fix\]\[backend\] flaky fix
2525
- [ ] The description of this PR title is user-oriented and clear enough for others to understand.
2626
- [ ] Add documentation if the current PR requires user awareness at the usage level.
2727
- [ ] This PR is written in English. PRs not in English will not be reviewed.
2828

29+
#### (Optional) Translate the PR title into Chinese
2930

30-
#### (Optional) Translate the PR title into Chinese.
31-
32-
33-
#### (Optional) More detailed description for this PR(en: English/zh: Chinese).
31+
#### (Optional) More detailed description for this PR(en: English/zh: Chinese)
3432
<!--
3533
Provide more detailed info for review(e.g., it's recommended to provide perf data if this is a perf type PR).
3634
-->
3735
en:
3836
zh(optional):
3937

40-
41-
#### (Optional) Which issue(s) this PR fixes:
38+
#### (Optional) Which issue(s) this PR fixes
4239
<!--
4340
Automatically closes linked issue when PR is merged.
4441
Eg: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.

.github/workflows/ai-cr-required.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
run: |
3030
echo "PR number: $PR_NUMBER"
31-
COMMENTS=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/pulls/${PR_NUMBER}/comments --jq '.[].user.login')
31+
COMMENTS=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/pulls/${PR_NUMBER}/reviews --jq '.[].user.login')
3232
echo "Comment authors: $COMMENTS"
3333
echo "$COMMENTS" | grep -q "^CozeLoop$"
3434
if [ $? -ne 0 ]; then

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ release/deployment/helm-chart/umbrella/Chart.lock
5151

5252
**/kitex_remote_config.json
5353
.coda/
54+
.claude/
55+
.coco/
56+
CLAUDE.md
57+
AGENTS.md
5458
backend/script/errorx/.env
5559
.cursor/
56-
AGENTS.md
60+
.specify/
61+
specs/

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@
169169
"[svg]": {
170170
"editor.defaultFormatter": "jock.svg"
171171
},
172-
"svg.preview.background": "white",
173172
"[xml]": {
174173
"editor.defaultFormatter": "mblode.pretty-formatter"
175174
},
176175
"[sql]": {
177176
"editor.defaultFormatter": "adpyke.vscode-sql-formatter"
178177
},
178+
"svg.preview.background": "white",
179179
"git.openRepositoryInParentFolders": "always",
180180
"references.preferredLocation": "view"
181181
}

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ members of the project's leadership.
6969
## Attribution
7070

7171
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
72-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7373

7474
[homepage]: https://www.contributor-covenant.org
7575

7676
For answers to common questions about this code of conduct, see
77-
https://www.contributor-covenant.org/faq
78-
77+
<https://www.contributor-covenant.org/faq>

CONTRIBUTING.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ You could go to [README](./README.md) to find more information.
2828
<summary>Detailed Submission Process (Click to expand)</summary>
2929

3030
1. Create a feature branch from the `main` branch:
31+
3132
```bash
3233
git checkout main
3334
git pull
@@ -37,18 +38,21 @@ You could go to [README](./README.md) to find more information.
3738
2. Develop and commit on the feature branch
3839

3940
3. Ensure the code passes all tests:
41+
4042
```bash
41-
cd ./backend && go test -gcflags="all=-N -l" ./...
43+
cd ./backend && go test -gcflags="all=-N -l" ./...
4244
```
4345

4446
4. Push the branch to the remote repository:
47+
4548
```bash
4649
git push origin feat/your-feature-name
4750
```
4851

4952
5. Create a Pull Request to the `main` branch
5053

5154
6. After code review is passed, merge into the `main` branch
55+
5256
</details>
5357

5458
```mermaid
@@ -79,6 +83,7 @@ Follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/
7983
```
8084

8185
Types include:
86+
8287
* `feat`: New feature
8388
* `fix`: Bug fix
8489
* `docs`: Documentation changes
@@ -89,6 +94,7 @@ Types include:
8994
* `chore`: Changes to the build process or auxiliary tools
9095

9196
Example:
97+
9298
```
9399
feat(api): add user authentication interface
94100
@@ -133,6 +139,7 @@ Closes #123
133139
* It is better to Use mockgen to generate mock struct instead of using patch
134140

135141
Run unit tests:
142+
136143
```bash
137144
cd ./backend && go test -gcflags="all=-N -l" ./...
138145
```
@@ -146,6 +153,7 @@ cd ./backend && go test -gcflags="all=-N -l" ./...
146153
* Use [GoDoc](https://blog.golang.org/godoc) format for writing comments
147154

148155
Example:
156+
149157
```go
150158
// UserService provides operations related to users.
151159
type UserService struct {

README.cn.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,54 @@
1010
<p>
1111
<img alt="License" src="https://img.shields.io/badge/license-apache2.0-blue.svg">
1212
<img alt="Go Version" src="https://img.shields.io/badge/go-%3E%3D%201.24.0-blue">
13+
<a href="https://deepwiki.com/coze-dev/coze-loop"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
1314
</p>
1415

1516
[English](README.md) | 中文
1617

1718
</div>
1819

1920
## 什么是 Coze Loop
20-
[Coze Loop ](https://www.coze.cn/loop) 是一个面向开发者,专注于 AI Agent 开发与运维的平台级解决方案。 它可以解决 AI Agent 开发过程中面临的各种挑战,提供从开发、调试、评估、到监控的全生命周期管理能力。
21+
22+
[Coze Loop](https://www.coze.cn/loop) 是一个面向开发者,专注于 AI Agent 开发与运维的平台级解决方案。 它可以解决 AI Agent 开发过程中面临的各种挑战,提供从开发、调试、评估、到监控的全生命周期管理能力。
2123
Coze Loop 在商业化版本的基础上,推出开源版免费对开发者开放核心基础功能模块,以开源模式共享核心技术框架,开发者可根据业务需求定制与扩展,便于社区共建、分享交流,助力开发者零门槛参与 AI Agent 的探索与实践。
24+
2225
## Coze Loop 能做什么?
26+
2327
Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效地开发和运维 AI Agent。无论是提示词工程、AI Agent 评测,还是上线后的监控与调优,Coze Loop 都提供了强大的工具和智能化的支持,极大地简化了 AI Agent 的开发流程,提升了 AI Agent 的运行效果和稳定性。
2428

2529
* **Prompt 开发**:Coze Loop 的 Prompt 开发模块为开发者提供了从编写、调试、优化到版本管理的全流程支持,通过可视化 Playground 实现 Prompt 的实时交互测试,让开发者能够直观比较不同大语言模型的输出效果。
2630
* **评测**:Coze Loop 评测模块为开发者提供系统化的评测能力,能够对 Prompt 和扣子智能体的输出效果进行多维度自动化检测,例如准确性、简洁性和合规性等。
2731
* **观测**:Coze Loop 为开发者提供了全链路执行过程的可视化观测能力,完整记录从用户输入到 AI 输出的每个处理环节,包括 Prompt 解析、模型调用和工具执行等关键节点,并自动捕获中间结果和异常状态。
2832

2933
## 功能清单
34+
3035
| **功能** | **功能点** |
3136
| --- | --- |
32-
| Prompt 调试 | * Playground 调试、对比 <br> * Prompt 版本管理 |
33-
| 评测 | * 管理评测集 <br> * 管理评估器 <br> * 管理实验 |
34-
| 观测 | * SDK 上报 Trace <br> * Trace 数据观测 |
37+
| Prompt 调试 | *Playground 调试、对比 <br>* Prompt 版本管理 |
38+
| 评测 | *管理评测集 <br>* 管理评估器 <br> * 管理实验 |
39+
| 观测 | *SDK 上报 Trace <br>* Trace 数据观测 |
3540
| 模型 | 支持接入 OpenAI、火山方舟等模型 |
41+
3642
## 快速开始
43+
>
3744
> 参考[快速开始](https://github.com/coze-dev/coze-loop/wiki/2.-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B),详细了解如何安装部署 Coze Loop 最新版本。
3845
3946
### 部署方式1:Docker 部署 (Docker Compose)
47+
>
4048
> 请提前安装并启动 Docker Engine。
4149
4250
操作步骤:
4351

4452
1. 获取源码。
4553
执行以下命令,获取 Coze Loop 最新版本的源码。
54+
4655
```Bash
4756
# 克隆代码
4857
git clone https://github.com/coze-dev/coze-loop.git
49-
58+
5059
# 进入coze-loop目录下
51-
cd coze-loop
60+
cd coze-loop
5261
```
5362

5463
2. 配置模型。
@@ -59,10 +68,11 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
5968
* model:火山方舟模型接入点的 Endpoint ID。中国境内用户参考参考[火山方舟文档](https://www.volcengine.com/docs/82379/1099522);非中国境内的用户可参考[BytePlus ModelArk 文档](https://docs.byteplus.com/en/docs/ModelArk/1099522?utm_source=github&utm_medium=readme&utm_campaign=coze_open_source)
6069
3. 启动服务。
6170
执行以下命令,使用 Docker Compose 快速部署 Coze Loop 开源版。
71+
6272
```Bash
63-
# 启动服务,默认为开发模式
73+
# 启动服务,默认为开发模式
6474
# 在 coze-loop/目录下执行
65-
make compose-up
75+
make compose-up
6676
```
6777

6878
4. 通过浏览器访问 Coze Loop 开源版 `http://localhost:8082`
@@ -75,6 +85,7 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
7585
操作步骤:
7686

7787
1. 执行以下命令获取 Helm Chart 包。
88+
7889
```Bash
7990
helm pull oci://docker.io/cozedev/coze-loop --version 1.0.0-helm
8091
tar -zxvf coze-loop-1.0.0-helm.tgz && cd coze-loop && rm -f ../coze-loop-1.0.0-helm.tgz
@@ -88,6 +99,7 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
8899
Ingress 用于暴露服务到外部,需根据集群实际情况配置项目目录下的`templates/ingress.yaml` 文件,自行修改 ingressClassName 等参数,配置 class、instance、host、ip 分配等要素。
89100
4. 部署并启动服务。
90101
执行以下命令,使用 Helm 快速部署 Coze Loop 开源版。
102+
91103
```Bash
92104
# 在 coze-loop/目录下执行
93105
make helm-up
@@ -119,21 +131,31 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
119131
* [故障排查](https://github.com/coze-dev/coze-loop/wiki/7.-%E6%95%85%E9%9A%9C%E6%8E%92%E6%9F%A5):了解如何查看容器状态、系统日志。
120132

121133
## License
134+
122135
本项目采用 Apache 2.0 许可证。详情请参阅 [LICENSE](LICENSE) 文件。
136+
123137
## 社区贡献
138+
124139
我们欢迎社区贡献,贡献指南参见 [CONTRIBUTING](CONTRIBUTING.md)[Code of conduct](CODE_OF_CONDUCT.md),期待您的贡献!
140+
125141
## 安全与隐私
142+
126143
如果你在该项目中发现潜在的安全问题,或你认为可能发现了安全问题,请通过我们的[安全中心](https://security.bytedance.com/src)[漏洞报告邮箱](sec@bytedance.com)通知字节跳动安全团队。
127144
**不要**创建公开的 GitHub Issue。
145+
128146
## 加入社区
147+
129148
我们致力于构建一个开放、友好的开发者社区,欢迎所有对 AI Agent 开发感兴趣的开发者加入我们!
149+
130150
### 问题反馈与功能建议
151+
131152
为了更高效地跟踪和解决问题,保证信息透明和便于协同,我们推荐通过以下方式参与:
132153

133154
* **GitHub Issues**[提交 Bug 报告或功能请求](https://github.com/coze-dev/coze-loop/issues)
134155
* **Pull Requests**[贡献代码或文档改进](https://github.com/coze-dev/coze-loop/pulls)
135156

136157
### 技术交流与讨论
158+
137159
加入我们的技术交流群,与其他开发者分享经验、获取项目最新动态:
138160

139161
* 飞书群聊:飞书移动端扫描以下二维码,加入Coze Loop 技术交流群。
@@ -144,6 +166,7 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
144166
* Telegram 群组:[Coze](https://t.me/+pP9CkPnomDA0Mjgx)
145167

146168
## 致谢
169+
147170
感谢所有为 Coze Loop 项目做出贡献的开发者和社区成员。特别感谢:
148171

149172
* [Eino](https://github.com/cloudwego/eino) 框架团队提供的 LLM 集成支持

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<p>
1010
<img alt="License" src="https://img.shields.io/badge/license-apache2.0-blue.svg">
1111
<img alt="Go Version" src="https://img.shields.io/badge/go-%3E%3D%201.24.0-blue">
12+
<a href="https://deepwiki.com/coze-dev/coze-loop"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
1213
</p>
1314

1415
English | [中文](README.cn.md)
@@ -22,35 +23,41 @@ English | [中文](README.cn.md)
2223
Based on the commercial version, Coze Loop introduces an open-source edition that offers developers free access to core foundational feature modules. By sharing its core technology framework in an open-source model, developers can customize and extend according to business needs, facilitating community co-construction, sharing, and exchange, helping developers participate in AI agent exploration and practice with zero barriers.
2324

2425
## What can Coze Loop do?
26+
2527
Coze Loop helps developers develop and operate AI Agent more efficiently by providing full lifecycle management capabilities. Whether it is prompt engineering, AI Agent evaluation, or monitoring and optimization after deployment, Coze Loop provides powerful tools and intelligent support, greatly simplifying the development process of AI Agents and enhancing their operational performance and stability.
2628

2729
* **Prompt development**: The Prompt development module of Coze Loop provides developers with end-to-end support for writing, debugging, optimizing, and version management. Through a visual Playground, it enables real-time interactive testing of prompts, allowing developers to intuitively compare the output of different LLMs.
2830
* **Evaluation**: The Coze Loop evaluation module provides developers with systematic evaluation capabilities, enabling automated multi-dimensional testing of prompts and Coze agents' output, such as accuracy, conciseness, compliance, and more.
2931
* **Observability**: Coze Loop provides developers with observability for the entire execution process, fully recording every stage from user input to AI output, including key stages such as prompt parsing, model invocation, and tool execution, and automatically capturing intermediate results and exceptions.
3032

3133
## Feature list
34+
3235
| **Feature** | **Functional points** |
3336
| --- | --- |
34-
| Prompt debugging | * Playground debugging and comparison <br> * Prompt version management |
35-
| Evaluation | * Manage evaluation sets <br> Management evaluator <br> * Manage experiments |
37+
| Prompt debugging | *Playground debugging and comparison <br>* Prompt version management |
38+
| Evaluation | *Manage evaluation sets <br> Management evaluator <br>* Manage experiments |
3639
| Observation | SDK trace reporting <br> * Trace data observation |
3740
| Model | Support integration with OpenAI, Volcengine Ark, and other models |
41+
3842
## Quick Start
43+
>
3944
> Refer to [Quick Start](https://github.com/coze-dev/coze-loop/wiki/2.-Quickstart) to learn in detail how to install and deploy the latest version of Coze Loop.
4045
4146
### Deployment method 1: Docker deployment (Docker Compose)
47+
>
4248
> Please install and start Docker Engine before you start.
4349
4450
Procedure:
4551

4652
1. Clone the source code.
4753
Run the following command to obtain the latest version of the Coze Loop source code.
54+
4855
```Bash
4956
# Clone the code
5057
git clone https://github.com/coze-dev/coze-loop.git
51-
58+
5259
# Enter the coze-loop directory
53-
cd coze-loop
60+
cd coze-loop
5461
```
5562

5663
2. Configure a model.
@@ -61,10 +68,11 @@ Procedure:
6168
* model: The Endpoint ID of the Volcengine Ark model access point. Users within China can refer to [the Volcengine Ark documentation](https://www.volcengine.com/docs/82379/1099522); users outside China can refer to [the BytePlus ModelArk documentation](https://docs.byteplus.com/en/docs/ModelArk/1099522?utm_source=github&utm_medium=readme&utm_campaign=coze_open_source).
6269
3. Start the service.
6370
Run the following commands to quickly deploy the open-source version of Coze Loop using Docker Compose.
71+
6472
```Bash
6573
# Start the service (default: development mode)
6674
# Run in the coze-loop/ directory
67-
make compose-up
75+
make compose-up
6876
```
6977

7078
4. Access the Coze Loop open-source version through your browser `http://localhost:8082`.
@@ -77,6 +85,7 @@ Procedure:
7785
Procedure:
7886

7987
1. Run the following command to obtain the Helm Chart package.
88+
8089
```Bash
8190
helm pull oci://docker.io/cozedev/coze-loop --version 1.0.0-helm
8291
tar -zxvf coze-loop-1.0.0-helm.tgz && cd coze-loop && rm -f ../coze-loop-1.0.0-helm.tgz
@@ -90,6 +99,7 @@ Procedure:
9099
Ingress is used to expose services to external networks. You need to configure the `templates/ingress.yaml` file in the project directory according to the actual cluster situation, manually modify parameters such as ingressClassName, and configure elements such as class, instance, host, and IP allocation.
91100
4. Deploy and start the service.
92101
Execute the following commands to quickly deploy the open-source version of Coze Loop using Helm.
102+
93103
```Bash
94104
# Run in the coze-loop/ directory
95105
make helm-up
@@ -139,11 +149,14 @@ Please **do not** create public GitHub Issues.
139149
We are committed to building an open and friendly developer community. All developers interested in AI Agent development are welcome to join us!
140150

141151
### Issue Reports & Feature Requests
152+
142153
To efficiently track and resolve issues while ensuring transparency and collaboration, we recommend participating through:
143-
- **GitHub Issues**: [Submit bug reports or feature requests](https://github.com/coze-dev/coze-loop/issues)
144-
- **Pull Requests**: [Contribute code or documentation improvements](https://github.com/coze-dev/coze-loop/pulls)
154+
155+
* **GitHub Issues**: [Submit bug reports or feature requests](https://github.com/coze-dev/coze-loop/issues)
156+
* **Pull Requests**: [Contribute code or documentation improvements](https://github.com/coze-dev/coze-loop/pulls)
145157

146158
### Technical Discussion & Communication
159+
147160
Join our technical discussion groups to share experiences with other developers and stay updated with the latest project developments:
148161

149162
* Lark Group Chat: Scan the QR code below on the Lark mobile app to join the Coze Loop technical discussion group.
@@ -155,9 +168,9 @@ Join our technical discussion groups to share experiences with other developers
155168
* Telegram Group: [Coze](https://t.me/+pP9CkPnomDA0Mjgx)
156169

157170
## Acknowledgments
171+
158172
Thanks to all developers and community members who contributed to the Coze Loop project Special thanks:
159173

160174
* LLM integration support provided by the [Eino](https://github.com/cloudwego/eino) framework team
161175
* High-performance frameworks developed by the [CloudWeGo](https://www.cloudwego.io) team
162176
* All users who participated in testing and feedback
163-

0 commit comments

Comments
 (0)