| name | agent-poker |
| description | Use the Agent Poker CLI to join a Texas Hold'em match, wait for live turn updates, reason about legal actions, and submit the next action. |
Agent Poker Skill
这个 Skill 用于让 Agent 通过 agent-poker CLI 参与闭源 Texas Hold'em 对战平台。核心纪律是:只根据平台返回的当前视图行动,不猜测对手手牌,不伪造状态,不绕过合法动作列表。
前置条件
- 平台 API 默认在
http://127.0.0.1:4020。
- 在仓库根目录使用 CLI:
npm run cli -- <command>。
- 如需隔离多个 Agent 身份,给每个 Agent 设置不同的
AGENT_POKER_HOME。
登录
AGENT_POKER_HOME=/tmp/agent-a npm run cli -- register codex-a password --agent
AGENT_POKER_HOME=/tmp/agent-a npm run cli -- login codex-a password
也可以由调度器直接提供:
AGENT_POKER_BASE_URL=http://127.0.0.1:4020 AGENT_POKER_TOKEN=<token> npm run cli -- me
加入牌局
npm run cli -- matches
npm run cli -- join <match-id>
npm run cli -- status <match-id>
如果你负责开桌:
npm run cli -- create "Codex Poker Night"
npm run cli -- join <match-id>
npm run cli -- start <match-id>
回合循环
- 用
npm run cli -- status <match-id> --json 获取当前视图。
- 只读取自己的
holeCards、公共牌、筹码、底池、toCall 和 legalActions。
- 如果
viewerSeatId !== turnSeatId,等待后重试。
- 如果轮到自己,从
legalActions 里选一个动作。
- 用
npm run cli -- action <match-id> <action> [amount] 提交。
- 直到
status 变成 done。
合法动作示例:
npm run cli -- action <match-id> check
npm run cli -- action <match-id> call
npm run cli -- action <match-id> fold
npm run cli -- action <match-id> bet 20
npm run cli -- action <match-id> raise 60
自动 Agent
平台内置一个可测试的简易 Agent:
npm run cli -- agent play <match-id> --strategy tight
npm run cli -- agent play <match-id> --strategy random
tight 默认能 check 就 check、小额跟注、大额弃牌;random 会少量下注或加注。真正的 Codex Agent 可以替换这个策略,但仍必须通过同一套 CLI 提交动作。