Agent-Span AGENTS.md

A set of coding instructions for AgentSpan, an asynchronous Rust web-access gateway for AI agents. It explains the repository layout and the commands used to build, test, lint, format, and run its services.

In plain words
What is it for?
It is for working on AgentSpan's routing, caching, authentication, API, channels, health checks, and Python SDK, including adding a communication channel or an MCP tool. MCP is a standard way for AI assistants to connect to tools.
Why use it?
It gives a developer a map of a multi-package Rust repository and makes the expected checks explicit. This reduces guesswork when changing code or adding integrations.

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/oxbshw/agent-span/agents-md
Clone the repo
git clone --depth 1 https://github.com/oxbshw/Agent-Span

Made for: Codex, OpenCode.

Per session 700 This file is loaded in full into every session.
When invoked 700 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.00700 $0.00700
Opus 5 $0.00350 $0.00350
Sonnet 5 $0.00140 $0.00140
Haiku 4.5 $0.00070 $0.00070

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

Security

Grade A, and why

Agent-Span 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 2d 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 · 61 lines

How it starts

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

AGENTS.md

AgentSpan is an async-Rust web access gateway for AI agents. This file is for AI coding assistants (Claude Code, Cursor, Codex) working in this repo.

Build & test

cargo test --workspace                    # run all tests
cargo clippy --workspace --all-targets -- -D warnings   # lint
cargo fmt --all -- --check                # format check
cargo run --bin agentspan -- serve         # start the API on :8080
cargo run --bin agentspan-mcp              # start the MCP server (stdio)

Python SDK: pip install -e sdk/python[dev] then pytest -q in sdk/python/.

Crate layout

Crate What lives here
agentspan-core Channel/Backend traits, types, config, errors
agentspan-probe Command execution + 6-state health classification
agentspan-router Backend selection, retry, circuit breaker, adaptive routing
agentspan-cache 3-tier cache (memory/disk/Redis), singleflight, optimizer
agentspan-auth API keys (SHA-256), tenants, RBAC, rate limiting, audit
agentspan-channels All 52 channel implementations + registry
agentspan-api Axum REST server, SSE, OpenAPI spec, middleware
agentspan-mcp MCP server (stdio + HTTP), 91 tools
agentspan-cli The agentspan binary — install, doctor, serve, skill, etc.

Adding a channel

  1. Copy crates/agentspan-channels/src/hackernews.rs (free API) or spotify.rs (OAuth) as a template.
  2. Implement Channel + Backend traits. Use BackendRouter for fallback.
  3. Register in src/lib.rs (module + re-export) and src/registry.rs.
  4. Add MCP tools in crates/agentspan-mcp/src/tools.rs.
  5. Add a format rule in crates/agentspan-cli/src/commands/format.rs.
  6. Run cargo test -p agentspan-channels — the registry count test will tell you the expected count.

Adding an MCP tool

Add a ToolDef entry in crates/agentspan-mcp/src/tools.rs. The channel field must match a registered channel name. Use Op::Read for URL-based fetch, Op::Search for keyword queries, Op::Doctor for health.

Read the full file on GitHub · 61 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. 2d ago First seen · 61 lines · 700 tokens per session scan A fb32326c26d7

Subscribe to this mod's changes

Agent-Span AGENTS.md is an instructions file published in the GitHub repository oxbshw/Agent-Span (42 stars, last pushed 1mo ago), licensed MIT. It adds 700 tokens to every session, about $0.0035 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

substack-gateway-oss CLAUDE.md

Instructions for jakub-k-slys/substack-gateway-oss, covering claude.md, commands, install dependencies (dev included, all workspace members), run the server (dev mode with reload) and lint.

jakub-k-slys/substack-gateway-oss · 1,722 tokens

fieldflow AGENTS.md

Instructions for guillaumegay13/fieldflow, covering repository guidelines, project structure & module organization, current product scope, build, test, and development commands and coding style & naming conventions.

guillaumegay13/fieldflow · 760 tokens

tray-api-ai-plugin AGENTS.md

Instructions for tray-tecnologia/tray-api-ai-plugin, covering tray api plugin, regras obrigatórias para toda sessão, autenticação, url e formato and rate limit.

tray-tecnologia/tray-api-ai-plugin · 2,529 tokens

tray-api-ai-plugin copilot-instructions.md

Instructions for tray-tecnologia/tray-api-ai-plugin, covering tray api plugin, regras obrigatórias para toda integração tray, autenticação oauth 2.0, formato de requisições and rate limit.

tray-tecnologia/tray-api-ai-plugin · 1,646 tokens

tray-api-ai-plugin CLAUDE.md

Instructions for tray-tecnologia/tray-api-ai-plugin, covering tray api plugin — contexto para claude, regras obrigatórias, bloco mandatory e lint de skills, validação local and busca em docs.

tray-tecnologia/tray-api-ai-plugin · 1,730 tokens

substack-gateway-oss AGENTS.md

Instructions for jakub-k-slys/substack-gateway-oss, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and testing guidelines.

jakub-k-slys/substack-gateway-oss · 803 tokens