Skip to content

Commit ffa70ba

Browse files
docs: sync README and docs with main langchain merge
Co-authored-by: Simpleyyt <simpleyyt@gmail.com>
1 parent f9ba65e commit ffa70ba

8 files changed

Lines changed: 52 additions & 40 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This project primarily relies on Docker for development and deployment, requirin
7777
- Docker Compose
7878

7979
Model capability requirements:
80-
- Compatible with OpenAI interface
80+
- Supports LangChain chat model providers (default `openai`)
8181
- Support for FunctionCall
8282
- Support for Json Format output
8383

@@ -119,6 +119,8 @@ services:
119119
- API_KEY=sk-xxxx
120120
# LLM model name
121121
- MODEL_NAME=gpt-4o
122+
# LLM model provider
123+
- MODEL_PROVIDER=openai
122124
# LLM temperature parameter, controls randomness
123125
- TEMPERATURE=0.7
124126
# Maximum tokens for LLM response
@@ -278,6 +280,7 @@ API_BASE=http://mockserver:8090/v1
278280
279281
# Model configuration
280282
MODEL_NAME=deepseek-chat
283+
MODEL_PROVIDER=openai
281284
TEMPERATURE=0.7
282285
MAX_TOKENS=2000
283286
@@ -363,7 +366,7 @@ All services will run in reload mode, and code changes will be automatically rel
363366

364367
> *Note: In Debug mode, only one sandbox will be started globally*
365368

366-
2. When dependencies change (requirements.txt or package.json), clean up and rebuild:
369+
2. When dependencies change (`backend/pyproject.toml` or `frontend/package.json`), clean up and rebuild:
367370
```bash
368371
# Clean up all related resources
369372
./dev.sh down -v

README_zh.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ https://github.com/user-attachments/assets/5cb2240b-0984-4db0-8818-a24f81624b04
5858
- Docker Compose
5959

6060
模型能力要求:
61-
- 兼容OpenAI接口
61+
- 支持 LangChain Chat Model(默认 `openai` 提供商)
6262
- 支持FunctionCall
6363
- 支持Json Format输出
6464

@@ -101,6 +101,8 @@ services:
101101
- API_KEY=sk-xxxx
102102
# LLM model name
103103
- MODEL_NAME=gpt-4o
104+
# LLM model provider
105+
- MODEL_PROVIDER=openai
104106
# LLM temperature parameter, controls randomness
105107
- TEMPERATURE=0.7
106108
# Maximum tokens for LLM response
@@ -279,6 +281,7 @@ API_BASE=http://mockserver:8090/v1
279281
280282
# Model configuration
281283
MODEL_NAME=deepseek-chat
284+
MODEL_PROVIDER=openai
282285
TEMPERATURE=0.7
283286
MAX_TOKENS=2000
284287
@@ -364,7 +367,7 @@ LOG_LEVEL=INFO
364367

365368
> *注意:在 Debug 模式全局只会启动一个沙盒*
366369

367-
2. 当依赖变化时(requirements.txt或package.json),清理并重新构建:
370+
2. 当依赖变化时(`backend/pyproject.toml` 或 `frontend/package.json`),清理并重新构建:
368371
```bash
369372
# 清理所有相关资源
370373
./dev.sh down -v

backend/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
English | [中文](README_zh.md)
44

5-
AI Manus is an intelligent conversation agent system based on FastAPI and OpenAI API. The backend adopts Domain-Driven Design (DDD) architecture, supporting intelligent dialogue, file operations, Shell command execution, and browser automation.
5+
AI Manus is an intelligent conversation agent system based on FastAPI and LangChain chat models. The backend adopts Domain-Driven Design (DDD) architecture, supporting intelligent dialogue, file operations, Shell command execution, and browser automation.
66

77
## Project Architecture
88

@@ -25,9 +25,7 @@ backend/
2525
│ ├── infrastructure/ # Infrastructure layer: provides technical implementation
2626
│ └── main.py # Application entry
2727
├── Dockerfile # Docker configuration file
28-
├── run.sh # Production environment startup script
29-
├── dev.sh # Development environment startup script
30-
├── requirements.txt # Project dependencies
28+
├── pyproject.toml # Project dependencies and metadata
3129
└── README.md # Project documentation
3230
```
3331

@@ -45,33 +43,33 @@ backend/
4543

4644
## Requirements
4745

48-
- Python 3.9+
46+
- Python 3.12+
4947
- Docker 20.10+
5048
- MongoDB 4.4+
5149
- Redis 6.0+
5250

5351
## Installation and Configuration
5452

55-
1. **Create a virtual environment**:
53+
1. **Install uv**:
5654
```bash
57-
python -m venv .venv
58-
source .venv/bin/activate
55+
pip install uv
5956
```
6057

6158
2. **Install dependencies**:
6259
```bash
63-
pip install -r requirements.txt
60+
uv sync
6461
```
6562

6663
3. **Environment variable configuration**:
6764
Create a `.env` file and set the following environment variables:
6865
```
6966
# Model provider configuration
70-
API_KEY=your_api_key_here # API key for OpenAI or other model providers
71-
API_BASE=https://api.openai.com/v1 # Base URL for the model API, can be replaced with other model provider API addresses
67+
API_KEY=your_api_key_here # API key for model providers
68+
API_BASE=https://api.openai.com/v1 # Base URL for model API (optional for some providers)
7269
7370
# Model configuration
7471
MODEL_NAME=gpt-4o # Model name to use
72+
MODEL_PROVIDER=openai # Model provider for LangChain
7573
TEMPERATURE=0.7 # Model temperature parameter
7674
MAX_TOKENS=2000 # Maximum output tokens per model request
7775
@@ -86,9 +84,11 @@ SANDBOX_TTL_MINUTES=30 # Sandbox container time-to-live (minut
8684
SANDBOX_NETWORK=manus-network # Docker network name for communication between sandbox containers
8785
8886
# Database configuration
89-
MONGODB_URL=mongodb://localhost:27017 # MongoDB connection URL
87+
MONGODB_URI=mongodb://localhost:27017 # MongoDB connection URL
9088
MONGODB_DATABASE=manus # MongoDB database name
91-
REDIS_URL=redis://localhost:6379/0 # Redis connection URL
89+
REDIS_HOST=localhost # Redis host
90+
REDIS_PORT=6379 # Redis port
91+
REDIS_DB=0 # Redis DB index
9292
9393
# Log configuration
9494
LOG_LEVEL=INFO # Log level, options: DEBUG, INFO, WARNING, ERROR, CRITICAL
@@ -99,7 +99,7 @@ LOG_LEVEL=INFO # Log level, options: DEBUG, INFO, WARN
9999
### Development Environment
100100
```bash
101101
# Start the development server (with hot reload)
102-
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
102+
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
103103
```
104104

105105
The service will start at http://localhost:8000.

backend/README_zh.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English](README.md) | 中文
44

5-
AI Manus 是一个基于 FastAPI 和 OpenAI API 的智能对话代理系统。该后端采用领域驱动设计(DDD)架构,支持智能对话、文件操作、Shell命令执行以及浏览器自动化等功能。
5+
AI Manus 是一个基于 FastAPI 和 LangChain Chat Model 的智能对话代理系统。该后端采用领域驱动设计(DDD)架构,支持智能对话、文件操作、Shell命令执行以及浏览器自动化等功能。
66

77
## 项目架构
88

@@ -25,9 +25,7 @@ backend/
2525
│ ├── infrastructure/ # 基础设施层:提供技术实现
2626
│ └── main.py # 应用入口
2727
├── Dockerfile # Docker配置文件
28-
├── run.sh # 生产环境启动脚本
29-
├── dev.sh # 开发环境启动脚本
30-
├── requirements.txt # 项目依赖
28+
├── pyproject.toml # 项目依赖与元数据
3129
└── README.md # 项目文档
3230
```
3331

@@ -45,33 +43,33 @@ backend/
4543

4644
## 环境要求
4745

48-
- Python 3.9+
46+
- Python 3.12+
4947
- Docker 20.10+
5048
- MongoDB 4.4+
5149
- Redis 6.0+
5250

5351
## 安装配置
5452

55-
1. **创建虚拟环境**:
53+
1. **安装 uv**:
5654
```bash
57-
python -m venv .venv
58-
source .venv/bin/activate
55+
pip install uv
5956
```
6057

6158
2. **安装依赖**:
6259
```bash
63-
pip install -r requirements.txt
60+
uv sync
6461
```
6562

6663
3. **环境变量配置**:
6764
创建 `.env` 文件并设置以下环境变量:
6865
```
6966
# Model provider configuration
70-
API_KEY=your_api_key_here # OpenAI 或其他模型供应商的 API 密钥
71-
API_BASE=https://api.openai.com/v1 # 模型 API 的基础 URL,可替换为其他模型供应商的 API 地址
67+
API_KEY=your_api_key_here # 模型供应商 API 密钥
68+
API_BASE=https://api.openai.com/v1 # 模型 API 基础 URL(部分供应商可选)
7269
7370
# Model configuration
7471
MODEL_NAME=gpt-4o # 使用的模型名称
72+
MODEL_PROVIDER=openai # LangChain 模型供应商
7573
TEMPERATURE=0.7 # 模型温度参数
7674
MAX_TOKENS=2000 # 模型单次请求最大输出 token 数量
7775
@@ -86,9 +84,11 @@ SANDBOX_TTL_MINUTES=30 # 沙盒容器生存时间(分钟)
8684
SANDBOX_NETWORK=manus-network # Docker 网络名称,用于沙盒容器间通信
8785
8886
# Database configuration
89-
MONGODB_URL=mongodb://localhost:27017 # MongoDB 连接 URL
87+
MONGODB_URI=mongodb://localhost:27017 # MongoDB 连接 URL
9088
MONGODB_DATABASE=manus # MongoDB 数据库名称
91-
REDIS_URL=redis://localhost:6379/0 # Redis 连接 URL
89+
REDIS_HOST=localhost # Redis 主机地址
90+
REDIS_PORT=6379 # Redis 端口
91+
REDIS_DB=0 # Redis 数据库编号
9292
9393
# Log configuration
9494
LOG_LEVEL=INFO # 日志级别,可选: DEBUG, INFO, WARNING, ERROR, CRITICAL
@@ -99,7 +99,7 @@ LOG_LEVEL=INFO # 日志级别,可选: DEBUG, INFO, W
9999
### 开发环境
100100
```bash
101101
# 启动开发服务器(带热重载功能)
102-
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
102+
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
103103
```
104104

105105
服务将在 http://localhost:8000 启动。

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
| 配置项 | 默认值 | 是否必需 | 说明 |
88
|--------|--------|----------|------|
99
| `API_KEY` | - || LLM 模型的 API 密钥 |
10-
| `API_BASE` | `http://mockserver:8090/v1` | | API 基础地址,用于指定模型服务的端点 |
10+
| `API_BASE` | `http://mockserver:8090/v1` | | API 基础地址,用于指定模型服务的端点 |
1111

1212
### 模型配置
1313

1414
| 配置项 | 默认值 | 是否必需 | 说明 |
1515
|--------|--------|----------|------|
16+
| `MODEL_PROVIDER` | `openai` || 模型提供商(如 `openai``anthropic``google_genai``ollama`|
1617
| `MODEL_NAME` | `deepseek-chat` || 要使用的模型名称 |
1718
| `TEMPERATURE` | `0.7` || 模型响应的随机性程度,范围 0-1 |
1819
| `MAX_TOKENS` | `2000` || 模型响应的最大 token 数量 |
@@ -57,7 +58,7 @@
5758

5859
| 配置项 | 默认值 | 是否必需 | 说明 |
5960
|--------|--------|----------|------|
60-
| `SEARCH_PROVIDER` | `baidu` || 搜索引擎提供商 (`baidu``google``bing`) |
61+
| `SEARCH_PROVIDER` | `bing` || 搜索引擎提供商 (`baidu``google``bing`) |
6162

6263
#### Google 搜索配置
6364

docs/en/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
| Configuration | Default Value | Required | Description |
88
|---------------|---------------|----------|-------------|
99
| `API_KEY` | - | Yes | API key for the LLM model |
10-
| `API_BASE` | `http://mockserver:8090/v1` | Yes | Base API address for specifying model service endpoint |
10+
| `API_BASE` | `http://mockserver:8090/v1` | No | Base API address for specifying model service endpoint |
1111

1212
### Model Configuration
1313

1414
| Configuration | Default Value | Required | Description |
1515
|---------------|---------------|----------|-------------|
16+
| `MODEL_PROVIDER` | `openai` | No | Model provider (e.g. `openai`, `anthropic`, `google_genai`, `ollama`) |
1617
| `MODEL_NAME` | `deepseek-chat` | Yes | Name of the model to use |
1718
| `TEMPERATURE` | `0.7` | No | Randomness level of model responses, range 0-1 |
1819
| `MAX_TOKENS` | `2000` | No | Maximum number of tokens in model response |
@@ -57,7 +58,7 @@
5758

5859
| Configuration | Default Value | Required | Description |
5960
|---------------|---------------|----------|-------------|
60-
| `SEARCH_PROVIDER` | `baidu` | No | Search engine provider (`baidu`, `google`, or `bing`) |
61+
| `SEARCH_PROVIDER` | `bing` | No | Search engine provider (`baidu`, `google`, or `bing`) |
6162

6263
#### Google Search Configuration
6364

docs/en/quick_start.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This project mainly relies on Docker for development and deployment, requiring a
99

1010
Model capabilities required:
1111

12-
* Compatible with OpenAI API
12+
* Supports LangChain chat models (default provider is `openai`)
1313
* Supports Function Call
1414
* Supports JSON Format output
1515

@@ -27,7 +27,7 @@ Install Docker Engine according to official requirements: https://docs.docker.co
2727

2828
## Deployment
2929

30-
Deploy using Docker Compose, you need to modify the `API_BASE` and `API_KEY` environment variables:
30+
Deploy using Docker Compose: at minimum set `API_KEY`, and adjust `API_BASE` and `MODEL_PROVIDER` for your model service:
3131

3232
<!-- docker-compose-example.yml -->
3333
```yaml
@@ -61,6 +61,8 @@ services:
6161
- API_KEY=sk-xxxx
6262
# LLM model name
6363
- MODEL_NAME=gpt-4o
64+
# LLM model provider
65+
- MODEL_PROVIDER=openai
6466
# LLM temperature parameter, controls randomness
6567
- TEMPERATURE=0.7
6668
# Maximum tokens for LLM response

docs/quick_start.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
模型能力要求:
1111

12-
* 兼容 OpenAI 接口
12+
* 支持 LangChain Chat Model(默认 `openai` 提供商)
1313
* 支持 FunctionCall
1414
* 支持 Json Format 输出
1515

@@ -28,7 +28,7 @@
2828

2929
## 部署
3030

31-
使用Docker Compose进行部署,需要修改`API_BASE``API_KEY`环境变量
31+
使用 Docker Compose 进行部署,至少需要修改 `API_KEY`,并根据模型服务调整 `API_BASE``MODEL_PROVIDER`
3232

3333
<!-- docker-compose-example.yml -->
3434
```yaml
@@ -62,6 +62,8 @@ services:
6262
- API_KEY=sk-xxxx
6363
# LLM model name
6464
- MODEL_NAME=gpt-4o
65+
# LLM model provider
66+
- MODEL_PROVIDER=openai
6567
# LLM temperature parameter, controls randomness
6668
- TEMPERATURE=0.7
6769
# Maximum tokens for LLM response

0 commit comments

Comments
 (0)