myagent-ai 1.23.5 → 1.23.6

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.
@@ -64,11 +64,13 @@ class MainAgent(BaseAgent):
64
64
 
65
65
  注意事项:
66
66
  1. toolstocal标签: 尽量一次性列出所有需执行工具调用的,多个"tool"工具调用只要按顺序重复堆叠tool标签即可,解析器会按顺序执行工具调用,最终全部执行完后,会连同所有结果,回调大语言模型。如果某个工具执行超时了,也会回调大模型,让大模型分析为什么超时,改用其他工具。如非必要,不要一次仅调用一个工具。
67
- 2. 上下文中的记忆系统说明
67
+ 2. ⚠️ **强烈建议**: 生成文件后需要发送给用户时,务必用 && 将两个命令合并为一次调用。例如: myagent-ai docx-create -c '{...}' -t 标题 && myagent-ai send-file /path/to/file.docx 报告。这样可以减少一次LLM回调,加快响应速度。同理,创建PPT/Excel/PDF后发送也应用 && 拼接。
68
+ 3. 上下文中的记忆系统说明
68
69
  - <automemory>: 系统自动根据你通过 <remember> 保存的记忆和当前用户输入,搜索出的 top10 相关记忆。这些是你过去主动记住的内容(包含时间信息),可供参考。
69
70
  - <recall_memory>: 你在上一轮通过 <recall> 指定的记忆搜索结果。系统根据你提供的关键字和时间点搜索了 top5 相关记忆。
70
71
  - 两种记忆互补:automemory 是自动匹配的,recall_memory 是你主动指定搜索的。如果 automemory 不足,使用 <recall> 请求更多。
71
- 3. 工具使用指南 — 只有两个工具: command 和 web_control
72
+ 4. 工具使用指南 — 只有两个工具: command 和 web_control
73
+ 5. 文件下载链接: 当文件通过 send-file 发送成功后,系统会返回下载链接,格式为 /api/file/文件ID。向用户展示下载链接时,应在前面加上服务器地址前缀,完整格式为: 服务器地址/api/file/文件ID。如果上下文中没有服务器地址,则直接展示相对路径 /api/file/文件ID 即可。
72
74
 
73
75
  **command**(执行命令行,所有操作都通过它完成):
74
76
  <tool><toolname>command</toolname><parms>{"command": "要执行的命令"}</parms><timeout>超时秒数</timeout></tool>
@@ -144,12 +146,13 @@ class MainAgent(BaseAgent):
144
146
 
145
147
  调用示例:
146
148
  <tool><toolname>command</toolname><parms>{"command": "myagent-ai search 人工智能最新进展"}</parms><timeout>15</timeout></tool>
147
- <tool><toolname>command</toolname><parms>{"command": "myagent-ai send-file /tmp/report.pdf 季度报告"}</parms><timeout>10</timeout></tool>
148
- <tool><toolname>command</toolname><parms>{"command": "myagent-ai docx-create -c '{\"title\": \"报告\", \"sections\": [{\"heading\": \"摘要\", \"body\": \"内容\"}]}' -t 周报"}</parms><timeout>30</timeout></tool>
149
+ <tool><toolname>command</toolname><parms>{"command": "myagent-ai docx-create -c '{\"title\": \"报告\", \"sections\": [{\"heading\": \"摘要\", \"body\": \"内容\"}]}' -t 周报 && myagent-ai send-file /root/.myagent/data/workspace/userfiles/周报.docx 季度报告"}</parms><timeout>30</timeout></tool>
150
+ <tool><toolname>command</toolname><parms>{"command": "myagent-ai ppt-create -s '{JSON幻灯片}' && myagent-ai send-file /root/.myagent/data/workspace/userfiles/演示.pptx PPT文件"}</parms><timeout>30</timeout></tool>
149
151
  <tool><toolname>command</toolname><parms>{"command": "myagent-ai playaudio --url https://music.163.com/song?id=123 --title 歌曲名"}</parms><timeout>10</timeout></tool>
150
152
  <tool><toolname>command</toolname><parms>{"command": "myagent-ai playvideo --url https://www.bilibili.com/video/BV123 --title 视频名"}</parms><timeout>10</timeout></tool>
151
153
 
152
- 多个命令可用 && 连接一次执行:
154
+ 多个命令可用 && 连接一次执行(强烈推荐,减少LLM回调次数):
155
+ <tool><toolname>command</toolname><parms>{"command": "myagent-ai docx-create -c '{JSON}' -t 标题 && myagent-ai send-file /path/to/文件.docx 描述"}</parms><timeout>30</timeout></tool>
153
156
  <tool><toolname>command</toolname><parms>{"command": "myagent-ai search xxx && myagent-ai read-url https://..."}</parms><timeout>30</timeout></tool>
154
157
 
155
158
  **web_control**(网页控制器,在聊天中打开可操作的浏览器面板):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.23.5",
3
+ "version": "1.23.6",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {