merge main

This commit is contained in:
luojiyin
2025-03-15 15:32:50 +00:00
17 changed files with 148 additions and 89 deletions

View File

@@ -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/*

View File

@@ -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

View File

@@ -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
</p>
</div>
- **[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.
<div style="background-color: #e3f2fd; padding: 12px; border-radius: 8px; border-left: 4px solid #1e88e5; margin: 10px 0;">
<h4 style="color: #1e88e5; margin: 0 0 8px 0;">
🎉 Latest Major Update - March 15, 2025
</h4>
<p style="margin: 0;">
<b>Significant Improvements:</b>
<ul style="margin: 5px 0 0 0; padding-left: 20px;">
<li>Restructured web-based UI architecture for enhanced stability 🏗️</li>
<li>Optimized OWL Agent execution mechanisms for better performance 🚀</li>
</ul>
<i>Try it now and experience the improved performance in your automation tasks!</i>
</p>
</div>
- **[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.
<div align="center" style="background-color: #f0f7ff; padding: 15px; border-radius: 10px; border: 2px solid #1e88e5; margin: 20px 0;">
<h3 style="color: #1e88e5; margin: 0;">
🚀 Enhanced Web Interface Now Available!
</h3>
<p style="margin: 10px 0;">
Experience improved system stability and optimized performance with our latest update.
Start exploring the power of OWL through our user-friendly interface!
</p>
</div>
## 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.png) -->
![](./assets/community.jpg)
![](./assets/community.jpeg)
# ❓ FAQ

View File

@@ -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)
# 🔥 新闻
<div align="center" style="background-color: #fffacd; padding: 15px; border-radius: 10px; border: 2px solid #ffd700; margin: 20px 0;">
@@ -104,7 +99,20 @@
</p>
</div>
- **[2025.03.15]**: 重构网页用户界面提升系统稳定性优化OWL Agent的运行机制提高执行效率与性能在SearchToolkit中整合百度搜索引擎
<div style="background-color: #e3f2fd; padding: 12px; border-radius: 8px; border-left: 4px solid #1e88e5; margin: 10px 0;">
<h4 style="color: #1e88e5; margin: 0 0 8px 0;">
🎉 最新重大更新 - 2025年3月15日
</h4>
<p style="margin: 0;">
<b>重要改进:</b>
<ul style="margin: 5px 0 0 0; padding-left: 20px;">
<li>重构网页用户界面架构,显著提升系统稳定性 🏗️</li>
<li>优化OWL Agent执行机制大幅提升性能与效率 🚀</li>
</ul>
<i>立即体验全新升级的自动化任务处理能力!</i>
</p>
</div>
- **[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}
# 🌐 网页界面
<div align="center" style="background-color: #f0f7ff; padding: 15px; border-radius: 10px; border: 2px solid #1e88e5; margin: 20px 0;">
<h3 style="color: #1e88e5; margin: 0;">
🚀 全新升级的网页界面现已发布!
</h3>
<p style="margin: 10px 0;">
体验更稳定的系统性能和优化后的执行效率。
通过我们直观的界面开启OWL强大功能的探索之旅
</p>
</div>
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.png) -->
![](./assets/community.jpg)
<!-- ![](./assets/meetup.jpg) -->
![](./assets/community.jpeg)
# ❓ 常见问题

View File

@@ -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")

View File

@@ -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:

View File

@@ -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(),
]

View File

@@ -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__)

View File

@@ -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")

View File

@@ -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")

View File

@@ -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:

View File

@@ -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:

View File

@@ -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(),
]

View File

@@ -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(),

View File

@@ -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:

View File

@@ -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.

View File

@@ -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",
]