ii-agent AGENTS.md

ii-agent AGENTS.md is an instructions file for Codex, OpenCode from Intelligent-Internet/ii-agent. It costs 3,294 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for II-Agent, an AI service for internet research, machine-learning engineering, and scientific work. They describe its project structure, commands, architecture, and development rules.

In plain words
What is it for?
Starting the service, checking its health, understanding its modules, and making changes to authentication, billing, APIs, frontend events, or other documented areas.
Why use it?
They give an agent the context needed to work safely in the right part of the codebase. They also point to guidance for billing, security, frontend behavior, and reliability.

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/intelligent-internet/ii-agent/agents-md
Clone the repo
git clone --depth 1 https://github.com/Intelligent-Internet/ii-agent

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 ii-agent AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/intelligent-internet/ii-agent/agents-md.svg)](https://agentmods.dev/instructions/intelligent-internet/ii-agent/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/intelligent-internet/ii-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/intelligent-internet/ii-agent/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,294 This file is loaded in full into every session.
When invoked 3,294 The same file — it is already loaded in full.
Security scan A 1 finding. 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.03294 $0.03294
Opus 5 $0.01647 $0.01647
Sonnet 5 $0.00659 $0.00659
Haiku 4.5 $0.00329 $0.00329

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

Security

Grade A, and why

ii-agent AGENTS.md scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl localhost:8000/health # Verify
AGENTS.md · 277 lines

How it starts

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

II-Agent Contributor Guide

This file is the entry point for agents working in this repository. It provides the architecture overview plus a map to deeper documentation.

Read CLAUDE.md for the full development reference (patterns, billing system, dependency injection, code examples).

Quick Start

uv sync --frozen          # Install dependencies
./scripts/start.sh        # Start the server
curl localhost:8000/health # Verify

Repository Map

Resource What it covers
CLAUDE.md Full development guide: patterns, billing, dependency injection, code examples
docs/DESIGN.md Design patterns: service pattern, Dep aliases, domain module structure
docs/PLANS.md How to write and maintain execution plans
docs/RELIABILITY.md Billing reliability, cron recovery, Redis fallbacks
docs/SECURITY.md Auth flow (OAuth, JWT, API keys), secrets management
docs/FRONTEND.md Socket.IO events, REST API surface, real-time event flow
docs/PRODUCT_SENSE.md Product principles, user personas, key journeys
docs/QUALITY_SCORE.md Per-domain quality grades and health metrics
docs/design-docs/ Indexed design decisions with verification status
docs/exec-plans/ Active and completed execution plans
docs/generated/db-schema.md Database schema reference (from SQLAlchemy models)
docs/product-specs/ Product specifications
docs/references/ LLM-optimized reference material for key dependencies

Mandatory Rules

  1. Use uv run for all Python commands (uv run pytest, uv run python ...).
  2. Run Ruff only on the Python files you changed before marking work complete (uv run ruff check --fix-only <changed_python_files>, uv run ruff format <changed_python_files>, uv run ruff check <changed_python_files>, uv run ruff format --check <changed_python_files>). If you changed no Python files, skip Ruff.
  3. Never call CreditService.deduct() directly for LLM/tool billing — use the reservation system (see CLAUDE.md Billing section).
  4. Use Dep aliases everywhere — never bare = Depends(get_x) in function signatures (see CLAUDE.md Dependency Injection Pattern).
  5. Use LLMExecutionService for any new code that calls an LLM outside the agent runtime loop.

Read the full file on GitHub · 277 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 First seen · 277 lines · 3,294 tokens per session scan A e5fc8a99d03a

Subscribe to this mod's changes

ii-agent AGENTS.md is an instructions file published in the GitHub repository Intelligent-Internet/ii-agent (3,382 stars, last pushed 18d ago), licensed Apache-2.0. It adds 3,294 tokens to every session, about $0.0165 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.