@kmlckj/licos-ai-cli 0.0.51 → 0.0.54

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.
@@ -1,110 +1,110 @@
1
- # <%= appName %>
2
-
3
- LICOS 智能体项目模板,基于 Python、LangGraph、LangChain 和 `licos-agent-runtime`。
4
-
5
- ## 目录
6
-
7
- ```text
8
- .
9
- ├── .licos
10
- ├── config/
11
- │ └── agent_llm_config.json
12
- ├── AGENTS.md
13
- ├── pyproject.toml
14
- ├── scripts/
15
- └── src/
16
- ├── main.py
17
- ├── agents/
18
- │ └── agent.py
19
- └── tools/
20
- ```
21
-
22
- ## 本地运行
23
-
24
- ```bash
25
- bash scripts/setup.sh
26
- bash scripts/http_run.sh -p <%= port %>
27
- ```
28
-
29
- ## HTTP 接口
30
-
31
- - `GET /health`
32
- - `POST /run`
33
- - `POST /stream_run`
34
- - `GET /agent/config`
35
- - `POST /v1/chat/completions`
36
-
37
- `POST /run` 的 Body 是智能体状态输入,常用:
38
-
39
- ```json
40
- {
41
- "input": "请分析这个需求"
42
- }
43
- ```
44
-
45
- 也可以传 OpenAI-style `messages`:
46
-
47
- ```json
48
- {
49
- "messages": [
50
- {
51
- "role": "user",
52
- "content": "请分析这个需求"
53
- }
54
- ]
55
- }
56
- ```
57
-
58
- Body 可以同时带 `attachments`、`files`、`references` 等业务字段;运行时会作为图状态传入,具体解释由智能体项目代码决定。
59
-
60
- `POST /stream_run` 支持 `input` / `messages`,也兼容平台 `content.query.prompt` 包装;文本和附件会归一成智能体图输入,`references` 等业务字段会保留并传给智能体图。`content.query.prompt` 内的 `upload_file` 会从已上传文件 URL 下载到项目附件目录,默认是 `/workspace/projects/assets`,并写入 `attachments` 和 `files`。
61
-
62
- ```json
63
- {
64
- "content": {
65
- "query": {
66
- "prompt": [
67
- {
68
- "type": "text",
69
- "content": {
70
- "text": "请结合附件分析需求"
71
- }
72
- },
73
- {
74
- "type": "upload_file",
75
- "content": {
76
- "upload_file": {
77
- "file_name": "spec.md",
78
- "url": "https://files.example.com/spec.md?sign=xxx",
79
- "mime_type": "text/markdown"
80
- }
81
- }
82
- }
83
- ]
84
- }
85
- },
86
- "references": [
87
- {
88
- "type": "file",
89
- "path": "docs/spec.md"
90
- }
91
- ]
92
- }
93
- ```
94
-
95
- ## 智能体配置
96
-
97
- `config/agent_llm_config.json` 是平台预览读取智能体配置和工具列表的来源:
98
-
99
- - `config`:模型、温度、超时、thinking 等运行参数
100
- - `sp`:系统提示词
101
- - `up`:用户提示补充
102
- - `tools`:已配置工具名称列表,新增或删除工具时需要同步维护
103
-
104
- ## 项目上下文
105
-
106
- 项目内的 `AGENTS.md` 用于记录可由用户维护的项目上下文,例如业务目标、已实现工具和测试样例。新增工具时通常需要同步:
107
-
108
- - `src/tools/*_tool.py`:工具实现
109
- - `src/agents/agent.py`:导入并注册工具
110
- - `config/agent_llm_config.json`:更新 `tools`,必要时更新 `sp` / `up`
1
+ # <%= appName %>
2
+
3
+ LICOS 智能体项目模板,基于 Python、LangGraph、LangChain 和 `licos-agent-runtime`。
4
+
5
+ ## 目录
6
+
7
+ ```text
8
+ .
9
+ ├── .licos
10
+ ├── config/
11
+ │ └── agent_llm_config.json
12
+ ├── AGENTS.md
13
+ ├── pyproject.toml
14
+ ├── scripts/
15
+ └── src/
16
+ ├── main.py
17
+ ├── agents/
18
+ │ └── agent.py
19
+ └── tools/
20
+ ```
21
+
22
+ ## 本地运行
23
+
24
+ ```bash
25
+ bash scripts/setup.sh
26
+ bash scripts/http_run.sh -p <%= port %>
27
+ ```
28
+
29
+ ## HTTP 接口
30
+
31
+ - `GET /health`
32
+ - `POST /run`
33
+ - `POST /stream_run`
34
+ - `GET /agent/config`
35
+ - `POST /v1/chat/completions`
36
+
37
+ `POST /run` 的 Body 是智能体状态输入,常用:
38
+
39
+ ```json
40
+ {
41
+ "input": "请分析这个需求"
42
+ }
43
+ ```
44
+
45
+ 也可以传 OpenAI-style `messages`:
46
+
47
+ ```json
48
+ {
49
+ "messages": [
50
+ {
51
+ "role": "user",
52
+ "content": "请分析这个需求"
53
+ }
54
+ ]
55
+ }
56
+ ```
57
+
58
+ Body 可以同时带 `attachments`、`files`、`references` 等业务字段;运行时会作为图状态传入,具体解释由智能体项目代码决定。
59
+
60
+ `POST /stream_run` 支持 `input` / `messages`,也兼容平台 `content.query.prompt` 包装;文本和附件会归一成智能体图输入,`references` 等业务字段会保留并传给智能体图。`content.query.prompt` 内的 `upload_file` 会从已上传文件 URL 下载到项目附件目录,默认是 `/workspace/projects/assets`,并写入 `attachments` 和 `files`。
61
+
62
+ ```json
63
+ {
64
+ "content": {
65
+ "query": {
66
+ "prompt": [
67
+ {
68
+ "type": "text",
69
+ "content": {
70
+ "text": "请结合附件分析需求"
71
+ }
72
+ },
73
+ {
74
+ "type": "upload_file",
75
+ "content": {
76
+ "upload_file": {
77
+ "file_name": "spec.md",
78
+ "url": "https://files.example.com/spec.md?sign=xxx",
79
+ "mime_type": "text/markdown"
80
+ }
81
+ }
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "references": [
87
+ {
88
+ "type": "file",
89
+ "path": "docs/spec.md"
90
+ }
91
+ ]
92
+ }
93
+ ```
94
+
95
+ ## 智能体配置
96
+
97
+ `config/agent_llm_config.json` 是平台预览读取智能体配置和工具列表的来源:
98
+
99
+ - `config`:模型、温度、超时、thinking 等运行参数;`model: "auto"` 表示使用平台默认模型
100
+ - `sp`:系统提示词
101
+ - `up`:用户提示补充
102
+ - `tools`:已配置工具名称列表,新增或删除工具时需要同步维护
103
+
104
+ ## 项目上下文
105
+
106
+ 项目内的 `AGENTS.md` 用于记录可由用户维护的项目上下文,例如业务目标、已实现工具和测试样例。新增工具时通常需要同步:
107
+
108
+ - `src/tools/*_tool.py`:工具实现
109
+ - `src/agents/agent.py`:导入并注册工具
110
+ - `config/agent_llm_config.json`:更新 `tools`,必要时更新 `sp` / `up`
@@ -3,10 +3,10 @@ name = "<%= appName %>"
3
3
  version = "0.1.0"
4
4
  description = "LICOS LangGraph agent project"
5
5
  requires-python = ">=3.12"
6
- dependencies = [
7
- "licos-agent-runtime>=0.2.14",
8
- "licos-dev-sdk>=0.2.0",
9
- ]
6
+ dependencies = [
7
+ "licos-agent-runtime>=0.2.15",
8
+ "licos-dev-sdk>=0.2.2",
9
+ ]
10
10
 
11
11
  [tool.uv]
12
12
  [[tool.uv.index]]
@@ -1 +1 @@
1
- licos-agent-runtime>=0.2.14
1
+ licos-agent-runtime>=0.2.15