Borrowing it
Nothing to install: this file belongs to Baba88611/detroit-ai-player. 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/Baba88611/detroit-ai-player/main/AGENTS.mdgit clone --depth 1 https://github.com/Baba88611/detroit-ai-playerWrote 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/baba88611/detroit-ai-player/agents-md)<a href="https://agentmods.dev/instructions/baba88611/detroit-ai-player/agents-md"><img src="https://agentmods.dev/badge/instructions/baba88611/detroit-ai-player/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/baba88611/detroit-ai-player/agents-md"><img src="https://agentmods.dev/badge/instructions/baba88611/detroit-ai-player/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.01426 | $0.01426 |
| Opus 5 | $0.00713 | $0.00713 |
| Sonnet 5 | $0.00285 | $0.00285 |
| Haiku 4.5 | $0.00143 | $0.00143 |
Grade A, and why
detroit-ai-player 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — 给 AI Agent 的部署与运行指引
如果你是一个被用户交付了本仓库、要替他把这套系统跑起来的 AI agent(Claude Code、Codex 等), 按本文件执行即可。它是 README.md 的"可执行摘要",只讲怎么把它跑起来; 项目是什么、能观测什么见 README。
If you are an AI agent asked to deploy and run this repo for a user, follow this file. It is the executable summary of README.md.
这是什么
一个让 LLM 作为"玩家"自主跑通一款叙事游戏决策树的实验框架。你的任务通常是:装好依赖 → 选一个模型后端 → 跑起来 → 把结果目录指给用户。你不是"玩家"本身——真正做决策的是被 runner 调用的模型(API 或一个隔离的子 claude 进程)。
前置检查
- Python ≥ 3.10(
python3 --version)。 - 确认你在正确的目录:所有命令假定在本仓库根目录下的
03_runner/里运行。若用户机器上有多个副本或同名目录,以用户交给你的那个路径为准,别跑错副本。
装依赖
cd 03_runner
pip install -r requirements.txt
选后端(决策树,按顺序判断)
A. 用户有模型 API key(推荐,最通用)
用 --model default,走 03_runner/.env 里的配置。API key 是敏感信息——由用户自己填,你不要经手:
cp .env.example .env # Windows: copy .env.example .env
- 你(agent)可替用户填非敏感项:
LLM_BASE_URL(端点,如https://api.deepseek.com或https://api.openai.com/v1)、LLM_MODEL(模型名,如deepseek-chat/gpt-4o)。 LLM_API_KEY留给用户自己填:请用户用自己的编辑器把 key 粘进.env。不要让用户在对话里把 key 发给你,你也不要cat/echo/ 读取.env或打印环境变量——程序运行时会自行读取,你全程无需看到 key。- key 等同密码,
.env已被.gitignore排除,不会被提交。
确认用户填好 key 后再运行。
B. 用户没有 API key,但本机装了 Claude Code 并已登录
用 --model claude-code,走用户的订阅会话,无需 .env、无需任何 key:
python src/runner.py --json ../01_json/zh/ch01_the_hostage_zh.json --model claude-code
- 如果你自己就是 Claude Code:直接执行上面的命令即可。runner 会 spawn 一个带
--safe-mode --tools ""的隔离子claude当玩家,正常认证。 - 例外:若你运行在某些托管/沙箱化环境里、子进程拿不到本地 keychain,会返回
401 Invalid authentication credentials。此时不要重试,改为把这条命令交给用户,让他在普通终端里运行。 - 先决条件:终端能跑通
claude(用户装过并登录过一次)。
C. 两者都没有
无法运行。告诉用户:需要一个模型 API key(走 A),或安装并登录 Claude Code(走 B)二选一。
Codex 不能当玩家后端:其
read-only沙箱仍允许读任意文件、且无法关闭工具执行,破坏本项目的信息隔离。Codex 可以当"编排你部署"的 agent,但跑实验请用 A 或 B。
跑起来
# 单章(第 1 章,中文版,默认人格,休闲难度):
python src/runner.py --json ../01_json/zh/ch01_the_hostage_zh.json --model default
# 全流程 campaign(ch01 → ch32 串联,跨章状态自动传递):
python src/campaign_runner.py --chapters ../01_json/zh/ch*.json --model default
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 · 90 lines · 1,426 tokens per session scan A 80ec3c148807
detroit-ai-player AGENTS.md is an instructions file published in the GitHub repository Baba88611/detroit-ai-player (47 stars, last pushed 1mo ago), licensed MIT. It adds 1,426 tokens to every session, about $0.0071 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.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.