multi-agents-browser: Instructions file for Codex

AGENTS.md

multi-agents-browser AGENTS.md is an instructions file for Codex, OpenCode from zzhan111/multi-agents-browser. It costs 1,696 tokens per session, scanned A, original, MIT.

Project instructions for a browser-control agent whose command line and MCP interface communicate with a background service, which controls Chrome through the Chrome DevTools Protocol. They describe tab state, event buffering, command dispatch, and user-interface rules.

In plain words
What is it for?
Developing CLI or MCP browser commands, routing requests to handlers, managing Chrome tabs, tracking network and console events, and maintaining short tab IDs and event sequence numbers.
Why use it?
They give contributors the architecture and invariants needed to add browser commands without breaking communication, tab tracking, or event handling.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is zzhan111/multi-agents-browser's own configuration. It tells Codex and OpenCode how to work on multi-agents-browser 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 multi-agents-browser configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zzhan111/multi-agents-browser. 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/zzhan111/multi-agents-browser/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/zzhan111/multi-agents-browser

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 multi-agents-browser AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zzhan111/multi-agents-browser/agents-md"><img src="https://agentmods.dev/badge/instructions/zzhan111/multi-agents-browser/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,696 This file is loaded in full into every session.
When invoked 1,696 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.01696 $0.01696
Opus 5.5 $0.00678 $0.00678
Sonnet 5.5 $0.00339 $0.00339
Haiku 4.5 $0.00170 $0.00170

Measured 3d ago against content hash b8409467de69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

multi-agents-browser 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 3d 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 · 156 lines

How it starts

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

ma-browser Agent 开发规范

经验见 learnings.md

架构

CLI (packages/cli) ──HTTP──▶ Daemon (packages/daemon) ──CDP WebSocket──▶ Chrome
MCP (packages/mcp) ──HTTP──┘       │
                              ┌────┴────┐
                              │  HTTP   │
                              │ Server  │
                              └────┬────┘
                                   │
                         ┌─────────┼─────────┐
                         │         │         │
                    CdpConnection  │  CommandDispatch
                    (WebSocket)    │  (request → handler)
                                   │
                            TabStateManager
                            (短 ID, seq 序号,
                             per-tab 事件缓冲)

Daemon 组件:

  • CdpConnection — 维持到 Chrome DevTools Protocol 的 WebSocket 长连接。自动发现 Chrome,管理 session 复用(每个 tab 一个 session)。
  • TabStateManager — 管理 per-tab 状态。分配短 ID(targetId 末 4+ 位 hex,保证唯一)。维护全局单调递增 seq 计数器。每个 tab 持有环形缓冲事件集合(network/console/errors)。
  • CommandDispatch — 将 Request.action 映射到处理函数。所有处理器接收 CdpConnection 和解析后的 TabState,返回带 tab(短 ID)和 seq 的 Response。

核心概念:

  • 短 tab ID — 取 CDP targetId 末尾,最少 4 字符,碰撞时自动扩展。所有请求/响应中用短 ID 标识 tab。
  • seq 计数器 — 全局单调递增整数,每次操作和每个捕获事件都递增。支持 since 过滤做增量查询。
  • Per-tab 事件缓冲 — 环形缓冲(network: 500 条, console: 200 条, errors: 100 条),带 seq 标签。通过 since、filter、method、status、limit 查询。

共享类型定义:packages/shared/src/protocol.ts

添加新命令

3 个文件:

  1. packages/shared/src/protocol.ts — 添加 ActionType + Request 字段 + ResponseData 字段
  2. packages/daemon/src/command-dispatch.ts — 在 dispatchRequest 中添加处理分支
  3. packages/cli/src/commands/<name>.ts + packages/cli/src/index.ts — CLI 命令 + 路由

可选:packages/mcp/src/index.ts — 如果需要暴露为 MCP tool

设计不变量

改代码前必读。违反任何一条都是 bug。

  • INV-1: 所有操作响应必须包含 tab(短 ID)和 seq(序号)
  • INV-2: 观察类响应(network/console/errors)必须包含 cursor
  • INV-3: 无效 tab ID 必须报错,不允许静默 fallback
  • INV-4: seq 全局单调递增,不可回退
  • INV-5: per-tab 事件隔离 — tab A 的事件不会出现在 tab B 的查询中
  • INV-6: tab 关闭时释放短 ID,清除事件缓冲
  • INV-7: tab_new 在零 tab 时仍可工作(在 ensurePageTarget 之前处理)

Read the full file on GitHub · 156 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. 3d ago Changed · +2 lines · +11 tokens per session b8409467de69
  2. 2mo ago First seen · 154 lines · 1,685 tokens per session scan A 70da149a6574

Subscribe to this mod's changes

multi-agents-browser AGENTS.md is an instructions file published in the GitHub repository zzhan111/multi-agents-browser (1 stars, last pushed 4d ago), licensed MIT. It adds 1,696 tokens to every session, about $0.0068 per session on Opus 5.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-31.

Related

multi-agents-browser AGENTS.md compared with instructions from other repositories

multi-agents-browser AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
multi-agents-browser AGENTS.mdzzhan111/multi-agents-browserInstructions file14d agoMITA1,696Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot