[ PROMPT_NODE_22172 ]
AI Maestro 智能体管理
[ SKILL_DOCUMENTATION ]
# AI Maestro 智能体管理
通过统一的 CLI 创建、管理和编排多个 AI 智能体。处理完整的智能体生命周期:创建、休眠、唤醒、重命名、导出/导入以及插件管理。属于 [AI Maestro](https://github.com/23blocks-OS/ai-maestro) 套件的一部分。
## 前置条件
需要本地运行 [AI Maestro](https://github.com/23blocks-OS/ai-maestro) 并配备 tmux 3.0+。
```bash
# 安装 CLI
git clone https://github.com/23blocks-OS/ai-maestro-plugins.git
cd ai-maestro-plugins && ./install-agent-cli.sh
```
## 核心命令
### 智能体生命周期
| 命令 | 描述 |
|---------|-------------|
| `aimaestro-agent.sh list` | 列出所有智能体及其状态 |
| `aimaestro-agent.sh show ` | 查看详细的智能体信息 |
| `aimaestro-agent.sh create --dir ` | 创建新智能体 |
| `aimaestro-agent.sh update --task "..."` | 更新任务/标签 |
| `aimaestro-agent.sh delete --confirm` | 删除智能体 |
| `aimaestro-agent.sh rename ` | 重命名智能体 |
| `aimaestro-agent.sh hibernate ` | 保存状态,释放资源 |
| `aimaestro-agent.sh wake ` | 恢复休眠的智能体 |
| `aimaestro-agent.sh restart ` | 休眠并重新唤醒 |
### 插件管理
| 命令 | 描述 |
|---------|-------------|
| `aimaestro-agent.sh plugin install ` | 安装插件 |
| `aimaestro-agent.sh plugin uninstall ` | 移除插件 |
| `aimaestro-agent.sh plugin list ` | 列出已安装的插件 |
| `aimaestro-agent.sh plugin marketplace add ` | 添加插件市场 |
### 导出/导入
| 命令 | 描述 |
|---------|-------------|
| `aimaestro-agent.sh export ` | 导出智能体配置 |
| `aimaestro-agent.sh import ` | 从文件导入智能体 |
## 使用示例
```bash
# 创建一个后端 API 智能体
aimaestro-agent.sh create backend-api
--dir ~/projects/backend
--task "使用 TypeScript 构建 REST API"
--tags "api,typescript"
# 结束一天的工作 -- 节省资源
aimaestro-agent.sh hibernate frontend-ui
aimaestro-agent.sh hibernate data-processor
# 第二天早上恢复
aimaestro-agent.sh wake frontend-ui --attach
# 在智能体上安装插件
aimaestro-agent.sh plugin install backend-api my-plugin
# 在进行高风险更改前备份
aimaestro-agent.sh export backend-api -o backup.json
```
## 智能体状态
| 状态 | 含义 |
|--------|---------|
| `online` | 正在 tmux 会话中运行 |
| `offline` | 已注册但无活动会话 |
| `hibernated` | 已保存状态,会话已关闭 |
## 全面的 AI Maestro 体验
此技能是 [AI Maestro](https://github.com/23blocks-OS/ai-maestro) 平台的一部分,该平台提供 **6 项技能** 用于 AI 智能体编排:消息传递、内存、文档、图谱、规划和智能体管理。