curl --request POST \
--url 'https://zeus-api.agentspro.cn/node/desktop/tool?user_id=user_123' \
--header 'Content-Type: application/json' \
--data '{
"tool_name": "run_command",
"tool_args": { "command": "ls -la" }
}'
{
"success": true,
"result": {
"stdout": "total 48\ndrwxr-xr-x 12 user staff 384 Jun 15 10:00 .\n..."
}
}
{
"detail": "Desktop application not connected"
}
Node API
调用桌面工具
调用桌面应用工具(通过 WebSocket → JSON-RPC)
POST
/
node
/
desktop
/
tool
curl --request POST \
--url 'https://zeus-api.agentspro.cn/node/desktop/tool?user_id=user_123' \
--header 'Content-Type: application/json' \
--data '{
"tool_name": "run_command",
"tool_args": { "command": "ls -la" }
}'
{
"success": true,
"result": {
"stdout": "total 48\ndrwxr-xr-x 12 user staff 384 Jun 15 10:00 .\n..."
}
}
{
"detail": "Desktop application not connected"
}
通过 WebSocket 向桌面应用发送 JSON-RPC 工具调用请求,等待执行结果返回。超时时间 60 秒。
string
必填
用户 ID
string
必填
工具名称
object
默认值:"{}"
工具参数
string
会话 ID(可选,用于路由到绑定的节点)
curl --request POST \
--url 'https://zeus-api.agentspro.cn/node/desktop/tool?user_id=user_123' \
--header 'Content-Type: application/json' \
--data '{
"tool_name": "run_command",
"tool_args": { "command": "ls -la" }
}'
{
"success": true,
"result": {
"stdout": "total 48\ndrwxr-xr-x 12 user staff 384 Jun 15 10:00 .\n..."
}
}
{
"detail": "Desktop application not connected"
}
⌘I