来个openmanus的浅入门
前阵子一个manus在目前的所谓人工智能圈子里甚至普通人视野里都很火了,宣称是什么中国的下一个deepseek时刻,首先deepseek是经过了v1,v2等一系列版本的迭代之后,并且一直是在技术上非常花功夫的,有种宝剑锋从磨砺出的感觉,而这个manus听着更像是个蹭热度的
这不没出多久有个openmanus宣称用了三小时做了个开源的复刻版,那么我们就来简单体验下,从概念上来说吧,有点类似于做了个mcp的规划和整合调用
我个人理解好像没有到改变世界的程度
首先呢我们先来安装下
可以使用conda,也可以使用uv,以conda举例,先建个环境1
2conda create -n open_manus python=3.12
conda activate open_manus
然后来clone下代码仓库1
2git clone https://github.com/mannaandpoem/OpenManus.git
cd OpenManus
接着再安装下依赖1
pip install -r requirements.txt
这里可以借助下源替换加速,临时使用可以这样子 pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple some-package
, 这里需要安装蛮久的,可能也说明了这是个依赖于很多现成库的工具
第二阶段配置
配置其实也是常规的,依赖于大模型,那么要不就是自己部署提供api,要不就是去火山引擎或者其他大模型api提供商搞个api(免费额度用完要自己付费的)1
cp config/config.example.toml config/config.toml
这一步其实跟之前使用chatbox连接火山的配置类似
因为像国外很多都还是openai的接口服务,这边就需要改用成国内可用的1
2
3
4
5
6[llm]
model = "deepseek-r1-250120" # The LLM model to use
base_url = "https://ark.cn-beijing.volces.com/api/v3" # API endpoint URL
api_key = "xxxxxxxxxxxxxxxxxx" # Your API key
max_tokens = 8192 # Maximum number of tokens in the response
temperature = 0.0
模型可以用deepseek-r1,不过要注意是什么时间版本的,否则也会访问不到
然后我们就可以运行1
python main.py
来运行openmanus,我们简单问个问题1
明天杭州的天气怎么样,给出个穿衣指南
看下结果1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56python main.py
INFO [browser_use] BrowserUse logging setup complete with level info
INFO [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information.
Enter your prompt: 帮我看下明天杭州的天气,并且生成穿衣指南
2025-04-20 20:40:14.721 | WARNING | __main__:main:16 - Processing your request...
2025-04-20 20:40:14.722 | INFO | app.agent.base:run:140 - Executing step 1/20
2025-04-20 20:40:33.488 | INFO | app.llm:update_token_count:250 - Token usage: Input=2165, Completion=658, Cumulative Input=2165, Cumulative Completion=658, Total=2823, Cumulative Total=2823
2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:81 - ✨ Manus's thoughts:
2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:82 - 🛠️ Manus selected 1 tools to use
2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:86 - 🧰 Tools being prepared: ['browser_use']
2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:89 - 🔧 Tool arguments: {
"action": "web_search",
"query": "杭州明天天气预报"
}
2025-04-20 20:40:33.490 | INFO | app.agent.toolcall:execute_tool:180 - 🔧 Activating tool: 'browser_use'...
ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
2025-04-20 20:40:34.896 | INFO | app.agent.toolcall:act:150 - 🎯 Tool 'browser_use' completed its mission! Result: Observed output of cmd `browser_use` executed:
Error: Browser action 'web_search' failed: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
2025-04-20 20:40:34.896 | INFO | app.agent.base:run:140 - Executing step 2/20
ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
WARNING [browser] Page load failed, continuing...
ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
根据这个返回可以看到它做了些啥,主要是规划步骤和选择调用的工具,相对来说没有特别的,playwright我就不去搞了,浏览器那套