vsag AGENTS.md

vsag AGENTS.md is an instructions file for Codex, OpenCode from antgroup/vsag. It costs 1,436 tokens per session, scanned A, original, Apache-2.0.

Core instructions for AI coding agents working on VSAG, a C++ vector-indexing library with Python and Node.js/TypeScript bindings.

In plain words
What is it for?
Use them as the starting point for VSAG changes, especially when locating public APIs, implementation files, or repository-specific rules.
Why use it?
They provide project constraints for formatting, file layout, API compatibility, types, and research before editing code.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/antgroup/vsag/agents-md
Clone the repo
git clone --depth 1 https://github.com/antgroup/vsag

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 vsag AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/antgroup/vsag/agents-md.svg)](https://agentmods.dev/instructions/antgroup/vsag/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/antgroup/vsag/agents-md"><img src="https://agentmods.dev/badge/instructions/antgroup/vsag/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,436 This file is loaded in full into every session.
When invoked 1,436 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01436 $0.01436
Opus 5 $0.00718 $0.00718
Sonnet 5 $0.00287 $0.00287
Haiku 4.5 $0.00144 $0.00144

Measured yesterday against content hash c79d4d2fc7a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

vsag 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 yesterday.

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 · 109 lines

How it starts

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

AGENTS.md

Read me first. This file is the entry point for AI coding agents working on VSAG. It is intentionally short. The bullets under Hard Constraints must hold for every change; the Documentation Index points at the detailed rules for each topic.

Project Overview

VSAG is a high-performance vector indexing library for similarity search, written primarily in C++ with Python bindings provided by pyvsag and Node.js/TypeScript bindings provided by vsag.

Hard Constraints (must hold every change)

  • Tool versions are fixed: clang-format and clang-tidy must be version 15 exactly. Newer versions are not acceptable; CI enforces this.
  • Formatting: C++ source and header files use 4-space indentation and a 100-character line limit; Markdown and other non-C++ text files have no line width limit. Use the .cpp (not .cc) suffix, and ensure every committed text file ends with a trailing newline.
  • Layout: public APIs live in include/vsag/; implementation lives in src/; keep code in the vsag namespace unless the file clearly requires otherwise.
  • Prefer uint64_t over size_t in code changes to avoid macOS compile issues.
  • Do not modify extern/ unless the task explicitly requires third-party dependency changes.
  • Tests: new features need tests; bug fixes need regression coverage; the C++ library (src/ + include/) must maintain ≥ 90 % unit-test coverage.
  • Commits: use Conventional Commits (feat:, fix:, docs:, chore:, …) and DCO sign-off. AI agents must NOT add their own Signed-off-by: — only humans can certify the DCO. AI agents must also NOT invoke git commit -s, because -s appends Signed-off-by: at the end of the message (with a blank line separating it from earlier trailers) and breaks the required ordering. Instead, write both trailers directly in the commit message body: derive the human identity from git config user.name / user.email, place Signed-off-by: first, and follow it immediately (no blank line) with Assisted-by: <AgentName>:<ModelVersion> (e.g. Assisted-by: OpenCode:claude-opus-4.7). For [skip ci], place it at the start of the subject line.
  • PR pushes: when preparing a pull request, prefer pushing the working branch to the contributor's fork rather than directly to the main antgroup/vsag repository. Push to the main repository only when explicitly required or authorized.
  • Pull requests need two labels: one kind/* (kind/bug, kind/feature, kind/improvement, kind/documentation) and one version/* (e.g. version/1.0). Mergify enforces both.
  • kind/bug / kind/feature PRs must link an issue in the description using a GitHub auto-closing keyword (Fixes: #N, Closes: #N, Resolves: #N; cross-repo or full issue URL also OK). kind/improvement and kind/documentation PRs are exempt. Enforced by the PR Issue Link Check Action and a Mergify protection.
  • Issues do NOT carry Signed-off-by: — DCO only applies to commits.

Read the full file on GitHub · 109 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. yesterday First seen · 109 lines · 1,436 tokens per session scan A c79d4d2fc7a3

Subscribe to this mod's changes

vsag AGENTS.md is an instructions file published in the GitHub repository antgroup/vsag (507 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,436 tokens to every session, about $0.0072 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-09-03.