diff --git a/.container/Dockerfile b/.container/Dockerfile index 0e39b35..6131968 100644 --- a/.container/Dockerfile +++ b/.container/Dockerfile @@ -16,7 +16,7 @@ WORKDIR /app # 安装系统依赖(合并为一个RUN命令减少层数) RUN apt-get update && apt-get install -y --no-install-recommends \ curl git ffmpeg libsm6 libxext6 xvfb xauth x11-utils \ - gcc python3-dev \ + build-essential python3-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/.container/docker-compose.yml b/.container/docker-compose.yml index 21048d4..e099627 100644 --- a/.container/docker-compose.yml +++ b/.container/docker-compose.yml @@ -1,8 +1,14 @@ services: owl: - build: - context: .. - dockerfile: .container/Dockerfile + # Option 1: Use pre-built image from Docker Hub + image: mugglejinx/owl:latest + + # Option 2: Build image locally + # Uncomment the following lines and comment out the 'image' line above to build locally + # build: + # context: .. + # dockerfile: .container/Dockerfile + volumes: # 挂载.env文件,方便配置API密钥 - ../owl/.env:/app/owl/.env diff --git a/README.md b/README.md index db2e5d0..954fe8d 100644 --- a/README.md +++ b/README.md @@ -64,15 +64,11 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas - [📋 Table of Contents](#-table-of-contents) - [🔥 News](#-news) - [🎬 Demo Video](#-demo-video) -- [✨️ Core Features](#-core-features) +- [✨️ Core Features](#️-core-features) - [🛠️ Installation](#️-installation) - - [**Clone the Github repository**](#clone-the-github-repository) - - [**Set up Environment**](#set-up-environment) - - [**Install Dependencies**](#install-dependencies) - - [**Setup Environment Variables**](#setup-environment-variables) - - [**Running with Docker**](#running-with-docker) - [🚀 Quick Start](#-quick-start) - [🧰 Toolkits and Capabilities](#-toolkits-and-capabilities) + - [Model Context Protocol (MCP)](#model-context-protocol-mcp) - [🌐 Web Interface](#-web-interface) - [🧪 Experiments](#-experiments) - [⏱️ Future Plans](#️-future-plans) @@ -84,7 +80,6 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas - [📚 Exploring CAMEL Dependency](#-exploring-camel-dependency) - [⭐ Star History](#-star-history) - # 🔥 News @@ -104,7 +99,20 @@ Our vision is to revolutionize how AI agents collaborate to solve real-world tas

-- **[2025.03.15]**: Restructured the web-based user interface architecture for improved system stability; optimized OWL Agent execution mechanisms for enhanced efficiency and performance; integrated Baidu search engine into SearchToolkit. +
+

+ 🎉 Latest Major Update - March 15, 2025 +

+

+ Significant Improvements: +

+ Try it now and experience the improved performance in your automation tasks! +

+
+ - **[2025.03.12]**: Added Bocha search in SearchToolkit, integrated Volcano Engine model platform, and enhanced Azure and OpenAI Compatible models with structured output and tool calling. - **[2025.03.11]**: We added MCPToolkit, FileWriteToolkit, and TerminalToolkit to enhance OWL agents with MCP tool calling, file writing capabilities, and terminal command execution. - **[2025.03.09]**: We added a web-based user interface that makes it easier to interact with the system. @@ -261,8 +269,8 @@ cd owl cp owl/.env_template owl/.env # Edit the .env file and fill in your API keys - # Option 1: Using docker-compose directly +# (By default it's using pre-built online image, you can also check the docker-compose.yml for building locally) cd .container docker-compose up -d @@ -290,21 +298,6 @@ For more detailed Docker usage instructions, including cross-platform support, o # 🚀 Quick Start -## Try MCP (Model Context Protocol) Integration - -Experience the power of MCP by running our example that demonstrates multi-agent information retrieval and processing: - -```bash -# Set up MCP servers (one-time setup) -npx -y @smithery/cli install @wonderwhy-er/desktop-commander --client claude -npx @wonderwhy-er/desktop-commander setup - -# Run the MCP example -python examples/run_mcp.py -``` - -This example showcases how OWL agents can seamlessly interact with file systems, web automation, and information retrieval through the MCP protocol. Check out `examples/run_mcp.py` for the full implementation. - ## Basic Usage After installation and setting up your environment variables, you can start using OWL right away: @@ -413,6 +406,8 @@ tools = [ SearchToolkit().search_duckduckgo, SearchToolkit().search_google, # Comment out if unavailable SearchToolkit().search_wiki, + SearchToolkit().search_bocha, + SearchToolkit().search_baidu, *ExcelToolkit().get_tools(), *DocumentProcessingToolkit(model=models["document"]).get_tools(), *FileWriteToolkit(output_dir="./").get_tools(), @@ -459,7 +454,15 @@ Selecting only necessary toolkits optimizes performance and reduces resource usa # 🌐 Web Interface -OWL includes an intuitive web-based user interface that makes it easier to interact with the system. +
+

+ 🚀 Enhanced Web Interface Now Available! +

+

+ Experience improved system stability and optimized performance with our latest update. + Start exploring the power of OWL through our user-friendly interface! +

+
## Starting the Web UI @@ -533,7 +536,8 @@ We welcome contributions from the community! Here's how you can help: 3. Submit pull requests with your improvements **Current Issues Open for Contribution:** -- [#1857](https://github.com/camel-ai/camel/issues/1857) +- [#1868](https://github.com/camel-ai/camel/issues/1868) +- [#1866](https://github.com/camel-ai/camel/issues/1866) - [#1770](https://github.com/camel-ai/camel/issues/1770) - [#1712](https://github.com/camel-ai/camel/issues/1712) - [#1537](https://github.com/camel-ai/camel/issues/1537) @@ -546,7 +550,7 @@ Join us ([*Discord*](https://discord.camel-ai.org/) or [*WeChat*](https://ghli.o Join us for further discussions! -![](./assets/community.jpg) +![](./assets/community.jpeg) # ❓ FAQ diff --git a/README_zh.md b/README_zh.md index 43349bd..c52da43 100644 --- a/README_zh.md +++ b/README_zh.md @@ -67,13 +67,9 @@ - [🎬 演示视频](#-演示视频) - [✨️ 核心功能](#-核心功能) - [🛠️ 安装](#️-安装) - - [**选项1:使用 uv(推荐)**](#选项1使用-uv推荐) - - [**选项2:使用 venv 和 pip**](#选项2使用-venv-和-pip) - - [**选项3:使用 conda**](#选项3使用-conda) - - [**设置环境变量**](#设置环境变量) - - [**使用Docker运行**](#使用docker运行) - [🚀 快速开始](#-快速开始) - [🧰 工具包与功能](#-工具包与功能) + - [模型上下文协议 (MCP)](#模型上下文协议-mcp) - [🌐 网页界面](#-网页界面) - [🧪 实验](#-实验) - [⏱️ 未来计划](#️-未来计划) @@ -85,7 +81,6 @@ - [📚 探索 CAMEL 依赖](#-探索-camel-依赖) - [⭐ Star History](#-star-history) - # 🔥 新闻
@@ -104,7 +99,20 @@

-- **[2025.03.15]**: 重构网页用户界面,提升系统稳定性;优化OWL Agent的运行机制,提高执行效率与性能;在SearchToolkit中整合百度搜索引擎 +
+

+ 🎉 最新重大更新 - 2025年3月15日 +

+

+ 重要改进: +

+ 立即体验全新升级的自动化任务处理能力! +

+
+ - **[2025.03.12]**: 在SearchToolkit中添加了Bocha搜索功能,集成了火山引擎模型平台,并更新了Azure和OpenAI Compatible模型的结构化输出和工具调用能力。 - **[2025.03.11]**: 我们添加了 MCPToolkit、FileWriteToolkit 和 TerminalToolkit,增强了 OWL Agent 的 MCP(模型上下文协议)集成、文件写入能力和终端命令执行功能。MCP 作为一个通用协议层,标准化了 AI 模型与各种数据源和工具的交互方式。 - **[2025.03.09]**: 我们添加了基于网页的用户界面,使系统交互变得更加简便。 @@ -284,21 +292,6 @@ chmod +x build_docker.sh # 🚀 快速开始 -## 尝试 MCP(模型上下文协议)集成 - -体验 MCP 的强大功能,运行我们的示例来展示多智能体信息检索和处理: - -```bash -# 设置 MCP 服务器(仅需一次性设置) -npx -y @smithery/cli install @wonderwhy-er/desktop-commander --client claude -npx @wonderwhy-er/desktop-commander setup - -# 运行 MCP 示例 -python examples/run_mcp.py -``` - -这个示例展示了 OWL 智能体如何通过 MCP 协议无缝地与文件系统、网页自动化和信息检索进行交互。查看 `examples/run_mcp.py` 了解完整实现。 - ## 基本用法 运行以下示例: @@ -403,6 +396,8 @@ tools = [ SearchToolkit().search_duckduckgo, SearchToolkit().search_google, # 如果不可用请注释 SearchToolkit().search_wiki, + SearchToolkit().search_bocha, + SearchToolkit().search_baidu, *ExcelToolkit().get_tools(), *DocumentProcessingToolkit(model=models["document"]).get_tools(), *FileWriteToolkit(output_dir="./").get_tools(), @@ -449,6 +444,16 @@ assistant_agent_kwargs = {"model": models["assistant"], "tools": tools} # 🌐 网页界面 +
+

+ 🚀 全新升级的网页界面现已发布! +

+

+ 体验更稳定的系统性能和优化后的执行效率。 + 通过我们直观的界面,开启OWL强大功能的探索之旅! +

+
+ OWL 现在包含一个基于网页的用户界面,使与系统交互变得更加容易。要启动网页界面,请运行: ```bash @@ -520,7 +525,8 @@ python examples/run_gaia_roleplaying.py 3. 提交包含您改进的拉取请求 **当前开放贡献的问题:** -- [#1857](https://github.com/camel-ai/camel/issues/1857) +- [#1868](https://github.com/camel-ai/camel/issues/1868) +- [#1866](https://github.com/camel-ai/camel/issues/1866) - [#1770](https://github.com/camel-ai/camel/issues/1770) - [#1712](https://github.com/camel-ai/camel/issues/1712) - [#1537](https://github.com/camel-ai/camel/issues/1537) @@ -531,9 +537,8 @@ python examples/run_gaia_roleplaying.py 加入我们的 ([*Discord*](https://discord.camel-ai.org/) 或 [*微信*](https://ghli.org/camel/wechat.png)) 社区,一起探索智能体扩展规律的边界。 加入我们,参与更多讨论! - -![](./assets/community.jpg) - + +![](./assets/community.jpeg) # ❓ 常见问题 diff --git a/examples/run.py b/examples/run.py index e3f8960..60a118c 100644 --- a/examples/run.py +++ b/examples/run.py @@ -29,7 +29,11 @@ from camel.societies import RolePlaying from owl.utils import run_society, DocumentProcessingToolkit -load_dotenv() +import pathlib + +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) set_log_level(level="DEBUG") diff --git a/examples/run_azure_openai.py b/examples/run_azure_openai.py index 2095aff..4c11f8f 100644 --- a/examples/run_azure_openai.py +++ b/examples/run_azure_openai.py @@ -29,9 +29,13 @@ from owl.utils import OwlRolePlaying, run_society from camel.logger import set_log_level -set_log_level(level="DEBUG") +import pathlib -load_dotenv() +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + +set_log_level(level="DEBUG") def construct_society(question: str) -> OwlRolePlaying: diff --git a/examples/run_deepseek_zh.py b/examples/run_deepseek_zh.py index 3228b6d..aa7e12c 100644 --- a/examples/run_deepseek_zh.py +++ b/examples/run_deepseek_zh.py @@ -20,7 +20,6 @@ from dotenv import load_dotenv - from camel.models import ModelFactory from camel.toolkits import ( ExcelToolkit, @@ -29,17 +28,18 @@ from camel.toolkits import ( CodeExecutionToolkit, ) from camel.types import ModelPlatformType, ModelType - +from camel.societies import RolePlaying +from camel.logger import set_log_level from owl.utils import run_society -from camel.societies import RolePlaying - -from camel.logger import set_log_level +import pathlib set_log_level(level="DEBUG") -load_dotenv() +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) def construct_society(question: str) -> RolePlaying: @@ -71,6 +71,7 @@ def construct_society(question: str) -> RolePlaying: *CodeExecutionToolkit(sandbox="subprocess", verbose=True).get_tools(), SearchToolkit().search_duckduckgo, SearchToolkit().search_wiki, + SearchToolkit().search_baidu, *ExcelToolkit().get_tools(), *FileWriteToolkit(output_dir="./").get_tools(), ] diff --git a/examples/run_gaia_roleplaying.py b/examples/run_gaia_roleplaying.py index d08c669..d399de8 100644 --- a/examples/run_gaia_roleplaying.py +++ b/examples/run_gaia_roleplaying.py @@ -35,9 +35,13 @@ from camel.configs import ChatGPTConfig from owl.utils import GAIABenchmark from camel.logger import set_log_level -set_log_level(level="DEBUG") +import pathlib -load_dotenv() +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + +set_log_level(level="DEBUG") logger = get_logger(__name__) diff --git a/examples/run_mcp.py b/examples/run_mcp.py index 2e8fbaf..4f730cf 100644 --- a/examples/run_mcp.py +++ b/examples/run_mcp.py @@ -104,8 +104,12 @@ from camel.toolkits import MCPToolkit from owl.utils.enhanced_role_playing import OwlRolePlaying, arun_society +import pathlib + +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) -load_dotenv() set_log_level(level="DEBUG") diff --git a/examples/run_mini.py b/examples/run_mini.py index 400c851..a2e4a84 100644 --- a/examples/run_mini.py +++ b/examples/run_mini.py @@ -26,7 +26,12 @@ from owl.utils import run_society from camel.societies import RolePlaying -load_dotenv() +import pathlib + +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + set_log_level(level="DEBUG") diff --git a/examples/run_ollama.py b/examples/run_ollama.py index cc525cf..e4efd37 100644 --- a/examples/run_ollama.py +++ b/examples/run_ollama.py @@ -31,9 +31,13 @@ from camel.societies import RolePlaying from camel.logger import set_log_level -set_log_level(level="DEBUG") +import pathlib -load_dotenv() +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + +set_log_level(level="DEBUG") def construct_society(question: str) -> RolePlaying: diff --git a/examples/run_openai_compatiable_model.py b/examples/run_openai_compatiable_model.py index 6c5d09a..a83248d 100644 --- a/examples/run_openai_compatiable_model.py +++ b/examples/run_openai_compatiable_model.py @@ -29,9 +29,13 @@ from owl.utils import run_society from camel.societies import RolePlaying from camel.logger import set_log_level -set_log_level(level="DEBUG") +import pathlib -load_dotenv() +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + +set_log_level(level="DEBUG") def construct_society(question: str) -> RolePlaying: diff --git a/examples/run_qwen_mini_zh.py b/examples/run_qwen_mini_zh.py index 0ba81f1..59d27cd 100644 --- a/examples/run_qwen_mini_zh.py +++ b/examples/run_qwen_mini_zh.py @@ -28,9 +28,13 @@ from camel.societies import RolePlaying from camel.logger import set_log_level -set_log_level(level="DEBUG") +import pathlib -load_dotenv() +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + +set_log_level(level="DEBUG") def construct_society(question: str) -> RolePlaying: @@ -70,7 +74,7 @@ def construct_society(question: str) -> RolePlaying: planning_agent_model=planning_model, output_language="Chinese", ).get_tools(), - SearchToolkit().search_duckduckgo, + SearchToolkit().search_baidu, *FileWriteToolkit(output_dir="./").get_tools(), ] diff --git a/examples/run_qwen_zh.py b/examples/run_qwen_zh.py index 1e22b14..2d2198e 100644 --- a/examples/run_qwen_zh.py +++ b/examples/run_qwen_zh.py @@ -34,9 +34,14 @@ from owl.utils import run_society, DocumentProcessingToolkit from camel.logger import set_log_level -set_log_level(level="DEBUG") -load_dotenv() +import pathlib + +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + +set_log_level(level="DEBUG") def construct_society(question: str) -> RolePlaying: @@ -103,6 +108,7 @@ def construct_society(question: str) -> RolePlaying: SearchToolkit().search_duckduckgo, SearchToolkit().search_google, # Comment this out if you don't have google search SearchToolkit().search_wiki, + SearchToolkit().search_baidu, *ExcelToolkit().get_tools(), *DocumentProcessingToolkit(model=models["document"]).get_tools(), *FileWriteToolkit(output_dir="./").get_tools(), diff --git a/examples/run_terminal.py b/examples/run_terminal.py index 97b92d5..00ce667 100644 --- a/examples/run_terminal.py +++ b/examples/run_terminal.py @@ -26,10 +26,13 @@ from camel.logger import set_log_level from owl.utils import run_society from camel.societies import RolePlaying -load_dotenv() +import pathlib + +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + set_log_level(level="DEBUG") -# Get current script directory -base_dir = os.path.dirname(os.path.abspath(__file__)) def construct_society(question: str) -> RolePlaying: diff --git a/examples/run_terminal_zh.py b/examples/run_terminal_zh.py index f0a290d..74c9dbf 100644 --- a/examples/run_terminal_zh.py +++ b/examples/run_terminal_zh.py @@ -26,14 +26,15 @@ from camel.logger import set_log_level from owl.utils import run_society from camel.societies import RolePlaying -load_dotenv() +import pathlib + +base_dir = pathlib.Path(__file__).parent.parent +env_path = base_dir / "owl" / ".env" +load_dotenv(dotenv_path=str(env_path)) + set_log_level(level="DEBUG") -# Get current script directory -base_dir = os.path.dirname(os.path.abspath(__file__)) - - def construct_society(question: str) -> RolePlaying: r"""Construct a society of agents based on the given question. diff --git a/owl/webapp.py b/owl/webapp.py index a3a18e7..42f2eda 100644 --- a/owl/webapp.py +++ b/owl/webapp.py @@ -1070,7 +1070,7 @@ def create_ui(): label="Question", elem_id="question_input", show_copy_button=True, - value="Open Baidu search, summarize the github stars, fork counts, etc. of camel-ai's camel framework, and write the numbers into a python file using the plot package, save it locally, and run the generated python file.", + value="Open Google search, summarize the github stars, fork counts, etc. of camel-ai's camel framework, and write the numbers into a python file using the plot package, save it locally, and run the generated python file.", ) # Enhanced module selection dropdown @@ -1212,7 +1212,7 @@ def create_ui(): # Example questions examples = [ - "Open Baidu search, summarize the github stars, fork counts, etc. of camel-ai's camel framework, and write the numbers into a python file using the plot package, save it locally, and run the generated python file.", + "Open Google search, summarize the github stars, fork counts, etc. of camel-ai's camel framework, and write the numbers into a python file using the plot package, save it locally, and run the generated python file.", "Browse Amazon and find a product that is attractive to programmers. Please provide the product name and price", "Write a hello world python file and save it locally", ]