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.
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.
curl -O https://raw.githubusercontent.com/HKUDS/nanobot/main/AGENTS.mdgit clone --depth 1 https://github.com/HKUDS/nanobotWrote 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.
[](https://agentmods.dev/instructions/hkuds/nanobot/agents-md)<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.
<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>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.
| Model | Per session | Once 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 |
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- nanobot-render AGENTS.md — 92% identical, 95 lines differ
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 inCONTRIBUTING.md. - Do not manually wrap prose in Markdown files. Keep each paragraph on one source line; use line breaks only for Markdown structure.
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.
- 15d ago Changed · +1 lines · +45 tokens per session a8b5c55f3a9a
- 20d ago Changed · +1 lines · +26 tokens per session 1a1adf0b2084
- 28d ago Changed · +1 lines · +27 tokens per session fd4349b75c95
- 1mo ago Changed · +1 lines · +23 tokens per session f2fecc2e6575
- 1mo ago Changed · -66 lines · -970 tokens per session a93ee44bd642
- 2mo ago First seen · 87 lines · 1,289 tokens per session scan A 6a0ffce3086f
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.
nanobot AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nanobot AGENTS.mdHKUDS/nanobot | Instructions file | 50k | today | MIT | A | 440 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |