Borrowing it
Nothing to install: this file belongs to TheSyart/emperor-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/TheSyart/emperor-agent/main/AGENTS.mdgit clone --depth 1 https://github.com/TheSyart/emperor-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/thesyart/emperor-agent/agents-md)<a href="https://agentmods.dev/instructions/thesyart/emperor-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/thesyart/emperor-agent/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/thesyart/emperor-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/thesyart/emperor-agent/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02670 | $0.02670 |
| Opus 5 | $0.01335 | $0.01335 |
| Sonnet 5 | $0.00534 | $0.00534 |
| Haiku 4.5 | $0.00267 | $0.00267 |
Grade A, and why
emperor-agent AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md · Emperor Agent 协作指南
本文件固定保存在仓库根目录,供 Codex 和其他受控 Agent 在开发 Emperor Agent 时读取。普通用户说明以
README.md和docs/user/为准;面向人工开发者的操作指南以docs/development/为准。
0. 沟通与原则
- 默认使用中文沟通;命令、路径、配置 key 保留英文原文。
- 这是可持续迭代的个人 Agent 工程,不是 demo。改动要优先考虑长期可维护性、可验证性和磁盘数据兼容。
- 当前主线已经退役 Python runtime:不要新增
agent/、tests/、requirements*.txt、pyproject.toml或 Python Web/CLI fallback。
1. 项目定位
Emperor Agent 是一个本地运行的 TypeScript / Electron 智能体系统:
- Electron main 进程内托管
@emperor/core,renderer 通过 preload IPC 调用 CoreApi。 - Vue 3 + TypeScript + Tailwind 桌面端提供 Chat / Build 多会话、项目级记忆、工具调用、Scheduler、MCP、Team、Ask / Plan、附件与桌宠 companion。
- 运行数据落在本地全局私有目录(
stateRoot,默认~/.emperor-agent)里的memory/、model_config.json、mcp_config.json、emperor.local.json等文件中,不写入仓库或项目源码目录。 - 旧 Python 版只作为迁移背景,不再是可运行产品线;公共仓库不维护旧实现的任务清单或源码对账文档。
2. 先看哪里
README.md+docs/README.mddocs/architecture/overview.md+docs/development/README.mdpackages/core/src/api/core-api.ts+packages/core/src/api/services/*packages/core/src/agent/loop.ts+packages/core/src/agent/runner.tspackages/core/src/config/*+packages/core/src/model/*+packages/core/src/providers/*packages/core/src/tools/*+packages/core/src/subagents/*+packages/core/src/extensions/*packages/core/src/control/*+packages/core/src/permissions/*+packages/core/src/plans/*packages/core/src/memory/*+packages/core/src/sessions/*+packages/core/src/runtime/*packages/core/src/scheduler/*+packages/core/src/watchlist/*packages/core/src/team/*+packages/core/src/mcp/*desktop/src/main/*+desktop/src/preload/*desktop/src/renderer/src/api/*+desktop/src/renderer/src/composables/*+desktop/src/renderer/src/runtime/*desktop/src/renderer/src/components/*+desktop/src/renderer/src/views/*
3. 关键目录
packages/core/:核心 Agent runtime、CoreApi、模型/provider、工具、记忆、会话、Scheduler、Team、MCP、权限、计划与项目工作台系统。desktop/:Electron app。src/main托管 CoreApi 和app://协议;src/preload暴露 Core IPC;src/renderer是 Vue 桌面应用。desktop/src/pet/:主进程内托管的可选桌宠 companion;生产包仅内嵌其 allowlist 资源,不存在独立桌宠 runtime。templates/:系统提示词、初始化用户档案和记忆模板。skills/:项目内技能包。少数技能自带 Python helper 脚本属于技能资产,不是主 runtime。assets/:品牌、桌宠、生成素材;生成素材必须记录到对应PROMPTS.md。docs/user/:面向当前产品入口的完整用户手册。docs/architecture/:当前系统边界、执行链路、权限、Goal 与全局存储架构。docs/development/:源码开发和跨层扩展清单。docs/release/:当前 Preview、安全说明、冻结 Stable 流程和工具供应链审核。private-docs/:仓库根目录下的本地个人开发资料,保存实施计划、审计、研究、进度和外部源码借鉴材料;整个目录被 Git 忽略。memory/:旧版本地运行数据残留位置,永不提交。当前默认私有数据根是~/.emperor-agent(stateRoot,可用EMPEROR_CONFIG_DIR覆盖),不再默认写入这里或项目源码目录,详见docs/architecture/global-state-store.md。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 145 lines · 2,670 tokens per session scan A 05d9f3869f75
emperor-agent AGENTS.md is an instructions file published in the GitHub repository TheSyart/emperor-agent (184 stars, last pushed 27d ago), licensed MIT. It adds 2,670 tokens to every session, about $0.0134 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.