Anthropic 執行長Dario Amodei 2025年10月說 Claude 已能寫出公司內90%的程式碼,實際openclaw應該也是vibe coding下的協力產物,所以短時間開發一個像openclaw可以用通訊軟體 (Telegram、MessageApp、Line......)直接口語命令你的數位員工 (Agent)做事的應用程式,變得很容易。
今天花了一個下午,就使用 Antigravity開發了一個類openclaw的架構程式,且將Agent員工執行的行為,具現化成網頁圖形介面,使用者可透過Telegram 或 網頁介面口語化的下指令,叫Agent員工去執行工作。


以下是功能說明,其實照著這想法,可以輕易延伸眾多應用。
--------------------------------------------------------------------------
**Lazy Office** 是一套多功能的 AI 代理人協作系統,透過「辦公室」的概念,整合這四位專業的虛擬員工,為您處理資安、寫作、醫學研究與自動化任務。
本系統支援 **雙介面操作**:
1. 🤖 **Telegram Bot**: 隨時隨地的移動端控制。
2. 🖥️ **Web Dashboard**: 具備像素風介面的即時監控與控制台。
---
## 👥 員工介紹 (Agents)
| 角色 | 代號 | 專長功能 | 觸發關鍵字 |
| :--- | :--- | :--- | :--- |
| **Cyber Guard** | 🛡️ 資安守衛 | 網路掃描、惡意指令攔截、Prompt Injection 防護 | `scan`, `security`, `check`, `port` |
| **Trend Reporter** | 📰 趨勢記者 | 網路搜尋、科技趨勢分析、文章撰寫 (Markdown) | `news`, `trend`, `write`, `article` |
| **Medical Researcher** | 🏥 醫學研究員 | 醫學文獻檢索、臨床計畫書 (Protocol) 生成 (.docx) | `protocol`, `research`, `clinical`, `medical` |
| **Workflow Automator** | 🤖 自動化小幫手 | 串接 n8n、觸發外部工作流 (Webhook) | `automate`, `workflow`, `n8n`, `trigger` |
---
## 🚀 快速開始 (Quick Start)
### 1. 環境設定
確保您已安裝 Python 3.10+,並安裝所需套件:
```bash
pip install -r requirements.txt
```
### 2. 設定檔 (Config)
請編輯 `config.yaml`,填入必要的 API Key:
```yaml
telegram:
bot_token: "您的_TG_BOT_TOKEN"
google:
api_key: "您的_GEMINI_API_KEY"
# (選填) 若要使用 n8n
agents:
workflow_automator:
webhook_url: "您的_N8N_WEBHOOK_URL"
```
### 3. 啟動系統
執行主程式,將同時啟動 Telegram Bot 與 Web Server:
```bash
python main.py
```
看到 `🤖 Lazy Office Bot is running (Telegram + Web)...` 表示啟動成功。
---
## 🕹️ 操作說明
### 🖥️ Web Dashboard (網頁版)
* **網址**: `http://localhost:5000`
* **功能**:
* 查看辦公室即時畫面與員工狀態。
* 下方對話框輸入指令,與 Agent 互動。
### 📱 Telegram Bot (手機版)
* 直接對 Bot 傳送訊息即可。
* 支援檔案傳輸 (例如 Medical Researcher 產生的 .docx 檔)。
---
## 💡 指令範例 (Use Cases)
### 1. 網路掃描 (Cyber Guard)
> "Scan 127.0.0.1"
>
> * **功能**: 執行 nmap 掃描指定 IP 的 Port 狀態。
> * **注意**: `drop table` 等攻擊指令會被攔截。
### 2. 撰寫趨勢報告 (Trend Reporter)
> "Write a report about strict AI agents"
>
> * **功能**: 自動搜尋 DuckDuckGo,整理資料,並撰寫一篇 Markdown 格式的報告。
### 3. 撰寫醫學計畫書 (Medical Researcher)
> "Draft a clinical protocol for Peptide Therapy"
>
> * **功能**: 搜尋醫學指引,生成一份標準的臨床試驗計畫書 (`Protocol_xxx.docx`) 並傳送給您。
### 4. 觸發自動化 (Workflow Automator)
> "Trigger verify workflow"
>
> * **功能**: 發送 Webhook 到 n8n 並回傳執行結果。
---
## 📂 專案結構
* `main.py`: 程式入口 (整合 Telegram 與 Web)。
* `web_app.py`: Flask 網頁伺服器。
* `agents/`: 各 Agent 的邏輯實作。
* `manager.py`: 中央 Agent 管理器。
* `router.py`: 指令分流邏輯。
* `tools/`: 工具庫 (Search, LLM, PDF Parser, Port Scanner)。
* `templates/`: 網頁 HTML。
* `static/`: CSS, JS 與 圖片素材。
---
## ⚠️ 常見問題
* **Q: 圖片沒顯示?**
* 請確認 `static/images/office_bg.png` 是否存在。
* **Q: Bot 沒回應?**
* 請檢查 `config.yaml` 的 Token 是否正確,或查看終端機是否有錯誤訊息。
Enjoy your Lazy Office! ☕


