Skip to content

Commit 8be38f5

Browse files
committed
docs: rewrite README in Chinese-first style and add compose runtime
1 parent 9e2a5f6 commit 8be38f5

3 files changed

Lines changed: 76 additions & 65 deletions

File tree

‎Makefile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: sync lint format test check run run-cli docker-build
1+
.PHONY: sync lint format test check run run-cli docker-build docker-run
22

33
sync:
44
uv sync
@@ -22,3 +22,6 @@ run-cli:
2222

2323
docker-build:
2424
docker build -t argus-dual-agent:latest .
25+
26+
docker-run:
27+
docker compose run --rm argus

‎README.md‎

Lines changed: 58 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,141 +2,134 @@
22

33
# Argus Dual-Agent System
44

5-
Production-oriented dual-agent framework for desktop and code automation.
5+
面向复杂自动化任务的双 Agent 执行框架
66

77
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
8-
[![Architecture](https://img.shields.io/badge/architecture-Dual%20Agent-black.svg)](#system-architecture)
8+
[![Architecture](https://img.shields.io/badge/architecture-Dual%20Agent-black.svg)](#系统架构)
99
[![Runtime](https://img.shields.io/badge/runtime-LiteLLM%20%2B%20Tools-5A45FF.svg)](https://github.com/BerriAI/litellm)
1010
[![CI](https://img.shields.io/badge/CI-GitHub_Actions-2088FF.svg)](https://github.com/sudo-yf/hackathon2512/actions)
1111
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
1212

1313
</div>
1414

15-
## Overview
15+
## 项目简介
1616

17-
Argus 是一个双 Agent 协同自动化系统:`GUI Agent` 负责界面理解与桌面动作,`Code Agent` 负责逻辑分析与代码执行,`Smart Router` 根据任务语义、执行反馈与失败信号进行动态路由与切换。
17+
Argus 通过 `GUI Agent` 与 `Code Agent` 双路协同执行任务:
1818

19-
该项目面向阿里 Agent 挑战赛与 Gemini Hackathon 场景,支持 GUI 形态与 CLI 形态双运行模式。
19+
- `GUI Agent` 负责屏幕理解、界面操作与流程执行
20+
- `Code Agent` 负责代码分析、脚本执行与逻辑推理
21+
- `Smart Router` 根据任务类型、执行结果与失败信号做动态路由与兜底切换
2022

21-
## Table of Contents
23+
项目面向阿里 Agent 挑战赛与 Gemini Hackathon 场景,支持 GUI 与 CLI 双运行模式。
2224

23-
- [Overview](#overview)
24-
- [Core Capabilities](#core-capabilities)
25-
- [System Architecture](#system-architecture)
26-
- [Quick Start](#quick-start)
27-
- [Runtime Modes](#runtime-modes)
28-
- [Environment Variables](#environment-variables)
29-
- [Project Structure](#project-structure)
30-
- [Design References](#design-references)
31-
32-
## Core Capabilities
25+
## 核心能力
3326

3427
- Dual-Agent 协同执行(GUI + Code)
35-
- 自动路由与失败兜底切换
36-
- Tool Calling 工具体系(screen/window/mouse/keyboard/code)
37-
- 会话记忆(Agent Memory)
38-
- GUI 可视化运行与 CLI 任务批处理
39-
- 标准化工程能力(uv / Docker / lint / test / CI)
28+
- 自动路由与失败回退策略
29+
- Tool Calling 工具体系(screen / window / mouse / keyboard / code)
30+
- Agent Memory 上下文记忆
31+
- GUI 可视化模式 + CLI 批处理模式
32+
- 标准工程化能力(uv / Docker / lint / test / CI)
4033

41-
## System Architecture
34+
## 系统架构
4235

4336
```mermaid
4437
graph TD
45-
User[User Task] --> Router[Smart Router]
46-
Router -->|GUI-first tasks| GUIAgent[GUI Agent]
47-
Router -->|Code-first tasks| CodeAgent[Code Agent]
38+
User[用户任务] --> Router[Smart Router]
39+
Router -->|GUI任务| GUIAgent[GUI Agent]
40+
Router -->|Code任务| CodeAgent[Code Agent]
4841
GUIAgent --> Tools[Tool Runtime]
4942
CodeAgent --> Tools
5043
Tools --> Desktop[Desktop APIs]
5144
Tools --> Exec[Code Execution]
5245
GUIAgent --> Memory[Agent Memory]
5346
CodeAgent --> Memory
54-
Router --> Fallback[Fallback Policy]
47+
Router --> Fallback[Fallback Strategy]
5548
```
5649

57-
## Quick Start
50+
## 快速开始
5851

59-
### 1. Install Dependencies
52+
### 1. 安装依赖
6053

6154
```bash
6255
uv sync
56+
cp .env.example .env
6357
```
6458

65-
### 2. Configure Model Endpoints
59+
### 2. 配置模型环境变量
6660

67-
配置以下环境变量后运行(见下方变量表):
61+
至少配置以下变量:
6862

6963
- `GUIAgent_MODEL`
70-
- `GUIAgent_API_BASE`
7164
- `GUIAgent_API_KEY`
7265
- `CodeAgent_MODEL`
73-
- `CodeAgent_API_BASE`
7466
- `CodeAgent_API_KEY`
7567

76-
### 3. Run
68+
可选:
69+
70+
- `GUIAgent_API_BASE`
71+
- `CodeAgent_API_BASE`
7772

78-
GUI 模式(无参数):
73+
### 3. 运行方式
74+
75+
GUI 模式:
7976

8077
```bash
8178
uv run python main.py
8279
```
8380

84-
CLI 模式(有参数):
81+
CLI 模式:
8582

8683
```bash
8784
uv run python main.py --task "打开浏览器并搜索 GitHub"
8885
```
8986

90-
强制使用某个 Agent:
87+
强制指定 Agent:
9188

9289
```bash
9390
uv run python main.py --task "分析当前目录代码结构" --force code
9491
```
9592

96-
### 4. Quality Gates
93+
### 4. 质量检查
9794

9895
```bash
9996
make lint
10097
make test
10198
make check
10299
```
103100

104-
## Runtime Modes
105-
106-
| Mode | Command | Target |
107-
|---|---|---|
108-
| GUI | `uv run python main.py` | Windows GUI 自动化 |
109-
| CLI | `uv run python main.py --task "..."` | 跨平台任务编排/验证 |
101+
## 容器部署
110102

111-
## Environment Variables
103+
构建镜像:
112104

113-
| Variable | Required | Description |
114-
|---|---|---|
115-
| `GUIAgent_MODEL` | Yes | GUI Agent 使用的模型名 |
116-
| `GUIAgent_API_BASE` | No | GUI Agent API Base URL |
117-
| `GUIAgent_API_KEY` | Yes | GUI Agent API Key |
118-
| `CodeAgent_MODEL` | Yes | Code Agent 使用的模型名 |
119-
| `CodeAgent_API_BASE` | No | Code Agent API Base URL |
120-
| `CodeAgent_API_KEY` | Yes | Code Agent API Key |
105+
```bash
106+
make docker-build
107+
```
121108

122-
## Docker (CLI)
109+
运行容器(CLI 示例):
123110

124111
```bash
125-
docker build -t argus-dual-agent:latest .
112+
make docker-run
126113
```
127114

115+
或 Compose:
116+
128117
```bash
129-
docker run --rm -it \
130-
-e GUIAgent_MODEL=... \
131-
-e GUIAgent_API_BASE=... \
132-
-e GUIAgent_API_KEY=... \
133-
-e CodeAgent_MODEL=... \
134-
-e CodeAgent_API_BASE=... \
135-
-e CodeAgent_API_KEY=... \
136-
argus-dual-agent:latest
118+
docker compose run --rm argus
137119
```
138120

139-
## Project Structure
121+
## 环境变量
122+
123+
| 变量名 | 必填 | 说明 |
124+
|---|---|---|
125+
| `GUIAgent_MODEL` | 是 | GUI Agent 模型名 |
126+
| `GUIAgent_API_BASE` | 否 | GUI Agent API Base |
127+
| `GUIAgent_API_KEY` | 是 | GUI Agent API Key |
128+
| `CodeAgent_MODEL` | 是 | Code Agent 模型名 |
129+
| `CodeAgent_API_BASE` | 否 | Code Agent API Base |
130+
| `CodeAgent_API_KEY` | 是 | Code Agent API Key |
131+
132+
## 目录结构
140133

141134
```text
142135
hackathon2512/
@@ -150,12 +143,13 @@ hackathon2512/
150143
│ └── ui/
151144
├── tests/
152145
├── Dockerfile
146+
├── docker-compose.yml
153147
├── Makefile
154148
├── pyproject.toml
155149
└── LICENSE
156150
```
157151

158-
## Design References
152+
## 参考项目
159153

160154
- [AutoGen](https://github.com/microsoft/autogen)
161155
- [LangGraph](https://github.com/langchain-ai/langgraph)

‎docker-compose.yml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "3.9"
2+
3+
services:
4+
argus:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
image: argus-dual-agent:latest
9+
container_name: argus-dual-agent
10+
env_file:
11+
- .env
12+
volumes:
13+
- ./:/app
14+
command: ["uv", "run", "python", "main.py", "--task", "输出当前环境检查结果"]

0 commit comments

Comments
 (0)