amp-acp: Instructions file for Codex

AGENTS.md

amp-acp AGENTS.md is an instructions file for Codex, OpenCode from tao12345666333/amp-acp. It costs 998 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for an ACP adapter that connects Amp Code to clients such as Zed. ACP, or Agent Client Protocol, is a way for coding tools to communicate with compatible clients; the instructions cover commands, structure, and coding rules.

In plain words
What is it for?
Use them when building, testing, linting, or changing the TypeScript adapter and its ACP, session, stream, or MCP configuration code.
Why use it?
They give contributors the project’s exact build, test, logging, and code-organization expectations, reducing integration mistakes.

Instructions file for CodexOpenCode

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

This is tao12345666333/amp-acp's own configuration. It tells Codex and OpenCode how to work on amp-acp 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 amp-acp configures →

Reuse

Borrowing it

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

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 amp-acp AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tao12345666333/amp-acp/agents-md"><img src="https://agentmods.dev/badge/instructions/tao12345666333/amp-acp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 998 This file is loaded in full into every session.
When invoked 998 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.00998 $0.00998
Opus 5.5 $0.00399 $0.00399
Sonnet 5.5 $0.00200 $0.00200
Haiku 4.5 $0.00100 $0.00100

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

Security

Grade A, and why

amp-acp 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 4d 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 · 52 lines

How it starts

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

AGENTS.md

Commands

  • bun run build — Bundle TypeScript to dist/index.js (single file, Bun target)
  • bun start or bun dist/index.js — Run the ACP adapter
  • bun run lint — Type-check with tsc --noEmit
  • bun test src/ — Run tests with Bun's built-in test runner
  • bun run test:e2e:live — Full-stack opt-in verification (binary + fake-CLI e2e + real Amp CLI + orb execution); needs an authenticated Amp CLI, consumes real Amp usage

Architecture

This is an ACP (Agent Client Protocol) adapter that bridges Amp Code to ACP-compatible clients like Zed.

  • src/index.ts — Entry point, redirects console to stderr (stdout reserved for ACP stream)
  • src/run-acp.ts — Sets up the SDK 2 ACP v1 connection using stdin/stdout JSON streams
  • src/agent-app.ts — Builds the SDK 2 agent app, registers the v1 agent methods, and falls through to the extension-method handler
  • src/acp-client.ts — Minimal client interface used by AmpAcpAgent and its tests; sends session/update notifications and custom client-bound notifications
  • src/acp-v2.ts — Experimental opt-in ACP v2 bridge (AMP_ACP_PROTOCOL=v2); translates v2 requests and updates around the existing v1 AmpAcpAgent. v1 remains the default
  • src/server.ts — AmpAcpAgent class: handles session creation, listing, deletion, and closure; serializes prompts per session with a bounded queue, next-turn steering, and cancel semantics; advertises Amp slash commands; manages MCP config; and calls @ampcode/sdk (formerly @sourcegraph/amp-sdk)
  • src/amp-transport.ts — Executes Amp through the CLI or SDK and manages native thread archival; image turns use CLI JSON input locally or uploaded --attach files for Orbs (including SDK transport fallback)
  • src/thread-mapping-store.ts — Persists durable ACP-session-to-Amp-thread mappings, session settings, title, and last-updated timestamp; lists and deletes records for session lifecycle operations
  • src/thread-history.ts — Exports Amp thread messages, title, and timestamp for session/load replay and metadata recovery
  • src/to-acp.ts — Converts Amp stream events to ACP sessionUpdate notifications, including tool call names, raw output, file diffs, message IDs, and Amp todo calls as plan updates
  • src/mcp-config.ts — Converts ACP MCP server configs to Amp SDK format
  • src/plugin-modes.ts — Discovers agent modes from Amp plugins (// @amp-agent-mode comments in project/system plugin files, plus amp plugins list for Personal/Workspace plugins, cached 60s per cwd). Unknown but non-empty mode values pass through to Amp unchanged
  • src/turn-usage.ts — Aggregates a turn's token usage from Amp stream messages (last report wins per response id) for PromptResponse.usage, and exposes the latest model call's context total for usage_update
  • src/turn-events.ts — Parses Amp MCP and permission-denial status from the stream and maps Amp stop reasons to ACP stop reasons
  • src/utils.ts — Node-to-Web stream converters

Read the full file on GitHub · 52 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. 4d ago Changed · +2 lines · +75 tokens per session 8d1f8144ef3e
  2. 6d ago Changed · +1 lines · +49 tokens per session 283d830e98e3
  3. 7d ago Changed · +2 lines · +166 tokens per session 7cb16b2d778e
  4. 1mo ago Changed · +1 lines · +45 tokens per session a84af011d914
  5. 1mo ago Changed · +1 lines · +55 tokens per session e7153b500494
  6. 1mo ago Changed · +1 lines · +42 tokens per session 371be7dcaaf8
  7. 1mo ago Changed · +19 lines · +226 tokens per session 7ac17ea24558
  8. 2mo ago First seen · 25 lines · 340 tokens per session scan A 113608ffee99

Subscribe to this mod's changes

amp-acp AGENTS.md is an instructions file published in the GitHub repository tao12345666333/amp-acp (104 stars, last pushed 3d ago), licensed Apache-2.0. It adds 998 tokens to every session, about $0.0040 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-30.

Related

amp-acp AGENTS.md compared with instructions from other repositories

amp-acp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
amp-acp AGENTS.mdtao12345666333/amp-acpInstructions file1043d agoApache-2.0A998Codex, 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