myagent-ai 1.23.0 → 1.23.1
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.
- package/agents/main_agent.py +17 -2
- package/package.json +1 -1
package/agents/main_agent.py
CHANGED
|
@@ -68,8 +68,9 @@ class MainAgent(BaseAgent):
|
|
|
68
68
|
- <automemory>: 系统自动根据你通过 <remember> 保存的记忆和当前用户输入,搜索出的 top10 相关记忆。这些是你过去主动记住的内容(包含时间信息),可供参考。
|
|
69
69
|
- <recall_memory>: 你在上一轮通过 <recall> 指定的记忆搜索结果。系统根据你提供的关键字和时间点搜索了 top5 相关记忆。
|
|
70
70
|
- 两种记忆互补:automemory 是自动匹配的,recall_memory 是你主动指定搜索的。如果 automemory 不足,使用 <recall> 请求更多。
|
|
71
|
-
3. 工具使用指南 —
|
|
72
|
-
|
|
71
|
+
3. 工具使用指南 — 只有两个工具: command 和 web_control
|
|
72
|
+
|
|
73
|
+
**command**(执行命令行,所有操作都通过它完成):
|
|
73
74
|
<tool><toolname>command</toolname><parms>{"command": "要执行的命令"}</parms><timeout>超时秒数</timeout></tool>
|
|
74
75
|
|
|
75
76
|
常用 CLI 命令 (通过 command 工具调用):
|
|
@@ -93,6 +94,20 @@ class MainAgent(BaseAgent):
|
|
|
93
94
|
多个命令可用 && 连接一次执行:
|
|
94
95
|
<tool><toolname>command</toolname><parms>{"command": "myagent-ai search xxx && myagent-ai read-url https://..."}</parms><timeout>30</timeout></tool>
|
|
95
96
|
|
|
97
|
+
**web_control**(网页控制器,在聊天中打开可操作的浏览器面板):
|
|
98
|
+
<tool><toolname>web_control</toolname><parms>{"action": "open", "url": "https://example.com"}</parms><timeout>30</timeout></tool>
|
|
99
|
+
- 打开: {"action": "open", "url": "URL"}
|
|
100
|
+
- 导航: {"action": "navigate", "url": "URL", "session_id": "xxx"}
|
|
101
|
+
- 获取内容: {"action": "get_content", "what": "text|html|url|title|links|images|forms|inputs", "session_id": "xxx"}
|
|
102
|
+
- 点击: {"action": "click", "selector": "CSS选择器", "session_id": "xxx"}
|
|
103
|
+
- 填写: {"action": "fill", "selector": "CSS选择器", "value": "内容", "session_id": "xxx"}
|
|
104
|
+
- 滚动: {"action": "scroll", "direction": "up|down|top|bottom", "distance": 300, "session_id": "xxx"}
|
|
105
|
+
- 执行JS: {"action": "evaluate", "script": "JS代码", "session_id": "xxx"}
|
|
106
|
+
- 截图: {"action": "screenshot", "session_id": "xxx"}
|
|
107
|
+
- 等待: {"action": "wait", "time": 1000} 或 {"action": "wait", "selector": ".result", "timeout": 10}
|
|
108
|
+
- Cookie: {"action": "set_cookies", "cookies": [...], "session_id": "xxx"} 或 {"action": "get_cookies", "session_id": "xxx"}
|
|
109
|
+
- 关闭: {"action": "close", "session_id": "xxx"}
|
|
110
|
+
|
|
96
111
|
专业技能指令: 系统内置了丰富的专业技能指南(PDF/DOCX/XLSX/PPT 生成、图表绘制、前端开发等),通过 <get_knowledge> 请求相关技能指令。
|
|
97
112
|
4. 准备好内容后,最后,再检查输出格式,确保满足以下要求:
|
|
98
113
|
<output>
|