by TheSyart
Local Emperor-style AI agent with Vue WebUI, multi-provider LLMs, streaming chat, tools, skills, memory, and token telemetry.
# Add to your Claude Code skills
git clone https://github.com/TheSyart/emperor-agentGuides for using ai agents skills like emperor-agent.
Last scanned: 6/18/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-06-18T08:49:11.373Z",
"npmAuditRan": true,
"pipAuditRan": false,
"promptInjectionRan": true
}See how emperor-agent compares with popular alternatives.
emperor-agent is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by TheSyart. Local Emperor-style AI agent with Vue WebUI, multi-provider LLMs, streaming chat, tools, skills, memory, and token telemetry. It has 195 GitHub stars.
Yes. emperor-agent passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/TheSyart/emperor-agent" and add it to your Claude Code skills directory (see the Installation section above).
emperor-agent is primarily written in TypeScript. It is open-source under TheSyart on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh emperor-agent against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Emperor Agent 是一款面向个人长期使用的桌面 Agent。你可以用它处理日常问答,也可以绑定本地项目,让 Agent 在明确的权限范围内读取文件、运行工具并持续推进任务。
Emperor Agent 里有几组名称看起来相似,实际处在不同层级:
| 层级 | 含义 |
|---|---|
| Chat / Build | 会话类型:一个用于普通对话,一个绑定本地项目 |
| 权限预设 | read-only、workspace-write、danger-full-access:决定 Agent 能写哪里 |
| Plan | 规划模式:先只读探索并提交方案,批准后再执行 |
| Goal | 让 Agent 在你不再输入时一轮轮继续推进同一个目标 |
| Scheduler | 按时间触发 Agent turn 的机制 |
应用会把会话、记忆、配置和附件保存在本机。Chat(普通对话)适合问答和轻量任务;Build(项目工作)绑定本地目录,并读取项目中的 AGENTS.md / CLAUDE.md。
每个会话都完整记录在本机;应用崩溃后,会话可以自动修复并继续使用。
“本地优先”不等于完全离线。模型请求会发送给你配置的 Provider;调用远程 MCP、会联网的 Skill 或命令时,对应内容也会离开本机。
安装包适合直接使用,不要求目标机预装 Node.js、Python、Git 或 ripgrep。
没有可用模型时,对话和模型测试会给出配置入口;熟悉配置文件的用户也可以参考 config/examples/model_config.example.json。
设置页可以保存多个标准接口模型,管理 Provider、协议、凭证和能力;当前使用哪个模型在聊天输入框中选择,切换从下一次请求开始生效。Provider 为 deepseek 时使用内置的 DeepSeek 适配器,其他 Provider 按所选协议走 OpenAI Chat Completions 或 Anthropic Messages。可重试的错误最多自动重试 5 次,不会暗中切换模型。
模型配置、记忆和附件见模型、记忆与附件。
Chat 适合日常问答、资料整理和一次性的工具任务。它使用用户档案、全局长期记忆和当前会话历史,工作目录是 Emperor Home 下的 workspace/,不绑定你的项目。
Build 会话绑定一个本地文件夹,适合代码、文档和其他项目任务。Agent 会读取项目中逐级的 AGENTS.md / CLAUDE.md 和该项目的私有记忆。项目私有记忆保存在全局 stateRoot,不会写回项目文件。
| 命令 | 行为 |
|---|---|
/permissions read-only |
可以读取;任何写入都需要你逐次批准 |
/permissions workspace-write |
默认。可以写当前 workspace 和临时目录;超出范围时逐次请求批准 |
/permissions danger-full-access |
不限制写入,也不弹出审批 |
批准只对那一次工具调用有效。Shell 命令在 macOS(Seatbelt)和 Linux(bubblewrap)上由系统沙箱执行;其他平台没有沙箱后端,只有 danger-full-access 才能运行 Shell 命令。受限预设主要限制文件写入;macOS 还拒读 Emperor 的电脑操作状态与浏览器数据,并阻止部分系统 GUI 连接。普通文件读取和互联网访问仍不受此文件沙箱普遍限制。
/plan
/plan 为现有项目设计一套迁移方案
/plan off
进入 Plan 后,Agent 先只读探索、必要时向你提问,然后提交一份完整计划。你可以选择 Approve(退出 Plan 并开始执行)或 Keep planning(附上意见让它修改)。Plan 通过提示词约束 Agent,实际写入范围仍由当前权限预设决定。
/goal 让项目的全部测试通过
设置 Goal 后,每当 Agent 空闲,系统会自动发起新一轮续跑,直到 Agent 判断目标完成、报告受阻,或达到轮数上限(默认 256 轮)。你的消息始终优先。
| 命令 | 作用 |
|---|---|
/goal |
查看当前 Goal |
/goal <目标> |
设置 Goal |
/goal edit <目标> |
修改目标 |
/goal pause |
暂停自动续跑 |
/goal resume |
恢复自动续跑 |
/goal clear |
清除当前 Goal |
应用重启后 Goal 保留,但需要 /goal resume 才会继续续跑。Goal 不提高权限。
| 情况 | 使用 |
|---|---|
| 问答、轻量修改、明确的一次性任务 | 普通 Chat / Build |
| 希望先审阅方案 | Plan |
| 希望 Agent 自己一轮轮推进到完成 | Goal |
| 希望按时间定期发起任务 | Scheduler |
| 命令 | 作用 |
|---|---|
/new |
在当前工作区创建一条空白会话 |
/compact |
保留摘要并释放当前会话的上下文空间 |
/model、/reasoning |
选择模型和思考强度 |
/permissions <预设> |
查看或切换权限预设 |
/plan、/goal |
进入规划模式或设置持续目标 |
/stop、/continue |
停止当前任务,或让 Agent 继续上一项工作 |
每个已启用的 Skill 直接使用自己的 token,例如 /agent-reach 搜索相关讨论。未知命令只在本地报错,不会发送给模型。完整语义见 Slash command 平台。
下面的分级描述当前能力边界,不代表公开安装包已经进入 Stable。
| 能力 | 当前用途 |
|---|---|
| Chat / Build | 多会话对话和项目工作区隔离 |
| 权限预设与 Plan | 控制写入范围、一次性提权、先规划再执行 |
| 模型配置 | 保存多个 Provider 模型、激活一个模型并标记视觉能力 |
| 记忆 | 用户档案、全局长期记忆、项目私有记忆、版本恢复和 memory_edit |
| 附件 | 保存图片、文本和受支持的文档,并传入模型上下文 |
| 本地工具 | 文件读写与编辑、搜索、Shell(含后台任务)、Todo 与提问 |
| 子代理 | 在后台委派独立或继承上下文的子任务 |
| Skills / Plugins / MCP | 在「能力」页导入和编辑本地 Skill、安装版本化 Plugin、粘贴配置接入 MCP server、查看注册的工具;「探索」页提供少量精选条目 |
| 右侧工作台 | Build 会话的审查(Git Review)、用户终端和只读文件;任何会话可用的内置浏览器 |
| 环境信息与导航 | 对话右上角的环境信息卡、置顶会话、应用内通知、前进 / 后退和快捷键 |
| Token / Diagnostics | 查看消耗、上下文、运行状态和环境问题 |
| 能力 | 入口与限制 |
|---|---|
| Goal | /goal;同一会话内自动续跑,重启后需要显式恢复 |
| Scheduler | 定时任务页面和 scheduler 工具;任务使用与普通对话相同的权限 |
| Pull Request | 侧栏「Pull Request」页;只读,需要本机已安装并登录的 GitHub CLI(gh) |
| Hooks | Settings → Hooks;hooks.json 配置,仅 command handler |
| Headless ACP V1 | 源码 operator preview;本机 stdio、纯文本、Build 会话,无桌面开关 |
| 桌宠 companion | 设置页手动启用;默认关闭,由主 Electron 进程托管 |
| 电脑操作(实验) | 设置 → 电脑操作,默认关闭;目前面向 macOS,Agent 可操作内置浏览器、已连接的 Chrome 标签页和桌面应用,各驱动仍在实验阶段,见电脑操作 |
| 能力 | 当前状态 |
|---|---|
| Watchlist | 已有检查和调度链路,主要供受控后台维护使用 |
会话、记忆、配置、附件、用户 Skills 和受管工具环境都保存在 Emperor Home,默认是 ~/.emperor,可以用环境变量 EMPEROR_CONFIG_DIR 整体改到别处。
常用路径(相对 Emperor Home):
| 数据 | 路径 |
|---|---|
| 模型配置 | model_config.json |
| 会话记录 | sessions/<session-id>/log.jsonl |
| 全局长期记忆 | memory/MEMORY.local.md |
| 项目私有记忆 | projects/<project-id>/AGENTS.local.md |
| 附件 | memory/attachments/ |
| Hooks 配置 | hooks.json |
| 用户 Skills | skills/ |
| 大工具结果 | spill/ |
| 受管工具环境 | environment/ |
首次启动当前版本时,旧版本的 sessions/ 目录会整体移到 sessions.legacy-<时间戳>/ 保留,新版本从空的会话列表开始。完整规则见全局私有存储根架构。
Build 项目目录不会承载私有会话、记忆或附件数据。
skill_manage 修改 Skills、用 mcp_config 修改 MCP 配置时,除 danger-full-access 外每次写入都需要你批准。http(s) 网址,使用不落盘的独立会话,拒绝网页的权限请求和下载。