detroit-ai-player: Instructions file for Codex

AGENTS.md

detroit-ai-player AGENTS.md is an instructions file for Codex, OpenCode from Baba88611/detroit-ai-player. It costs 1,426 tokens per session, scanned A, original, MIT.

A repository guide for AI agents that explains how to install dependencies, choose a model backend, and run a narrative-game experiment. The framework lets a language model make decisions through a game's story tree.

In plain words
What is it for?
Use it to deploy the project, configure an API or local model, run the game runner, and locate the generated results.
Why use it?
It gives an agent the project-specific setup and operating instructions needed to run the repository correctly.

Instructions file for CodexOpenCode

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

This is Baba88611/detroit-ai-player's own configuration. It tells Codex and OpenCode how to work on detroit-ai-player 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 detroit-ai-player configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is python src/runner.py --json ../01_json/zh/ch01_the_hostage_zh.json --model claude-code.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Baba88611/detroit-ai-player/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Baba88611/detroit-ai-player

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 detroit-ai-player AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/baba88611/detroit-ai-player/agents-md/github.svg)](https://agentmods.dev/instructions/baba88611/detroit-ai-player/agents-md)
Your own site
<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.

agentmods 80×15 button for detroit-ai-player AGENTS.md

Your own site · 80×15
<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>
Per session 1,426 This file is loaded in full into every session.
When invoked 1,426 The same file — it is already loaded in full.
Security scan A 0 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.01426 $0.01426
Opus 5 $0.00713 $0.00713
Sonnet 5 $0.00285 $0.00285
Haiku 4.5 $0.00143 $0.00143

Measured 9d ago against content hash 80ec3c148807, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

AGENTS.md · 90 lines

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 进程)。

前置检查

  1. Python ≥ 3.10python3 --version)。
  2. 确认你在正确的目录:所有命令假定在本仓库根目录下的 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.comhttps://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

Read the full file on GitHub · 90 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. 9d ago First seen · 90 lines · 1,426 tokens per session scan A 80ec3c148807

Subscribe to this mod's changes

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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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

microsoft/vscode · 6,785 tokens

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

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

deepseek-ai/deepseek-harness · 3,735 tokens