agt-agent 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. agt_agent-0.1.0/.agent/rules/workflow.md +7 -0
  2. agt_agent-0.1.0/.agent/skills/explore-codebase/SKILL.md +13 -0
  3. agt_agent-0.1.0/.agent/workflows/README.md +41 -0
  4. agt_agent-0.1.0/.agent/workflows/batch_double.json +43 -0
  5. agt_agent-0.1.0/.agent/workflows/batch_double.json.meta +5 -0
  6. agt_agent-0.1.0/.agent/workflows/classify_age.json +59 -0
  7. agt_agent-0.1.0/.agent/workflows/classify_age.json.meta +5 -0
  8. agt_agent-0.1.0/.agent/workflows/greet.json +48 -0
  9. agt_agent-0.1.0/.agent/workflows/greet.json.meta +6 -0
  10. agt_agent-0.1.0/.agent/workflows/intent_route.json +54 -0
  11. agt_agent-0.1.0/.agent/workflows/intent_route.json.meta +5 -0
  12. agt_agent-0.1.0/.agent/workflows/json_roundtrip.json +41 -0
  13. agt_agent-0.1.0/.agent/workflows/json_roundtrip.json.meta +5 -0
  14. agt_agent-0.1.0/.agent/workflows/loop_greet.json +65 -0
  15. agt_agent-0.1.0/.agent/workflows/loop_greet.json.meta +5 -0
  16. agt_agent-0.1.0/.agent/workflows/use_subworkflow.json +25 -0
  17. agt_agent-0.1.0/.agent/workflows/use_subworkflow.json.meta +5 -0
  18. agt_agent-0.1.0/LICENSE +21 -0
  19. agt_agent-0.1.0/MANIFEST.in +4 -0
  20. agt_agent-0.1.0/PKG-INFO +159 -0
  21. agt_agent-0.1.0/README.md +117 -0
  22. agt_agent-0.1.0/agt_agent.egg-info/PKG-INFO +159 -0
  23. agt_agent-0.1.0/agt_agent.egg-info/SOURCES.txt +59 -0
  24. agt_agent-0.1.0/agt_agent.egg-info/dependency_links.txt +1 -0
  25. agt_agent-0.1.0/agt_agent.egg-info/entry_points.txt +3 -0
  26. agt_agent-0.1.0/agt_agent.egg-info/requires.txt +19 -0
  27. agt_agent-0.1.0/agt_agent.egg-info/top_level.txt +1 -0
  28. agt_agent-0.1.0/examples/conversation.py +84 -0
  29. agt_agent-0.1.0/examples/step0_hello.py +41 -0
  30. agt_agent-0.1.0/examples/step1_demo.py +81 -0
  31. agt_agent-0.1.0/examples/step2_demo.py +77 -0
  32. agt_agent-0.1.0/examples/step3_demo.py +77 -0
  33. agt_agent-0.1.0/examples/step4_demo.py +75 -0
  34. agt_agent-0.1.0/examples/step5_demo.py +46 -0
  35. agt_agent-0.1.0/examples/step6_demo.py +60 -0
  36. agt_agent-0.1.0/examples/step7_demo.py +79 -0
  37. agt_agent-0.1.0/examples/structured.py +86 -0
  38. agt_agent-0.1.0/pyproject.toml +61 -0
  39. agt_agent-0.1.0/requirements.txt +11 -0
  40. agt_agent-0.1.0/setup.cfg +4 -0
  41. agt_agent-0.1.0/src/__init__.py +6 -0
  42. agt_agent-0.1.0/src/agent.py +375 -0
  43. agt_agent-0.1.0/src/agent_config.py +107 -0
  44. agt_agent-0.1.0/src/chat.py +147 -0
  45. agt_agent-0.1.0/src/commands.py +391 -0
  46. agt_agent-0.1.0/src/config.py +102 -0
  47. agt_agent-0.1.0/src/llm_client.py +221 -0
  48. agt_agent-0.1.0/src/lsp_server.py +111 -0
  49. agt_agent-0.1.0/src/mcp_client.py +167 -0
  50. agt_agent-0.1.0/src/multiagent.py +100 -0
  51. agt_agent-0.1.0/src/plan_tools.py +52 -0
  52. agt_agent-0.1.0/src/prompts.py +74 -0
  53. agt_agent-0.1.0/src/real_tools.py +530 -0
  54. agt_agent-0.1.0/src/session.py +296 -0
  55. agt_agent-0.1.0/src/snapshots.py +71 -0
  56. agt_agent-0.1.0/src/tools.py +154 -0
  57. agt_agent-0.1.0/src/web.py +526 -0
  58. agt_agent-0.1.0/src/wiki.py +170 -0
  59. agt_agent-0.1.0/src/workflow.py +1334 -0
  60. agt_agent-0.1.0/static/index.html +547 -0
  61. agt_agent-0.1.0/static/workflow_editor.html +1706 -0
@@ -0,0 +1,7 @@
1
+ # 通用工作规则(始终生效)— 示例
2
+
3
+ - 改文件前先读懂现有内容;优先用 edit(精确替换)而非整体覆盖。
4
+ - 执行有副作用或不可逆的操作(删除、发布、联网提交等)前,先向用户确认。
5
+ - 优先简单稳健的方案;遇到错误如实上报并尝试修正,不隐瞒。
6
+ - 复杂任务拆成小步,每步只用必要的工具。
7
+ - 文件操作和 run_python 都在当前目录(cwd)下进行。
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: explore-codebase
3
+ description: 快速摸清一个陌生代码库的结构与关键模块
4
+ when_to_use: 接手新项目、或需要在陌生代码库里定位功能时
5
+ ---
6
+
7
+ # 探索代码库 SOP
8
+
9
+ 1. 先 list_dir 看顶层结构,找到入口 / 配置文件(README、package.json、requirements.txt、*.csproj 等)。
10
+ 2. 读入口文件和 README,理解项目是做什么的、用了什么技术栈。
11
+ 3. 用 grep 按关键词(函数名 / 类名 / 业务术语)定位感兴趣的模块。
12
+ 4. 读关键模块,梳理"数据怎么流、谁调用谁"。
13
+ 5. 输出:一句话项目概览 + 3~5 个最关键文件及其职责。
@@ -0,0 +1,41 @@
1
+ # .agent/workflows/ —— Coze 工作流目录
2
+
3
+ 每个工作流是一份 **Coze 原生画布 JSON**(从 Coze Studio 导出或手写),引擎只读不改。
4
+
5
+ ## 文件
6
+
7
+ - `<名>.json` —— Coze 画布:`{nodes, edges, versions}`
8
+ - `<名>.json.meta` —— 旁车(可选但建议):
9
+ ```json
10
+ {
11
+ "name": "greet", // 工具名 → wf_greet
12
+ "description": "一句话说明做什么", // Agent 据此判断该不该调用
13
+ "enabled": true, // false 则跳过
14
+ "coze_url": "https://www.coze.com/...", // WebUI「🧪工作流」按钮打开的编辑链接
15
+ "inputs": [...] // 可选:覆盖开始节点的入参声明
16
+ }
17
+ ```
18
+
19
+ ## 画布约定(Coze Studio 源码确认)
20
+
21
+ - **开始节点** id 恒为 `100001`(type `"1"`),**结束节点** id 恒为 `900001`(type `"2"`)。
22
+ - **工作流入参** = 开始节点的 `data.outputs`(外部输入作为它的"输出"暴露给下游)。
23
+ - **工作流出参** = 结束节点的 `data.inputs.inputParameters`;`terminatePlan`:
24
+ - `returnVariables` → 把 inputParameters 求值成键值返回;
25
+ - `useAnswerContent` → 渲染 `content` 模板字符串返回。
26
+ - **变量引用**:`value.type` 为 `literal`(字面量/`{{var}}`模板) / `ref`(引用) / `object_ref`(逐字段组装)。
27
+ - `ref` 的 `content`:`{source: "block-output", blockID: "<节点id>", name: "<输出名, 可点号取子字段>"}`,
28
+ 或 `{source: "global_variable_app"|"global_variable_system"|"global_variable_user", path: ["变量名"]}`。
29
+ - **边**:`{sourceNodeID, targetNodeID, sourcePortID}`;分支节点用 `sourcePortID` 区分出口。
30
+
31
+ ## 已支持的节点 type(随实现进度更新)
32
+
33
+ | type | 节点 | 状态 |
34
+ |---|---|---|
35
+ | 1 / 2 | 开始 / 结束 | ✅ |
36
+ | 3 | LLM | ✅ |
37
+ | 5 / 8 / 15 / 32 / 40 / 58 / 59 | 代码/选择器/文本/聚合/赋值/JSON | 🚧 S2 |
38
+ | 21 / 28 | 循环 / 批处理 | 🚧 S3 |
39
+ | 22 / 45 / 9 / 4 | 意图/HTTP/子工作流/插件 | 🚧 S4 |
40
+
41
+ 未支持的节点被执行到时会**明确报错**(不静默),便于发现待补的能力。
@@ -0,0 +1,43 @@
1
+ {
2
+ "nodes": [
3
+ {"id": "100001", "type": "1", "data": {"outputs": [
4
+ {"name": "nums", "type": "list", "schema": {"type": "integer"}, "required": true}
5
+ ], "trigger_parameters": []}},
6
+
7
+ {"id": "130050", "type": "28", "data": {
8
+ "inputs": {
9
+ "batchSize": {"type": "integer", "value": {"type": "literal", "content": 10}},
10
+ "concurrentSize": {"type": "integer", "value": {"type": "literal", "content": 1}},
11
+ "inputParameters": [
12
+ {"name": "input", "input": {"type": "list", "schema": {"type": "integer"}, "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "nums"}}}}
13
+ ]
14
+ },
15
+ "outputs": [
16
+ {"name": "doubled_list", "type": "list", "schema": {"type": "integer"}, "input": {"type": "list", "schema": {"type": "integer"}, "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130051", "name": "doubled"}}}}
17
+ ]
18
+ }, "blocks": [
19
+ {"id": "130051", "type": "5", "data": {"inputs": {
20
+ "inputParameters": [
21
+ {"name": "n", "input": {"type": "integer", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130050", "name": "input"}}}}
22
+ ],
23
+ "code": "async def main(args):\n return {'doubled': args.params['n'] * 2}",
24
+ "language": 3
25
+ }, "outputs": [{"name": "doubled", "type": "integer"}]}}
26
+ ], "edges": [
27
+ {"sourceNodeID": "130050", "targetNodeID": "130051", "sourcePortID": "batch-function-inline-output"},
28
+ {"sourceNodeID": "130051", "targetNodeID": "130050", "sourcePortID": "", "targetPortID": "batch-function-inline-input"}
29
+ ]},
30
+
31
+ {"id": "900001", "type": "2", "data": {"inputs": {
32
+ "terminatePlan": "returnVariables",
33
+ "inputParameters": [
34
+ {"name": "result", "input": {"type": "list", "schema": {"type": "integer"}, "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130050", "name": "doubled_list"}}}}
35
+ ]
36
+ }}}
37
+ ],
38
+ "edges": [
39
+ {"sourceNodeID": "100001", "targetNodeID": "130050", "sourcePortID": ""},
40
+ {"sourceNodeID": "130050", "targetNodeID": "900001", "sourcePortID": "batch-output"}
41
+ ],
42
+ "versions": {"batch": "v2"}
43
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "batch_double",
3
+ "description": "对一组数字逐个翻倍并聚合成列表返回(演示:批处理 type28 + 代码节点 + 列表聚合)",
4
+ "enabled": true
5
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "nodes": [
3
+ {"id": "100001", "type": "1", "data": {"outputs": [
4
+ {"name": "name", "type": "string", "required": true},
5
+ {"name": "age", "type": "integer", "required": true}
6
+ ], "trigger_parameters": []}},
7
+
8
+ {"id": "130002", "type": "8", "data": {"inputs": {"branches": [
9
+ {"condition": {"logic": 2, "conditions": [
10
+ {"operator": 14,
11
+ "left": {"input": {"type": "integer", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "age"}}}},
12
+ "right": {"input": {"type": "integer", "value": {"type": "literal", "content": 18}}}}
13
+ ]}}
14
+ ]}}},
15
+
16
+ {"id": "130003", "type": "3", "data": {"inputs": {
17
+ "inputParameters": [
18
+ {"name": "name", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "name"}}}},
19
+ {"name": "age", "input": {"type": "integer", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "age"}}}}
20
+ ],
21
+ "llmParam": [
22
+ {"name": "prompt", "input": {"type": "string", "value": {"type": "literal", "content": "用一句话欢迎成年用户 {{name}},顺带提一句已满 {{age}} 岁。只输出问候语。"}}}
23
+ ]
24
+ }, "outputs": [{"name": "output", "type": "string"}]}},
25
+
26
+ {"id": "130004", "type": "3", "data": {"inputs": {
27
+ "inputParameters": [
28
+ {"name": "name", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "name"}}}},
29
+ {"name": "age", "input": {"type": "integer", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "age"}}}}
30
+ ],
31
+ "llmParam": [
32
+ {"name": "prompt", "input": {"type": "string", "value": {"type": "literal", "content": "用一句话友善提醒未成年用户 {{name}},提一下才 {{age}} 岁。只输出问候语。"}}}
33
+ ]
34
+ }, "outputs": [{"name": "output", "type": "string"}]}},
35
+
36
+ {"id": "130005", "type": "32", "data": {"inputs": {"mergeGroups": [
37
+ {"name": "greeting", "variables": [
38
+ {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130003", "name": "output"}}},
39
+ {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130004", "name": "output"}}}
40
+ ]}
41
+ ]}, "outputs": [{"name": "greeting", "type": "string"}]}},
42
+
43
+ {"id": "900001", "type": "2", "data": {"inputs": {
44
+ "terminatePlan": "returnVariables",
45
+ "inputParameters": [
46
+ {"name": "result", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130005", "name": "greeting"}}}}
47
+ ]
48
+ }}}
49
+ ],
50
+ "edges": [
51
+ {"sourceNodeID": "100001", "targetNodeID": "130002", "sourcePortID": ""},
52
+ {"sourceNodeID": "130002", "targetNodeID": "130003", "sourcePortID": "true"},
53
+ {"sourceNodeID": "130002", "targetNodeID": "130004", "sourcePortID": "false"},
54
+ {"sourceNodeID": "130003", "targetNodeID": "130005", "sourcePortID": ""},
55
+ {"sourceNodeID": "130004", "targetNodeID": "130005", "sourcePortID": ""},
56
+ {"sourceNodeID": "130005", "targetNodeID": "900001", "sourcePortID": ""}
57
+ ],
58
+ "versions": {}
59
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "classify_age",
3
+ "description": "根据年龄判断成年/未成年并生成不同问候语(演示:选择器分支 type8 + 变量聚合 type32)",
4
+ "enabled": true
5
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "nodes": [
3
+ {
4
+ "id": "100001",
5
+ "type": "1",
6
+ "data": {
7
+ "outputs": [
8
+ {"name": "name", "type": "string", "required": true}
9
+ ],
10
+ "trigger_parameters": []
11
+ }
12
+ },
13
+ {
14
+ "id": "130001",
15
+ "type": "3",
16
+ "data": {
17
+ "inputs": {
18
+ "inputParameters": [
19
+ {"name": "name", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "name"}}}}
20
+ ],
21
+ "llmParam": [
22
+ {"name": "prompt", "input": {"type": "string", "value": {"type": "literal", "content": "用一句话热情地打招呼,对方名字是 {{name}}。只输出问候语本身。"}}},
23
+ {"name": "systemPrompt", "input": {"type": "string", "value": {"type": "literal", "content": "你是友好的助手。"}}},
24
+ {"name": "temperature", "input": {"type": "float", "value": {"type": "literal", "content": 0.9}}}
25
+ ]
26
+ },
27
+ "outputs": [{"name": "output", "type": "string"}]
28
+ }
29
+ },
30
+ {
31
+ "id": "900001",
32
+ "type": "2",
33
+ "data": {
34
+ "inputs": {
35
+ "terminatePlan": "returnVariables",
36
+ "inputParameters": [
37
+ {"name": "greeting", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130001", "name": "output"}}}}
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ ],
43
+ "edges": [
44
+ {"sourceNodeID": "100001", "targetNodeID": "130001", "sourcePortID": ""},
45
+ {"sourceNodeID": "130001", "targetNodeID": "900001", "sourcePortID": ""}
46
+ ],
47
+ "versions": {}
48
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "greet",
3
+ "description": "热情地和指定名字的人打招呼(演示工作流:开始→LLM→结束)",
4
+ "enabled": true,
5
+ "coze_url": "https://www.coze.com"
6
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "nodes": [
3
+ {"id": "100001", "type": "1", "data": {"outputs": [
4
+ {"name": "query", "type": "string", "required": true}
5
+ ], "trigger_parameters": []}},
6
+
7
+ {"id": "130060", "type": "22", "data": {"inputs": {
8
+ "inputParameters": [
9
+ {"name": "query", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "query"}}}}
10
+ ],
11
+ "intents": [{"name": "退款"}, {"name": "咨询"}],
12
+ "mode": "all"
13
+ }, "outputs": [{"name": "classificationId", "type": "integer"}, {"name": "reason", "type": "string"}]}},
14
+
15
+ {"id": "130061", "type": "3", "data": {"inputs": {
16
+ "inputParameters": [{"name": "query", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "query"}}}}],
17
+ "llmParam": [{"name": "prompt", "input": {"type": "string", "value": {"type": "literal", "content": "用户想退款(原文:{{query}})。用一句话安抚并简述退款流程。"}}}]
18
+ }, "outputs": [{"name": "output", "type": "string"}]}},
19
+
20
+ {"id": "130062", "type": "3", "data": {"inputs": {
21
+ "inputParameters": [{"name": "query", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "query"}}}}],
22
+ "llmParam": [{"name": "prompt", "input": {"type": "string", "value": {"type": "literal", "content": "用户在咨询(原文:{{query}})。用一句话友善解答。"}}}]
23
+ }, "outputs": [{"name": "output", "type": "string"}]}},
24
+
25
+ {"id": "130063", "type": "3", "data": {"inputs": {
26
+ "inputParameters": [{"name": "query", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "query"}}}}],
27
+ "llmParam": [{"name": "prompt", "input": {"type": "string", "value": {"type": "literal", "content": "未明确识别用户意图(原文:{{query}})。用一句话引导用户说明需求。"}}}]
28
+ }, "outputs": [{"name": "output", "type": "string"}]}},
29
+
30
+ {"id": "130064", "type": "32", "data": {"inputs": {"mergeGroups": [
31
+ {"name": "reply", "variables": [
32
+ {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130061", "name": "output"}}},
33
+ {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130062", "name": "output"}}},
34
+ {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130063", "name": "output"}}}
35
+ ]}
36
+ ]}, "outputs": [{"name": "reply", "type": "string"}]}},
37
+
38
+ {"id": "900001", "type": "2", "data": {"inputs": {
39
+ "terminatePlan": "returnVariables",
40
+ "inputParameters": [{"name": "result", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130064", "name": "reply"}}}}]
41
+ }}}
42
+ ],
43
+ "edges": [
44
+ {"sourceNodeID": "100001", "targetNodeID": "130060", "sourcePortID": ""},
45
+ {"sourceNodeID": "130060", "targetNodeID": "130061", "sourcePortID": "branch_0"},
46
+ {"sourceNodeID": "130060", "targetNodeID": "130062", "sourcePortID": "branch_1"},
47
+ {"sourceNodeID": "130060", "targetNodeID": "130063", "sourcePortID": "default"},
48
+ {"sourceNodeID": "130061", "targetNodeID": "130064", "sourcePortID": ""},
49
+ {"sourceNodeID": "130062", "targetNodeID": "130064", "sourcePortID": ""},
50
+ {"sourceNodeID": "130063", "targetNodeID": "130064", "sourcePortID": ""},
51
+ {"sourceNodeID": "130064", "targetNodeID": "900001", "sourcePortID": ""}
52
+ ],
53
+ "versions": {}
54
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "intent_route",
3
+ "description": "识别用户输入意图(退款/咨询/其他)并分流到不同回复(演示:意图识别 type22 分支 branch_0/branch_1/default)",
4
+ "enabled": true
5
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "nodes": [
3
+ {"id": "100001", "type": "1", "data": {"outputs": [
4
+ {"name": "json_str", "type": "string", "required": true}
5
+ ], "trigger_parameters": []}},
6
+
7
+ {"id": "130010", "type": "59", "data": {"inputs": {
8
+ "inputParameters": [
9
+ {"name": "input", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "json_str"}}}}
10
+ ]
11
+ }, "outputs": [{"name": "output", "type": "object"}]}},
12
+
13
+ {"id": "130011", "type": "5", "data": {"inputs": {
14
+ "inputParameters": [
15
+ {"name": "obj", "input": {"type": "object", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130010", "name": "output"}}}}
16
+ ],
17
+ "code": "async def main(args):\n o = args.params['obj']\n return {'count': len(o), 'keys': list(o.keys())}",
18
+ "language": 3
19
+ }, "outputs": [{"name": "count", "type": "integer"}, {"name": "keys", "type": "list"}]}},
20
+
21
+ {"id": "130012", "type": "58", "data": {"inputs": {
22
+ "inputParameters": [
23
+ {"name": "input", "input": {"type": "object", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130011", "name": ""}}}}
24
+ ]
25
+ }, "outputs": [{"name": "output", "type": "string"}]}},
26
+
27
+ {"id": "900001", "type": "2", "data": {"inputs": {
28
+ "terminatePlan": "returnVariables",
29
+ "inputParameters": [
30
+ {"name": "result", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130012", "name": "output"}}}}
31
+ ]
32
+ }}}
33
+ ],
34
+ "edges": [
35
+ {"sourceNodeID": "100001", "targetNodeID": "130010", "sourcePortID": ""},
36
+ {"sourceNodeID": "130010", "targetNodeID": "130011", "sourcePortID": ""},
37
+ {"sourceNodeID": "130011", "targetNodeID": "130012", "sourcePortID": ""},
38
+ {"sourceNodeID": "130012", "targetNodeID": "900001", "sourcePortID": ""}
39
+ ],
40
+ "versions": {}
41
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "json_roundtrip",
3
+ "description": "解析输入的 JSON 文本,统计字段数与键名,再序列化返回(演示:FromJSON type59 + 代码 type5 + ToJSON type58)",
4
+ "enabled": true
5
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "nodes": [
3
+ {"id": "100001", "type": "1", "data": {"outputs": [
4
+ {"name": "names", "type": "list", "schema": {"type": "string"}, "required": true}
5
+ ], "trigger_parameters": []}},
6
+
7
+ {"id": "130040", "type": "21", "data": {
8
+ "inputs": {
9
+ "loopType": "array",
10
+ "inputParameters": [
11
+ {"name": "input", "input": {"type": "list", "schema": {"type": "string"}, "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "names"}}}}
12
+ ],
13
+ "variableParameters": [
14
+ {"name": "greeting", "input": {"type": "string", "value": {"type": "literal", "content": ""}}}
15
+ ]
16
+ },
17
+ "outputs": [
18
+ {"name": "greetings", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130040", "name": "greeting"}}}}
19
+ ]
20
+ }, "blocks": [
21
+ {"id": "130041", "type": "3", "data": {"inputs": {
22
+ "inputParameters": [
23
+ {"name": "input", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130040", "name": "input"}}}}
24
+ ],
25
+ "llmParam": [
26
+ {"name": "prompt", "input": {"type": "string", "value": {"type": "literal", "content": "用简短一句话跟 {{input}} 打招呼,只输出问候语本身,不要多余的话。"}}}
27
+ ]
28
+ }, "outputs": [{"name": "output", "type": "string"}]}},
29
+
30
+ {"id": "130042", "type": "15", "data": {"inputs": {
31
+ "method": "concat",
32
+ "inputParameters": [
33
+ {"name": "greeting", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130040", "name": "greeting"}}}},
34
+ {"name": "output", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130041", "name": "output"}}}}
35
+ ],
36
+ "concatParams": [
37
+ {"name": "concatResult", "input": {"type": "string", "value": {"type": "literal", "content": "{{greeting}}\n{{output}}"}}}
38
+ ]
39
+ }, "outputs": [{"name": "output", "type": "string"}]}},
40
+
41
+ {"id": "130043", "type": "20", "data": {"inputs": {
42
+ "inputParameters": [
43
+ {"name": "greeting", "left": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130040", "name": "greeting"}}}, "right": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130042", "name": "output"}}}}
44
+ ]
45
+ }}}
46
+ ], "edges": [
47
+ {"sourceNodeID": "130040", "targetNodeID": "130041", "sourcePortID": "loop-function-inline-output"},
48
+ {"sourceNodeID": "130041", "targetNodeID": "130042", "sourcePortID": ""},
49
+ {"sourceNodeID": "130042", "targetNodeID": "130043", "sourcePortID": ""},
50
+ {"sourceNodeID": "130043", "targetNodeID": "130040", "sourcePortID": "", "targetPortID": "loop-function-inline-input"}
51
+ ]},
52
+
53
+ {"id": "900001", "type": "2", "data": {"inputs": {
54
+ "terminatePlan": "returnVariables",
55
+ "inputParameters": [
56
+ {"name": "result", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130040", "name": "greetings"}}}}
57
+ ]
58
+ }}}
59
+ ],
60
+ "edges": [
61
+ {"sourceNodeID": "100001", "targetNodeID": "130040", "sourcePortID": ""},
62
+ {"sourceNodeID": "130040", "targetNodeID": "900001", "sourcePortID": "loop-output"}
63
+ ],
64
+ "versions": {"loop": "v2"}
65
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "loop_greet",
3
+ "description": "循环遍历一组名字,逐个用 LLM 打招呼并拼接成一段问候(演示:循环 type21 array 模式 + 文本拼接 + LoopSetVariable 累加)",
4
+ "enabled": true
5
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "nodes": [
3
+ {"id": "100001", "type": "1", "data": {"outputs": [
4
+ {"name": "name", "type": "string", "required": true}
5
+ ], "trigger_parameters": []}},
6
+
7
+ {"id": "130070", "type": "9", "data": {"inputs": {
8
+ "workflowId": "greet",
9
+ "type": 0,
10
+ "inputParameters": [
11
+ {"name": "name", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "100001", "name": "name"}}}}
12
+ ]
13
+ }, "outputs": [{"name": "output", "type": "string"}]}},
14
+
15
+ {"id": "900001", "type": "2", "data": {"inputs": {
16
+ "terminatePlan": "returnVariables",
17
+ "inputParameters": [{"name": "result", "input": {"type": "string", "value": {"type": "ref", "content": {"source": "block-output", "blockID": "130070", "name": "output"}}}}]
18
+ }}}
19
+ ],
20
+ "edges": [
21
+ {"sourceNodeID": "100001", "targetNodeID": "130070", "sourcePortID": ""},
22
+ {"sourceNodeID": "130070", "targetNodeID": "900001", "sourcePortID": ""}
23
+ ],
24
+ "versions": {}
25
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "use_subworkflow",
3
+ "description": "调用 greet 子工作流打招呼(演示:子工作流 type9,workflowId 按本地工作流名匹配)",
4
+ "enabled": true
5
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 马建强 (vgp7758)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include README.md LICENSE requirements.txt
2
+ recursive-include static *.html
3
+ recursive-include .agent *
4
+ recursive-include examples *.py