PostgreSQL码农集散地

这世界变化快! Manus 仅3小时就被复刻并开源(OpenManus)

这世界变化快! Manus 仅3小时就被复刻并开源(OpenManus)

还在等Manus通过邀请码申请? 先别等了, MetaGPT团队3小时复刻Manus并开源(OpenManus)

  • https://github.com/mannaandpoem/OpenManus/blob/main/README_zh.md

只要你有OpenAI api即可使用OpenManus, 没有也行, 本地用ollama部署模型也可以测试OpenManus. 下面就来简单试一下.

部署OpenManus + ollama

我的测试机 Mac mini M2 16G内存.

准备环境:

1、python 3.12

2、Miniconda

conda --version  
conda 25.1.1  

conda init  

3、启动 ollama

OLLAMA_HOST=0.0.0.0:11434 OLLAMA_KEEP_ALIVE=-1 nohup ollama serve >> ~/.ollama/logs/server.log 2>&1 &   

下载支持tool_call的大模型, 例如qwen2.5:1.5b

  • https://ollama.com/library/qwen2.5:1.5b/blobs/eb4402837c78
$ ollama list  
NAME                          ID              SIZE      MODIFIED      
qwen2.5-1.5b-digoal:latest    f26bba345505    3.1 GB    2 weeks ago      
qwen2.5:0.5b                  a8b0c5157701    397 MB    2 weeks ago      
qwen2.5:1.5b                  65ec06548149    986 MB    2 weeks ago   

4、创建新的 conda 环境:

conda create -n open_manus python=3.12  
conda activate open_manus  

5、克隆仓库:

cd ~  
mkdir openmanus  
cd openmanus  
git clone --depth 1 https://github.com/mannaandpoem/OpenManus.git  
cd OpenManus  

6、安装依赖:

pip install -r requirements.txt  

7、OpenManus 需要配置使用的 LLM API,请按以下步骤设置:

在 config 目录创建 config.toml 文件(可从示例复制):

cp config/config.example.toml config/config.toml  

8、编辑 config/config.toml 添加 API 密钥和自定义设置:

# 全局 LLM 配置  
[llm]  
model = "qwen2.5:1.5b"  
base_url = "http://127.0.0.1:11434/v1"  
api_key = "ollama"      # 替换为真实 API 密钥, 这里使用本地ollama. 必填项,但在Ollama中会被忽略  
max_tokens = 4096  
temperature = 0.01  

# 可选特定 LLM 模型配置  
#[llm.vision]  
#model = "gpt-4o"  
#base_url = "https://api.openai.com/v1"  
#api_key = "sk-..."  # 替换为真实 API 密钥  

9、快速启动

一行命令运行 OpenManus:

python main.py  

然后通过终端输入你的创意!

如需体验开发中版本,可运行:

python run_flow.py  

简单的使用例子

明天是38妇女节, 给我老婆送个礼物.

用到了搜索引擎google, 可惜我这不能访问google, 不知道OpenManus下一步会干什么?

$ less app/tool/  
__init__.py                bash.py                    file_saver.py              python_execute.py          terminate.py                 
__pycache__/               browser_use_tool.py        google_search.py           run.py                     tool_collection.py           
base.py                    create_chat_completion.py  planning.py                str_replace_editor.py   

app/tool/google_search.py:from googlesearch import search  
app/tool/google_search.py:    name: str = "google_search"

下面是一些日志:

$ python 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 (or 'exit' to quit): 明天是38妇女节, 给我老婆送个礼物  
2025-03-07 19:41:21.811 | WARNING  | __main__:main:15 - Processing your request...  
2025-03-07 19:41:21.812 | INFO     | app.agent.base:run:137 - Executing step 1/30  
2025-03-07 19:41:27.141 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: 为了给你的老婆送礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
<tool_call>  

2025-03-07 19:41:27.142 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:41:27.142 | INFO     | app.agent.base:run:137 - Executing step 2/30  
2025-03-07 19:41:30.644 | INFO     | app.agent.toolcall:think:53 - ✨ Manus'

s thoughts: 为了给你的老婆送一份特别的礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
<tool_call>  

2025-03-07 19:41:30.644 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:41:30.644 | INFO     | app.agent.base:run:137 - Executing step 3/30  
2025-03-07 19:41:34.319 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: 为了给你的老婆送一份特别的礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
<tool_call>  

2025-03-07 19:41:34.319 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:41:34.319 | INFO     | app.agent.base:run:137 - Executing step 4/30  
2025-03-07 19:41:41.229 | INFO     | app.agent.toolcall:think:53 - ✨ Manus'

s thoughts: 为了给你的老婆送一份特别的礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
```python  
import requests  

# 使用Google搜索获取创意的礼物建议  
url = "https://www.google.com/search?q=creative+gifts"
response = requests.get(url)  

# 提取搜索结果中的前10个网址  
search_results = response.text.split('\n')  
first_10_urls = search_results[:10]  

# 打印出前10个网址  
for url in first_10_urls:  
print(url)  
```  
2025-03-07 19:41:41.229 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:41:41.230 | INFO     | app.agent.base:run:137 - Executing step 5/30  
2025-03-07 19:41:49.557 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: 为了给你的老婆送一份特别的礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
```python  
import requests  

# 使用Google搜索获取创意的礼物建议  
url = "https://www.google.com/search?q=creative+gifts"  
response = requests.get(url)  

# 提取搜索结果中的前10个网址  
search_results = response.text.split('

\n')  
first_10_urls = search_results[:10]  

# 打印出前10个网址  
for url in first_10_urls:  
    print(url)  
```  
2025-03-07 19:41:49.558 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:41:49.558 | INFO     | app.agent.base:run:137 - Executing step 6/30  
2025-03-07 19:41:57.764 | INFO     | app.agent.toolcall:think:53 - ✨ Manus'
s thoughts: 为了给你的老婆送一份特别的礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
```python  
import requests  

# 使用Google搜索获取创意的礼物建议  
url = "https://www.google.com/search?q=creative+gifts"
response = requests.get(url)  

# 提取搜索结果中的前10个网址  
search_results = response.text.split('\n')  
first_10_urls = search_results[:10]  

# 打印出前10个网址  
for url in first_10_urls:  
print(url)  
```  
2025-03-07 19:41:57.765 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:41:57.765 | WARNING  | app.agent.base:handle_stuck_state:163 - Agent detected stuck state. Added prompt:         Observed duplicate responses. Consider new strategies and avoid repeating ineffective paths already attempted.  
2025-03-07 19:41:57.765 | INFO     | app.agent.base:run:137 - Executing step 7/30  
2025-03-07 19:42:06.003 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: 为了给你的老婆送一份特别的礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
```python  
import requests  

# 使用Google搜索获取创意的礼物建议  
url = "https://www.google.com/search?q=creative+gifts"  
response = requests.get(url)  

# 提取搜索结果中的前10个网址  
search_results = response.text.split('

\n')  
first_10_urls = search_results[:10]  

# 打印出前10个网址  
for url in first_10_urls:  
    print(url)  
```  
2025-03-07 19:42:06.003 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:42:06.004 | WARNING  | app.agent.base:handle_stuck_state:163 - Agent detected stuck state. Added prompt:         Observed duplicate responses. Consider new strategies and avoid repeating ineffective paths already attempted.  
2025-03-07 19:42:06.004 | INFO     | app.agent.base:run:137 - Executing step 8/30  
2025-03-07 19:42:14.341 | INFO     | app.agent.toolcall:think:53 - ✨ Manus'
s thoughts: 为了给你的老婆送一份特别的礼物,我们可以考虑一些创意和实用的物品。以下是一些建议:  

1. **手工制作的礼物**:你可以自己动手做一些小礼物,比如手工艺品、编织品或者装饰品。  
2. **个性化定制**:可以定制一件衣服、一条围巾或者是个性化的钥匙扣等。  
3. **体验式礼物**:例如去一个你和她都喜欢的地方,给她一次特别的经历,比如去看一场电影、参加一个音乐会或者一起旅行。  

如果你想要通过Python来实现这个任务,我们可以使用Google搜索来找到一些创意的礼物建议。首先,我们需要进行一次Google搜索以获取灵感。然后,我们将使用Python代码来执行搜索并提取结果。  

让我们开始吧!  
```python  
import requests  

# 使用Google搜索获取创意的礼物建议  
url = "https://www.google.com/search?q=creative+gifts"
response = requests.get(url)  

# 提取搜索结果中的前10个网址  
search_results = response.text.split('\n')  
first_10_urls = search_results[:10]  

# 打印出前10个网址  
for url in first_10_urls:  
print(url)  
```  
2025-03-07 19:42:14.342 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:42:14.342 | WARNING  | app.agent.base:handle_stuck_state:163 - Agent detected stuck state. Added prompt:         Observed duplicate responses. Consider new strategies and avoid repeating ineffective paths already attempted.  
2025-03-07 19:42:14.342 | INFO     | app.agent.base:run:137 - Executing step 9/30  

...  

这段代码将执行Google搜索并提取前10个与“创意礼物”相关的网址。你可以根据这些结果进一步探索和获取灵感,或者直接使用其中的建议来制作你的礼物。  

如果你需要进一步的帮助或有其他问题,请随时告诉我!  
2025-03-07 19:44:09.503 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:44:09.503 | WARNING  | app.agent.base:handle_stuck_state:163 - Agent detected stuck state. Added prompt:         Observed duplicate responses. Consider new strategies and avoid repeating ineffective paths already attempted.  
2025-03-07 19:44:09.504 | INFO     | app.agent.base:run:137 - Executing step 25/30  
2025-03-07 19:44:16.388 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: 好的,让我们开始吧!首先,我们需要使用Google搜索来获取创意的礼物建议。然后,我们将使用Python代码来执行搜索并提取结果。  

```python  
import requests  

# 使用Google搜索获取创意的礼物建议  
url = "https://www.google.com/search?q=creative+gifts"  
response = requests.get(url)  

# 提取搜索结果中的前10个网址  
search_results = response.text.split('
\n')  
first_10_urls = search_results[:10]  

# 打印出前10个网址  
for url in first_10_urls:  
    print(url)  
```  

这段代码将执行Google搜索并提取前10个与“创意礼物”相关的网址。你可以根据这些结果进一步探索和获取灵感,或者直接使用其中的建议来制作你的礼物。  

如果你需要进一步的帮助或有其他问题,请随时告诉我!  
2025-03-07 19:44:16.388 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:44:16.388 | WARNING  | app.agent.base:handle_stuck_state:163 - Agent detected stuck state. Added prompt:         Observed duplicate responses. Consider new strategies and avoid repeating ineffective paths already attempted.  
2025-03-07 19:44:16.389 | INFO     | app.agent.base:run:137 - Executing step 26/30  
2025-03-07 19:44:19.285 | INFO     | app.agent.toolcall:think:53 - ✨ Manus'

s thoughts: 您已经提供了足够的信息来开始处理您的请求。请告诉我您需要的具体任务或问题,以便我为您提供适当的帮助和指导。  
2025-03-07 19:44:19.285 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:44:19.286 | INFO     | app.agent.base:run:137 - Executing step 27/30  
2025-03-07 19:44:21.221 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: 请告诉我您需要的具体任务或问题,以便我为您提供适当的帮助和指导。  
2025-03-07 19:44:21.222 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:44:21.222 | INFO     | app.agent.base:run:137 - Executing step 28/30  
2025-03-07 19:44:23.236 | INFO     | app.agent.toolcall:think:53 - ✨ Manus'
s thoughts: 请告诉我您需要的具体任务或问题,以便我为您提供适当的帮助和指导。  
2025-03-07 19:44:23.236 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:44:23.237 | INFO     | app.agent.base:run:137 - Executing step 29/30  
2025-03-07 19:44:25.236 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: 请告诉我您需要的具体任务或问题,以便我为您提供适当的帮助和指导。  
2025-03-07 19:44:25.236 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:44:25.237 | WARNING  | app.agent.base:handle_stuck_state:163 - Agent detected stuck state. Added prompt:         Observed duplicate responses. Consider new strategies and avoid repeating ineffective paths already attempted.  
2025-03-07 19:44:25.237 | INFO     | app.agent.base:run:137 - Executing step 30/30  
2025-03-07 19:44:26.044 | INFO     | app.agent.toolcall:think:53 - ✨ Manus'
s thoughts: 请告诉我您需要的具体任务或问题,以便我为您提供适当的帮助和指导。  
2025-03-07 19:44:26.045 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 0 tools to use  
2025-03-07 19:44:26.045 | WARNING  | app.agent.base:handle_stuck_state:163 - Agent detected stuck state. Added prompt:         Observed duplicate responses. Consider new strategies and avoid repeating ineffective paths already attempted.