nanobot: Instructions file for Codex

AGENTS.md

nanobot AGENTS.md is an instructions file for Codex, OpenCode from HKUDS/nanobot. It costs 440 tokens per session, scanned A, original, MIT.

A project instruction file for AI coding agents working on nanobot, a Python framework with a React and TypeScript web interface.

In plain words
What is it for?
Working on nanobot's Python code, web interface, and gateway, including running individual tests, checking code quality, building the web interface, and starting the gateway.
Why use it?
It gives the agent the project context and the commands needed to test, lint, type-check, build, and run the software.

Instructions file for CodexOpenCode

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

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

About the project

nanobot is a small, self-hosted personal AI agent framework written in Python, providing an agent runtime that can operate through a WebUI, terminal, or chat applications. Users use it to connect language models with tools, memory, MCP integrations, scheduled automation, and multi-agent workflows. The catalogue add-ons provide skills and instructions for working with nanobot.

HKUDS/nanobot · 49,866 stars · on GitHub · nanobot.wiki

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hkuds/nanobot/agents-md"><img src="https://agentmods.dev/badge/instructions/hkuds/nanobot/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 440 This file is loaded in full into every session.
When invoked 440 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.00440 $0.00440
Opus 5.5 $0.00176 $0.00176
Sonnet 5.5 $0.00088 $0.00088
Haiku 4.5 $0.00044 $0.00044

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

Security

Grade A, and why

nanobot 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 15d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 25 lines

How it starts

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

Working on nanobot

The Python gateway owns agent execution, sessions, tools, memory, and security policy. WebUI and TUI share that runtime; keep execution and policy out of the clients.

Task-specific guidance

When working on Read
Core boundaries, extensions, or internal types .agent/design.md
Refactoring, fallbacks, or test selection .agent/simplify.md
User-facing copy, feature naming, or localization .agent/copywriting.md
Path permissions, HTTP/MCP, or shell isolation .agent/security.md
Dependency setup, WebUI transport, config, Windows, prompts, or persistence .agent/gotchas.md
Reusing verification evidence .agent/workflow.md
WebUI/host compatibility .agent/review-guide.md
Contribution or publication CONTRIBUTING.md, docs/releasing.md

Development constraints

  • Analyze the required behavior, state ownership, and root cause before extending existing code. Refactor when the structure causes the problem; a smaller diff does not justify another fallback.
  • Do not add defensive tests for hypothetical internal states or unsupported combinations. Each new test needs a reachable path and a meaningful contract to protect.
  • Do not add tests merely to prove that nonexistent behavior, removed code, or obsolete symbols are absent. Negative assertions must exercise a concrete, reachable risk and protect an observable behavioral contract; prefer testing supported actions and their results.
  • Do not run ruff format; mechanical formatting obscures git blame and creates unrelated diffs. This constraint takes precedence over the optional touched-file formatting in CONTRIBUTING.md.
  • Do not manually wrap prose in Markdown files. Keep each paragraph on one source line; use line breaks only for Markdown structure.

Read the full file on GitHub · 25 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. 15d ago Changed · +1 lines · +45 tokens per session a8b5c55f3a9a
  2. 20d ago Changed · +1 lines · +26 tokens per session 1a1adf0b2084
  3. 28d ago Changed · +1 lines · +27 tokens per session fd4349b75c95
  4. 1mo ago Changed · +1 lines · +23 tokens per session f2fecc2e6575
  5. 1mo ago Changed · -66 lines · -970 tokens per session a93ee44bd642
  6. 2mo ago First seen · 87 lines · 1,289 tokens per session scan A 6a0ffce3086f

Subscribe to this mod's changes

nanobot AGENTS.md is an instructions file published in the GitHub repository HKUDS/nanobot (49,866 stars, last pushed today), licensed MIT. It adds 440 tokens to every session, about $0.0018 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

nanobot AGENTS.md compared with instructions from other repositories

nanobot AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nanobot AGENTS.mdHKUDS/nanobotInstructions file50ktodayMITA440Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode