agentxx: Instructions file for Codex

AGENTS.md

agentxx AGENTS.md is an instructions file for Codex, OpenCode from coolight7/agentxx. It costs 29,600 tokens per session, scanned B, original, MIT.

Project instructions for Agentxx, a C++ AI agent that can run on Linux, Windows, and Android. They describe its architecture, compatibility, coding conventions, and testing expectations.

In plain words
What is it for?
Use them when modifying Agentxx code, especially its client, agent sessions, network communication, logging, asynchronous work, build process, or tests.
Why use it?
They give coding agents project-specific rules so changes fit the existing design and are tested across normal and edge cases.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions AGENTS.md.

This is coolight7/agentxx's own configuration. It tells Codex and OpenCode how to work on agentxx itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentxx configures →

Reuse

Borrowing it

Nothing to install: this file belongs to coolight7/agentxx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/coolight7/agentxx/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/coolight7/agentxx

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for agentxx AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/coolight7/agentxx/agents-md/github.svg)](https://agentmods.dev/instructions/coolight7/agentxx/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/coolight7/agentxx/agents-md"><img src="https://agentmods.dev/badge/instructions/coolight7/agentxx/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.

agentmods 80×15 button for agentxx AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/coolight7/agentxx/agents-md"><img src="https://agentmods.dev/badge/instructions/coolight7/agentxx/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29,600 This file is loaded in full into every session.
When invoked 29,600 The same file — it is already loaded in full.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.29600 $0.29600
Opus 5.5 $0.11840 $0.11840
Sonnet 5.5 $0.05920 $0.05920
Haiku 4.5 $0.02960 $0.02960

Measured today against content hash 59bbd7a83d90, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

agentxx AGENTS.md scanned grade B with 2 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 today.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo echo 1 > /proc/sys/vm/drop_caches

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- [curl](agent/third_party/curl/)
AGENTS.md · 1,041 lines

How it starts

The opening of the file, as written. The whole thing — 1,041 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agentxx

  • C++ 23 实现的 AI Agent;编译器启用标准 c++26/c17

兼容性

  • 跨系统支持:
    • 可编译为独立可执行程序/动态库/静态库,摆脱额外的动态库依赖,仅依赖基本的系统库
    • Linux x86_64 + WSL扩展功能
    • Windows 10+ x86_64
    • Android 5.0+

整体设计 & 建议

  • 详细主程序架构设计见design,插件设计文档见plugins.md,客户端界面层(描述层/适配/kit/GUI 接入)见ui-layer.md,事件中枢与后台任务见events.md,当大幅修改代码时,请参考并更新
  • Agent 的设计支持:
    • 并发多会话,单线程/多协程交错执行会话,不需要线程锁
    • client (tui/cli) 主要负责UI渲染展示、用户交互;agent (BaseAgent/CodeAgent) 负责运行会话、调用 llm api、运行 toolcall 等
    • client 应当仅做UI渲染,各种数据来源、消息插入应当尽量由 agent 实现并提供
    • 支持 client+agent 在同一个进程内启动,此时两者使用线程间数据交互
    • 支持 client 通过网络连接 agent server,此时两者在不同进程,通过网络传输交互(已支持 websocket)
    • 应当尽量统一抽象接口,分层屏蔽细节,降低复杂度,让架构设计更清晰
    • 会话 Agent_IO、CancelToken、上下文统计、模型选择 应当独立记录,按 thread_id 取值
  • 编写代码注释:
    • 编写注释时,统一使用 markdown 风格,多行注释使用 /// 开头, 示例(其中的 args 和 return 不必每一个都详细说明,尽量对需要注意、不容易从名称了解含义的进行说明):
/// 英文字母转小写
/// - 支持传入 **unicode**,自动判断在 [A, Z] 转换为 [a, z],非字母返回原值
/// - 相关: 转大写见 [charToUpper]
///
/// - `args`:
///     - [c] 单字符 unicode 码点,应当 >= 0
///
/// - `return` 字母转为小写,非字母返回原值
int charToLower(int c) { ... }
  • 合适时,尽量使用std::string_view替代const std::string&
  • 应当使用 XX_LOG 输出日志,而不是 std::cout/cerr,避免影响 TUI 显示
  • 最终的代码实现目标要能稳定运行在生产环境,广泛服务于各种设备和用户,需要仔细思考实现方案、编写足量的常规使用方式测试+各种边界情况测试
  • 非必要不应修改 agent/third_party/ 内的代码,尽量修改本项目的代码实现功能。如果修改了的话应当删除 build 内对应的目录,让 cmake 重新编译,否则可能不生效
  • 使用 grep、glob 等工具前参考以下代码结构缩小范围,非必要不应去搜索 agent/** 整个代码库,里面包含了 build、third_party 等文件夹太大
  • 需要捕获异常时,建议优先考虑 agentxx::util::catchError 系列,尤其是协程异常,不应 try {} catch(...) 捕获全部异常,应当使用 agentxx::util::catchErrorAsync 放行 取消和中断
  • 如果需要编译或运行测试,一般跑 debug 即可
  • 修改代码后无需自动执行 clang-format 等格式化处理
  • resource/history/ 内是一些功能实现、修复历史记录,在修正文档、批量修改命名等操作时不要修改这个文件夹内的文件
  • 实现功能、插件接口、对外接口时,非必要的限制条件不用实现,可以先跟用户确认是否添加限制/检查,或是在实现后列出可选的一些限制和检查,询问用户是否增加实现

Read the full file on GitHub · 1,041 lines

Changes

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.

  1. today Changed · +49 lines · +1,592 tokens per session 59bbd7a83d90
  2. 2d ago Changed · +94 lines · +2,746 tokens per session 6b537081f6c5
  3. 4d ago Changed · +11 lines · +375 tokens per session b77971d7d825
  4. 5d ago Changed · +15 lines · +436 tokens per session 4f10585ef3ea
  5. 6d ago Changed · +82 lines · +2,053 tokens per session 04812cdb3f63
  6. 8d ago Changed · +13 lines · +424 tokens per session 59499d01fad6
  7. 11d ago Changed · +14 lines · +425 tokens per session 024fd202e7a6
  8. 12d ago Changed · +11 lines · +437 tokens per session 2035e1e71c3f
  9. 13d ago Changed · +6 lines · +216 tokens per session a1b578069c7b
  10. 14d ago First seen · 746 lines · 20,896 tokens per session scan B 93db0850a978

Subscribe to this mod's changes

agentxx AGENTS.md is an instructions file published in the GitHub repository coolight7/agentxx (7 stars, last pushed yesterday), licensed MIT. It adds 29,600 tokens to every session, about $0.1184 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

agentxx AGENTS.md compared with instructions from other repositories

agentxx AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentxx AGENTS.mdcoolight7/agentxxInstructions file7yesterdayMITB29,600Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot