@gt-fe/eap-cli 0.2.23 → 0.2.25

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 (58) hide show
  1. package/README.md +303 -304
  2. package/dist/commands/doctor.js +2 -2
  3. package/dist/commands/doctor.js.map +1 -1
  4. package/dist/commands/login.js +2 -2
  5. package/dist/commands/login.js.map +1 -1
  6. package/dist/commands/use.d.ts +6 -0
  7. package/dist/commands/use.d.ts.map +1 -0
  8. package/dist/commands/use.js +18 -0
  9. package/dist/commands/use.js.map +1 -0
  10. package/dist/index.js +3 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/lib/config.d.ts +5 -1
  13. package/dist/lib/config.d.ts.map +1 -1
  14. package/dist/lib/config.js +64 -17
  15. package/dist/lib/config.js.map +1 -1
  16. package/dist/playground/server.js +1 -1
  17. package/dist/playground/server.js.map +1 -1
  18. package/dist/program.d.ts.map +1 -1
  19. package/dist/program.js +2 -1
  20. package/dist/program.js.map +1 -1
  21. package/dist/templates/README.md +51 -51
  22. package/dist/templates/agent-api-orchestration/README.md +320 -326
  23. package/dist/templates/agent-api-orchestration/eap.config.json +1 -5
  24. package/dist/templates/agent-api-orchestration/graph.json +35 -35
  25. package/dist/templates/agent-api-orchestration/package.json +1 -1
  26. package/dist/templates/agent-api-orchestration/src/embedded-agent.ts +4 -9
  27. package/dist/templates/agent-api-orchestration/src/platform-user.ts +12 -7
  28. package/dist/templates/agent-api-orchestration/src/project-config.ts +5 -8
  29. package/dist/templates/dag-workflow/README.md +102 -102
  30. package/dist/templates/dag-workflow/agent.manifest.json +19 -19
  31. package/dist/templates/dag-workflow/eap.config.json +1 -5
  32. package/dist/templates/dag-workflow/gitignore +51 -51
  33. package/dist/templates/dag-workflow/graph.json +51 -51
  34. package/dist/templates/dag-workflow/skills/README.md +116 -116
  35. package/dist/templates/plan-and-execute/README.md +109 -109
  36. package/dist/templates/plan-and-execute/agent.manifest.json +19 -19
  37. package/dist/templates/plan-and-execute/eap.config.json +1 -5
  38. package/dist/templates/plan-and-execute/eap.lock.yaml +5 -5
  39. package/dist/templates/plan-and-execute/gitignore +51 -51
  40. package/dist/templates/plan-and-execute/graph.json +49 -49
  41. package/dist/templates/plan-and-execute/skills/README.md +120 -120
  42. package/dist/templates/simple-flow/README.md +87 -87
  43. package/dist/templates/simple-flow/agent.manifest.json +19 -19
  44. package/dist/templates/simple-flow/eap.config.json +1 -5
  45. package/dist/templates/simple-flow/gitignore +51 -51
  46. package/dist/templates/simple-flow/graph.json +32 -32
  47. package/dist/templates/simple-flow/package.json +10 -10
  48. package/dist/templates/simple-flow/skills/README.md +113 -113
  49. package/dist/templates/single-agent-with-tools/README.md +138 -138
  50. package/dist/templates/single-agent-with-tools/agent.manifest.json +19 -19
  51. package/dist/templates/single-agent-with-tools/eap.config.json +1 -5
  52. package/dist/templates/single-agent-with-tools/eap.lock.yaml +5 -5
  53. package/dist/templates/single-agent-with-tools/gitignore +51 -51
  54. package/dist/templates/single-agent-with-tools/graph.json +41 -41
  55. package/dist/templates/single-agent-with-tools/skills/README.md +119 -119
  56. package/dist/templates/single-agent-with-tools/tools/http-weather/toolset.manifest.json +73 -73
  57. package/dist/templates/single-agent-with-tools/tools/web-search/toolset.manifest.json +41 -41
  58. package/package.json +2 -2
@@ -1,138 +1,138 @@
1
- # 单智能体与工具
2
-
3
- 单 LLM 经 ReAct 循环调用已装配工具。`shouldContinue` 返回 `call_tools` 时进入 `tools` 节点,执行后回到 `agent`。
4
-
5
- 工具由 `toolRefs` 加载,经模型 API 的 `tools` 参数下发。平台默认另有 `read_file` / `write_file` / `execute_command`(不写进清单)。整图超时:图上未写 `config.timeout` 时为 20 分钟。
6
-
7
- 预期:Agent 决定进入某个已装配 Skill,按该 Skill 的 workflow 执行后再回到推理。`shouldContinue` 的 `call_tools` 只能进入 `type: tool`,不能进入 subgraph。当前默认图:已装配 Skill 的名称与 SKILL.md 路径注入模型。详见 `skills/README.md`。
8
-
9
- ## 图结构
10
-
11
- ```text
12
- ╭───────────╮ ┌─────────────┐
13
- │ __start__ ├───▶│ agent / llm │
14
- ╰───────────╯ └──────┬──────┘
15
- ┌──────┴──────┐
16
- call_tools │ │ finish
17
- ▼ ▼
18
- ┌─────────┐ ╭─────────╮
19
- │ tools │ │ __end__ │
20
- └────┬────┘ ╰─────────╯
21
- │
22
- └──▶ agent
23
- ```
24
-
25
- ```mermaid
26
- flowchart LR
27
- start((__start__)) --> agent[agent / llm]
28
- agent -->|shouldContinue call_tools| tools[tools]
29
- tools --> agent
30
- agent -->|shouldContinue finish| finish((__end__))
31
- ```
32
-
33
- `tools/` 中含三类登记示例。只有写入 `toolRefs` 并出现在 `eap.lock.yaml` 的工具集会被加载。默认装配 `echo-tool` 与 `http-weather`。`web-search` 默认未装配,上线前删除未使用的示例。
34
-
35
- | 目录 | `type` | 默认 | 子工具 | 本地密钥 |
36
- |------|--------|------|--------|----------|
37
- | `echo-tool` | code / node | 已装配 | `echo-tool` | 无 |
38
- | `http-weather` | http | 已装配 | `geocode_place`、`get_forecast` | 无。要求 Runtime ≥ 0.0.7 |
39
- | `web-search` | mcp / streamable_http | 未装配 | `web_search_exa` | `EXA_API_KEY` |
40
-
41
- **适用**:模型按用户意图选择工具。
42
-
43
- **不适用**:固定一步回复且不调用工具。此类场景使用「固定流程」模板。
44
-
45
- ## 1. 配置
46
-
47
- 本地 `eap chat` 不要求 `eap login`。`runtime.llm` 会设置 `EAP_LLM_MODE=local`,用 `eap.config.json` 里的网关和 Token,不走 Foundation 模型路由。`platform.foundationServiceUrl` 默认是测试环境地址,给登录/发布用;纯本地可改为 `null`。
48
-
49
- 把 `runtime.llm.models.*.apiKey` 的 `sk-example-token` 换成与 `baseUrl` 一致的有效 Token,不要提交真实密钥。启用 `web-search` 时再在 `.env.local` 填写 `EXA_API_KEY`。
50
-
51
- | 变量 | 是否必填 | 说明 |
52
- |------|----------|------|
53
- | `EXA_API_KEY` | 仅启用 `web-search` 时 | 将对应项写入 `toolRefs` 后再填写。未设置时 URL 展开为 `exaApiKey=` |
54
-
55
- `.env.local` 已列入 `.gitignore`,不得提交。
56
-
57
- | 项 | 要求 |
58
- |----|------|
59
- | `runtime.llm.models.*.apiKey` | 模板占位 `sk-example-token`,运行前替换 |
60
- | `baseUrl` | 默认 `https://gtaiapi.gtcloud.cn/v1`。须与 Key 所属网关一致 |
61
- | `runtime.tools.mode` | 默认 `mcp`:code / http / mcp 分别走本机 handler、DevHttpExecutor、MCP 直连 |
62
- | 生效 | 修改配置或 `.env.local` 后重新启动 `eap chat` |
63
-
64
- ## 2. 占位符与密钥
65
-
66
- | 占位符 | 位置 | 本地 | 生产 |
67
- |--------|------|------|------|
68
- | `${EXA_API_KEY}` | `tools/web-search` 的 URL | `.env.local`。空值时 Exa 当前仍可能返回结果,不得视为约定 | Portal 登记后由 Tool Gateway 出站注入 |
69
-
70
- 华为云 UCS「配置项与密钥」:
71
-
72
- - **配置项**(ConfigMap):`FOUNDATION_SERVICE_URL`、`PORT` 等非敏感值。
73
- - **密钥**(Secret):仅当该 Pod 必须持有敏感值,且须在工作负载中挂载。
74
- - 禁止将 API Key 写入配置项,亦不要为展开 `${}` 向 Agent Deployment 注入工具 Token。
75
-
76
- `eap.lock.yaml` 只记录资源版本、来源和路径;package/standalone 物化时才生成入口文件摘要。
77
-
78
- ## 3. 运行
79
-
80
- ```bash
81
- eap validate --strict
82
- eap chat
83
- ```
84
-
85
- `eap chat` 须在交互式终端中运行。启动摘要应为 `Runtime openai-http · mcp · dev`。
86
-
87
- 默认已装配 `echo-tool` 与本地 `http-weather`。验收:`用 echo-tool 回显 ping`;`查上海今天天气`(`geocode_place` 之后 `get_forecast`)。`web-search` 仍须按第 5 节写入 `toolRefs` 并配置 `EXA_API_KEY`。未写入 `toolRefs` 的工具模型看不到,也不会对其发起出站请求。`eap init` 合并时保留这些本地引用。
88
-
89
- 查一次对话每步 LLM 入参/响应:`eap conversation <sessionId>`。
90
-
91
- 可选:`eap chat --verbose`;`eap dev` 启动 Playground。
92
-
93
- ## 4. 项目结构
94
-
95
- ```text
96
- .
97
- |-- agent.manifest.json
98
- |-- graph.json
99
- |-- eap.config.json
100
- |-- eap.lock.yaml
101
- |-- package.json
102
- |-- .gitignore
103
- |-- skills/README.md
104
- `-- tools/
105
- |-- echo-tool/ # 默认已装配
106
- |-- http-weather/ # 默认已装配(Open-Meteo,无需 Key)
107
- `-- web-search/ # 示例,默认未装配
108
- ```
109
-
110
- `.eap/` 由运行时物化,不是源码。发布与部署以 Portal / Hosting 合同为准。
111
-
112
- ## 5. 启用示例工具或增加本地工具
113
-
114
- `http-weather` 已在默认 `toolRefs`。启用 `web-search`(会出站到 Exa):
115
-
116
- 1. 在 `agent.manifest.json` 的 `toolRefs` 中增加 `{ "code": "web-search", "version": "1.0.0" }`。
117
- 2. 在 `.env.local` 填写 `EXA_API_KEY`。
118
- 3. 执行 `eap install` 刷新 `eap.lock.yaml`。
119
- 4. 重新启动 `eap chat`。
120
-
121
- 试跑:已配置 `EXA_API_KEY` 后:`搜索公开网页上与某公开人物相关的资料`。
122
-
123
- 增加自有工具:在 `tools/<code>/` 放置清单及 handler,按同样步骤写入 `toolRefs` 并 `eap install`。
124
-
125
- 上线前从 `toolRefs`、`eap.lock.yaml` 和 `tools/` 删除不需要的示例目录,勿将示例工具打进发布包。
126
-
127
- ## 6. 故障排除
128
-
129
- | 现象 | 处理 |
130
- |------|------|
131
- | `LLM API error 401` | Key 无效,或与 `baseUrl` 所属网关不一致 |
132
- | 提示先执行 `eap login` | 升级 CLI。本地 `eap chat` 不要求登录 |
133
- | 启动失败或模型鉴权失败 | 将 `eap.config.json` 中的 `sk-example-token` 替换为有效 Token |
134
- | 工具返回固定 JSON / 未执行 handler | 清单缺 MCP / HTTP / code handler,会 `NOT_CONFIGURED` |
135
- | `http-weather` 失败或 `NOT_CONFIGURED` | Runtime ≥ 0.0.7,且清单包含 `allowedHosts` |
136
- | 未配置 `EXA_API_KEY` 仍有检索结果 | 检查 `.env.local` 是否已有值;空 Key 成功不得视为约定 |
137
- | 工具 `NOT_CONFIGURED` | 核对 `toolRefs` 与 lock;修改清单后执行 `eap install` |
138
- | 请求进入 Foundation 模型路由 | `platform.foundationServiceUrl` 设为 `null`,并取消 `FOUNDATION_SERVICE_URL` |
1
+ # 单智能体与工具
2
+
3
+ 单 LLM 经 ReAct 循环调用已装配工具。`shouldContinue` 返回 `call_tools` 时进入 `tools` 节点,执行后回到 `agent`。
4
+
5
+ 工具由 `toolRefs` 加载,经模型 API 的 `tools` 参数下发。平台默认另有 `read_file` / `write_file` / `execute_command`(不写进清单)。整图超时:图上未写 `config.timeout` 时为 20 分钟。
6
+
7
+ 预期:Agent 决定进入某个已装配 Skill,按该 Skill 的 workflow 执行后再回到推理。`shouldContinue` 的 `call_tools` 只能进入 `type: tool`,不能进入 subgraph。当前默认图:已装配 Skill 的名称与 SKILL.md 路径注入模型。详见 `skills/README.md`。
8
+
9
+ ## 图结构
10
+
11
+ ```text
12
+ ╭───────────╮ ┌─────────────┐
13
+ │ __start__ ├───▶│ agent / llm │
14
+ ╰───────────╯ └──────┬──────┘
15
+ ┌──────┴──────┐
16
+ call_tools │ │ finish
17
+ ▼ ▼
18
+ ┌─────────┐ ╭─────────╮
19
+ │ tools │ │ __end__ │
20
+ └────┬────┘ ╰─────────╯
21
+ │
22
+ └──▶ agent
23
+ ```
24
+
25
+ ```mermaid
26
+ flowchart LR
27
+ start((__start__)) --> agent[agent / llm]
28
+ agent -->|shouldContinue call_tools| tools[tools]
29
+ tools --> agent
30
+ agent -->|shouldContinue finish| finish((__end__))
31
+ ```
32
+
33
+ `tools/` 中含三类登记示例。只有写入 `toolRefs` 并出现在 `eap.lock.yaml` 的工具集会被加载。默认装配 `echo-tool` 与 `http-weather`。`web-search` 默认未装配,上线前删除未使用的示例。
34
+
35
+ | 目录 | `type` | 默认 | 子工具 | 本地密钥 |
36
+ |------|--------|------|--------|----------|
37
+ | `echo-tool` | code / node | 已装配 | `echo-tool` | 无 |
38
+ | `http-weather` | http | 已装配 | `geocode_place`、`get_forecast` | 无。要求 Runtime ≥ 0.0.7 |
39
+ | `web-search` | mcp / streamable_http | 未装配 | `web_search_exa` | `EXA_API_KEY` |
40
+
41
+ **适用**:模型按用户意图选择工具。
42
+
43
+ **不适用**:固定一步回复且不调用工具。此类场景使用「固定流程」模板。
44
+
45
+ ## 1. 配置
46
+
47
+ 本地 `eap chat` 不要求 `eap login`。`runtime.llm` 会设置 `EAP_LLM_MODE=local`,用 `eap.config.json` 里的网关和 Token,不走 Foundation 模型路由。CLI 登录和发布使用全局 `eap use test|prod` 选择的平台地址。
48
+
49
+ 把 `runtime.llm.models.*.apiKey` 的 `sk-example-token` 换成与 `baseUrl` 一致的有效 Token,不要提交真实密钥。启用 `web-search` 时再在 `.env.local` 填写 `EXA_API_KEY`。
50
+
51
+ | 变量 | 是否必填 | 说明 |
52
+ |------|----------|------|
53
+ | `EXA_API_KEY` | 仅启用 `web-search` 时 | 将对应项写入 `toolRefs` 后再填写。未设置时 URL 展开为 `exaApiKey=` |
54
+
55
+ `.env.local` 已列入 `.gitignore`,不得提交。
56
+
57
+ | 项 | 要求 |
58
+ |----|------|
59
+ | `runtime.llm.models.*.apiKey` | 模板占位 `sk-example-token`,运行前替换 |
60
+ | `baseUrl` | 默认 `https://gtaiapi.gtcloud.cn/v1`。须与 Key 所属网关一致 |
61
+ | `runtime.tools.mode` | 默认 `mcp`:code / http / mcp 分别走本机 handler、DevHttpExecutor、MCP 直连 |
62
+ | 生效 | 修改配置或 `.env.local` 后重新启动 `eap chat` |
63
+
64
+ ## 2. 占位符与密钥
65
+
66
+ | 占位符 | 位置 | 本地 | 生产 |
67
+ |--------|------|------|------|
68
+ | `${EXA_API_KEY}` | `tools/web-search` 的 URL | `.env.local`。空值时 Exa 当前仍可能返回结果,不得视为约定 | Portal 登记后由 Tool Gateway 出站注入 |
69
+
70
+ 华为云 UCS「配置项与密钥」:
71
+
72
+ - **配置项**(ConfigMap):`FOUNDATION_SERVICE_URL`、`PORT` 等非敏感值。
73
+ - **密钥**(Secret):仅当该 Pod 必须持有敏感值,且须在工作负载中挂载。
74
+ - 禁止将 API Key 写入配置项,亦不要为展开 `${}` 向 Agent Deployment 注入工具 Token。
75
+
76
+ `eap.lock.yaml` 只记录资源版本、来源和路径;package/standalone 物化时才生成入口文件摘要。
77
+
78
+ ## 3. 运行
79
+
80
+ ```bash
81
+ eap validate --strict
82
+ eap chat
83
+ ```
84
+
85
+ `eap chat` 须在交互式终端中运行。启动摘要应为 `Runtime openai-http · mcp · dev`。
86
+
87
+ 默认已装配 `echo-tool` 与本地 `http-weather`。验收:`用 echo-tool 回显 ping`;`查上海今天天气`(`geocode_place` 之后 `get_forecast`)。`web-search` 仍须按第 5 节写入 `toolRefs` 并配置 `EXA_API_KEY`。未写入 `toolRefs` 的工具模型看不到,也不会对其发起出站请求。`eap init` 合并时保留这些本地引用。
88
+
89
+ 查一次对话每步 LLM 入参/响应:`eap conversation <sessionId>`。
90
+
91
+ 可选:`eap chat --verbose`;`eap dev` 启动 Playground。
92
+
93
+ ## 4. 项目结构
94
+
95
+ ```text
96
+ .
97
+ |-- agent.manifest.json
98
+ |-- graph.json
99
+ |-- eap.config.json
100
+ |-- eap.lock.yaml
101
+ |-- package.json
102
+ |-- .gitignore
103
+ |-- skills/README.md
104
+ `-- tools/
105
+ |-- echo-tool/ # 默认已装配
106
+ |-- http-weather/ # 默认已装配(Open-Meteo,无需 Key)
107
+ `-- web-search/ # 示例,默认未装配
108
+ ```
109
+
110
+ `.eap/` 由运行时物化,不是源码。发布与部署以 Portal / Hosting 合同为准。
111
+
112
+ ## 5. 启用示例工具或增加本地工具
113
+
114
+ `http-weather` 已在默认 `toolRefs`。启用 `web-search`(会出站到 Exa):
115
+
116
+ 1. 在 `agent.manifest.json` 的 `toolRefs` 中增加 `{ "code": "web-search", "version": "1.0.0" }`。
117
+ 2. 在 `.env.local` 填写 `EXA_API_KEY`。
118
+ 3. 执行 `eap install` 刷新 `eap.lock.yaml`。
119
+ 4. 重新启动 `eap chat`。
120
+
121
+ 试跑:已配置 `EXA_API_KEY` 后:`搜索公开网页上与某公开人物相关的资料`。
122
+
123
+ 增加自有工具:在 `tools/<code>/` 放置清单及 handler,按同样步骤写入 `toolRefs` 并 `eap install`。
124
+
125
+ 上线前从 `toolRefs`、`eap.lock.yaml` 和 `tools/` 删除不需要的示例目录,勿将示例工具打进发布包。
126
+
127
+ ## 6. 故障排除
128
+
129
+ | 现象 | 处理 |
130
+ |------|------|
131
+ | `LLM API error 401` | Key 无效,或与 `baseUrl` 所属网关不一致 |
132
+ | 提示先执行 `eap login` | 升级 CLI。本地 `eap chat` 不要求登录 |
133
+ | 启动失败或模型鉴权失败 | 将 `eap.config.json` 中的 `sk-example-token` 替换为有效 Token |
134
+ | 工具返回固定 JSON / 未执行 handler | 清单缺 MCP / HTTP / code handler,会 `NOT_CONFIGURED` |
135
+ | `http-weather` 失败或 `NOT_CONFIGURED` | Runtime ≥ 0.0.7,且清单包含 `allowedHosts` |
136
+ | 未配置 `EXA_API_KEY` 仍有检索结果 | 检查 `.env.local` 是否已有值;空 Key 成功不得视为约定 |
137
+ | 工具 `NOT_CONFIGURED` | 核对 `toolRefs` 与 lock;修改清单后执行 `eap install` |
138
+ | 请求进入 Foundation 模型路由 | 配置 `FOUNDATION_SERVICE_URL` |
@@ -1,19 +1,19 @@
1
- {
2
- "code": "my-agent",
3
- "name": "my-agent",
4
- "version": "1.0.0",
5
- "description": "单智能体 ReAct 循环,按需调用本地工具",
6
- "toolRefs": [],
7
- "skillRefs": [],
8
- "prompts": {
9
- "system": "你是助手。用中文回答。需要时调用已提供的工具,不要调用未提供的工具。"
10
- },
11
- "models": {
12
- "default": "DeepSeek-V4-Pro",
13
- "allowed": ["DeepSeek-V4-Pro", "DeepSeek-V4-Flash"]
14
- },
15
- "metadata": {
16
- "owner": "agent-template",
17
- "tags": ["template"]
18
- }
19
- }
1
+ {
2
+ "code": "my-agent",
3
+ "name": "my-agent",
4
+ "version": "1.0.0",
5
+ "description": "单智能体 ReAct 循环,按需调用本地工具",
6
+ "toolRefs": [],
7
+ "skillRefs": [],
8
+ "prompts": {
9
+ "system": "你是助手。用中文回答。需要时调用已提供的工具,不要调用未提供的工具。"
10
+ },
11
+ "models": {
12
+ "default": "DeepSeek-V4-Pro",
13
+ "allowed": ["DeepSeek-V4-Pro", "DeepSeek-V4-Flash"]
14
+ },
15
+ "metadata": {
16
+ "owner": "agent-template",
17
+ "tags": ["template"]
18
+ }
19
+ }
@@ -1,15 +1,11 @@
1
1
  {
2
- "version": "0.2.23",
2
+ "version": "0.2.25",
3
3
  "localToolDirectories": [
4
4
  "./tools"
5
5
  ],
6
6
  "localSkillDirectories": [
7
7
  "./skills"
8
8
  ],
9
- "platform": {
10
- "foundationServiceUrl": "https://eap-foundation-test.gtcloud.cn",
11
- "portalUrl": "https://developer-portal-test.gtcloud.cn"
12
- },
13
9
  "runtime": {
14
10
  "deploymentContext": "dev",
15
11
  "governance": {
@@ -1,5 +1,5 @@
1
- lockfileVersion: 2
2
- resources:
3
- tools: []
4
- skills: []
5
- subagents: []
1
+ lockfileVersion: 2
2
+ resources:
3
+ tools: []
4
+ skills: []
5
+ subagents: []
@@ -1,51 +1,51 @@
1
- # OS files
2
- .DS_Store
3
- Thumbs.db
4
- Desktop.ini
5
-
6
- # Editor and IDE files
7
- .idea/
8
- .vscode/
9
- *.swp
10
- *.swo
11
-
12
- # Dependencies
13
- node_modules/
14
- .pnpm-store/
15
-
16
- # Lock files
17
- package-lock.json
18
-
19
- # Build outputs
20
- dist/
21
- build/
22
- out/
23
- .output/
24
- .history
25
-
26
- # Logs
27
- *.log
28
- npm-debug.log*
29
- yarn-debug.log*
30
- yarn-error.log*
31
- pnpm-debug.log*
32
-
33
- # Test coverage
34
- coverage/
35
-
36
- # Turbo
37
- .turbo/
38
-
39
- # Environment
40
- .env
41
- .env.local
42
- .env.*.local
43
-
44
- # Temporary files
45
- tmp/
46
- temp/
47
- .cache/
48
- .run/
49
-
50
- # Generated Agent state
51
- .eap/
1
+ # OS files
2
+ .DS_Store
3
+ Thumbs.db
4
+ Desktop.ini
5
+
6
+ # Editor and IDE files
7
+ .idea/
8
+ .vscode/
9
+ *.swp
10
+ *.swo
11
+
12
+ # Dependencies
13
+ node_modules/
14
+ .pnpm-store/
15
+
16
+ # Lock files
17
+ package-lock.json
18
+
19
+ # Build outputs
20
+ dist/
21
+ build/
22
+ out/
23
+ .output/
24
+ .history
25
+
26
+ # Logs
27
+ *.log
28
+ npm-debug.log*
29
+ yarn-debug.log*
30
+ yarn-error.log*
31
+ pnpm-debug.log*
32
+
33
+ # Test coverage
34
+ coverage/
35
+
36
+ # Turbo
37
+ .turbo/
38
+
39
+ # Environment
40
+ .env
41
+ .env.local
42
+ .env.*.local
43
+
44
+ # Temporary files
45
+ tmp/
46
+ temp/
47
+ .cache/
48
+ .run/
49
+
50
+ # Generated Agent state
51
+ .eap/
@@ -1,41 +1,41 @@
1
- {
2
- "description": "单智能体 ReAct:按需调用已装配工具。",
3
- "state": {
4
- "userRequest": "string",
5
- "response": "string"
6
- },
7
- "nodes": [
8
- {
9
- "id": "agent",
10
- "type": "llm"
11
- },
12
- {
13
- "id": "tools",
14
- "type": "tool",
15
- "config": {
16
- "tool": "echo-tool"
17
- }
18
- }
19
- ],
20
- "edges": [
21
- { "from": "__start__", "to": "agent" },
22
- { "from": "tools", "to": "agent" }
23
- ],
24
- "conditionalEdges": [
25
- {
26
- "from": "agent",
27
- "conditionFn": "shouldContinue",
28
- "branches": [
29
- { "value": "call_tools", "to": "tools" },
30
- { "value": "finish", "to": "__end__" }
31
- ],
32
- "fallback": "__end__"
33
- }
34
- ],
35
- "entryPoint": "agent",
36
- "finishPoints": ["__end__"],
37
- "config": {
38
- "maxRetries": 3,
39
- "checkpointStore": "memory"
40
- }
41
- }
1
+ {
2
+ "description": "单智能体 ReAct:按需调用已装配工具。",
3
+ "state": {
4
+ "userRequest": "string",
5
+ "response": "string"
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "agent",
10
+ "type": "llm"
11
+ },
12
+ {
13
+ "id": "tools",
14
+ "type": "tool",
15
+ "config": {
16
+ "tool": "echo-tool"
17
+ }
18
+ }
19
+ ],
20
+ "edges": [
21
+ { "from": "__start__", "to": "agent" },
22
+ { "from": "tools", "to": "agent" }
23
+ ],
24
+ "conditionalEdges": [
25
+ {
26
+ "from": "agent",
27
+ "conditionFn": "shouldContinue",
28
+ "branches": [
29
+ { "value": "call_tools", "to": "tools" },
30
+ { "value": "finish", "to": "__end__" }
31
+ ],
32
+ "fallback": "__end__"
33
+ }
34
+ ],
35
+ "entryPoint": "agent",
36
+ "finishPoints": ["__end__"],
37
+ "config": {
38
+ "maxRetries": 3,
39
+ "checkpointStore": "memory"
40
+ }
41
+ }