Telegram Group & Telegram Channel
前阵子爆火的(过气网红) Manus AI 带火了 machine-use agent 的概念。然而众所周知,如果让 LLM 直接操作本地机器,会产生巨大的安全风险,所以各种沙盒技术也应运而生。正好趁着 https://github.com/trycua/cua 开源的机会,学习一下实现的原理。

首先,LLM 需要具备 vision 和 function calling 的能力。

接下来做的事情就很传统了,启动一个虚拟机,这个虚拟机内会启动一个 websocket server,这个 server 可以还可以通过 pyautogui 对虚拟机执行截图、鼠标和键盘操作。客户端通过 websocket 和 server 进行交互,获取截图并下达指令。

整个操作的循环是这样的:启动虚拟机,固定屏幕尺寸,截图,然后画上网格辅助线,交给 vision llm 识别,交代下一步需求,然后 llm 返回在 (x,y) 执行某个鼠标或键盘操作,然后通过 ws 传输进虚拟机内的 server 执行,并返回执行后的截图,继续循环。

将对虚拟机的所有操作,抽象为一系列的如 left_click(x, y) 这样的接口,然后让 LLM 根据截图和指令,以 function calling 的方式调用这些接口。这样就实现了一个 machine-use agent。

这个虚拟机其实不仅仅可以跑在本地,而是可以运行在任何网络可以连通的供应商上,只要让客户端能够通过 ws 与其通信就行了。



tg-me.com/laiskynotes/374
Create:
Last Update:

前阵子爆火的(过气网红) Manus AI 带火了 machine-use agent 的概念。然而众所周知,如果让 LLM 直接操作本地机器,会产生巨大的安全风险,所以各种沙盒技术也应运而生。正好趁着 https://github.com/trycua/cua 开源的机会,学习一下实现的原理。

首先,LLM 需要具备 vision 和 function calling 的能力。

接下来做的事情就很传统了,启动一个虚拟机,这个虚拟机内会启动一个 websocket server,这个 server 可以还可以通过 pyautogui 对虚拟机执行截图、鼠标和键盘操作。客户端通过 websocket 和 server 进行交互,获取截图并下达指令。

整个操作的循环是这样的:启动虚拟机,固定屏幕尺寸,截图,然后画上网格辅助线,交给 vision llm 识别,交代下一步需求,然后 llm 返回在 (x,y) 执行某个鼠标或键盘操作,然后通过 ws 传输进虚拟机内的 server 执行,并返回执行后的截图,继续循环。

将对虚拟机的所有操作,抽象为一系列的如 left_click(x, y) 这样的接口,然后让 LLM 根据截图和指令,以 function calling 的方式调用这些接口。这样就实现了一个 machine-use agent。

这个虚拟机其实不仅仅可以跑在本地,而是可以运行在任何网络可以连通的供应商上,只要让客户端能够通过 ws 与其通信就行了。

BY Laisky's Notes





Share with your friend now:
tg-me.com/laiskynotes/374

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Telegram announces Anonymous Admins

The cloud-based messaging platform is also adding Anonymous Group Admins feature. As per Telegram, this feature is being introduced for safer protests. As per the Telegram blog post, users can “Toggle Remain Anonymous in Admin rights to enable Batman mode. The anonymized admin will be hidden in the list of group members, and their messages in the chat will be signed with the group name, similar to channel posts.”

Why Telegram?

Telegram has no known backdoors and, even though it is come in for criticism for using proprietary encryption methods instead of open-source ones, those have yet to be compromised. While no messaging app can guarantee a 100% impermeable defense against determined attackers, Telegram is vulnerabilities are few and either theoretical or based on spoof files fooling users into actively enabling an attack.

telegram from us


Telegram Laisky's Notes
FROM USA