ii-agent: Instructions file for Codex

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

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

This is Intelligent-Internet/ii-agent's own configuration. It tells Codex and OpenCode how to work on ii-agent 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 ii-agent configures →

About the project

II-Agent is an open-source framework and AI agent for building applications, conducting research, and automating workflows from natural-language prompts. Developers, research teams, and enterprises use it to create mobile apps, websites, illustrated books, media, research outputs, and integrations with external services. The catalogue skills and instructions provide workflows and integrations for using II-Agent.

Intelligent-Internet/ii-agent · 3,391 stars · on GitHub · ii.inc

Reuse

Borrowing it

Nothing to install: this file belongs to Intelligent-Internet/ii-agent. 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/Intelligent-Internet/ii-agent/main/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/github.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/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 ii-agent AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.03294 $0.03294
Opus 5.5 $0.01318 $0.01318
Sonnet 5.5 $0.00659 $0.00659
Haiku 4.5 $0.00329 $0.00329

Measured 2mo ago against content hash e5fc8a99d03a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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,391 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 3,294 tokens to every session, about $0.0132 per session on Opus 5.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.

Related

ii-agent AGENTS.md compared with instructions from other repositories

ii-agent AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ii-agent AGENTS.mdIntelligent-Internet/ii-agentInstructions file3.4k2mo agoApache-2.0A3,294Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode