初始提交:OpenClaw Extra 管理工具
功能: - 📋 智能体列表和管理 - 💬 会话内容查看 - 🤖 模型列表 - 📁 工作区文件浏览 - 🌐 Web 管理面板(端口 16026) 包含: - FastAPI Web 后端 - 网页前端界面 - CLI 命令行工具 - Python API 客户端
This commit is contained in:
92
README.md
Normal file
92
README.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# openclaw-extra
|
||||
|
||||
OpenClaw extra utilities - manage agents, sessions, models, and workspaces.
|
||||
|
||||
## 功能
|
||||
|
||||
- 📋 **智能体列表**: 列出所有 OpenClaw 智能体及其状态
|
||||
- 💬 **对话内容**: 查看各智能体的对话历史(包含使用的模型信息)
|
||||
- 🤖 **模型列表**: 查看 OpenClaw 可用的大模型列表
|
||||
- 📁 **工作区文件**: 浏览各智能体的工作区文件
|
||||
- 🌐 **Web 面板**: 网页端管理界面,直观易用
|
||||
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
pip install openclaw-extra
|
||||
```
|
||||
|
||||
## 使用
|
||||
|
||||
### Web 管理面板(推荐)
|
||||
|
||||
```bash
|
||||
# 启动 Web 服务
|
||||
openclaw-extra web
|
||||
|
||||
# 自定义端口和地址
|
||||
openclaw-extra web --port 9000 --host 127.0.0.1
|
||||
|
||||
默认端口 16026,访问 http://localhost:16026
|
||||
```
|
||||
|
||||
访问 `http://localhost:8080` 即可看到网页管理界面。
|
||||
|
||||
### 基本命令
|
||||
|
||||
```bash
|
||||
# 显示帮助
|
||||
openclaw-extra --help
|
||||
|
||||
# 列出所有智能体
|
||||
openclaw-extra agents
|
||||
|
||||
# 列出可用模型
|
||||
openclaw-extra models
|
||||
|
||||
# 查看智能体详情
|
||||
openclaw-extra agent <agent-id>
|
||||
|
||||
# 查看会话列表
|
||||
openclaw-extra sessions --agent <agent-id>
|
||||
|
||||
# 查看工作区文件
|
||||
openclaw-extra workspace <agent-id>
|
||||
```
|
||||
|
||||
### 环境配置
|
||||
|
||||
可以通过环境变量或配置文件设置 Gateway 连接:
|
||||
|
||||
```bash
|
||||
# 设置 Gateway URL (默认: http://127.0.0.1:18789)
|
||||
export OPENCLAW_GATEWAY_URL="http://127.0.0.1:18789"
|
||||
|
||||
# 设置 Gateway Token (如果需要认证)
|
||||
export OPENCLAW_GATEWAY_TOKEN="your-token"
|
||||
```
|
||||
|
||||
## API 使用
|
||||
|
||||
```python
|
||||
from openclaw_extra import OpenClawClient
|
||||
|
||||
# 创建客户端
|
||||
client = OpenClawClient()
|
||||
|
||||
# 获取智能体列表
|
||||
agents = client.get_agents()
|
||||
|
||||
# 获取模型列表
|
||||
models = client.get_models()
|
||||
|
||||
# 获取会话列表
|
||||
sessions = client.get_sessions(agent_id="hz4th_coder")
|
||||
|
||||
# 获取工作区信息
|
||||
workspace = client.get_workspace(agent_id="hz4th_coder")
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user