nanobot-render: Instructions file for Codex

AGENTS.md

nanobot-render AGENTS.md is an instructions file for Codex, OpenCode from render-examples/nanobot-render. It costs 1,248 tokens per session, scanned A, a copy of nanobot AGENTS.md, MIT.

Repository instructions for nanobot-render, a Python agent framework with a React and TypeScript web interface.

In plain words
What is it for?
Use them when changing nanobot-render, running Python or web-interface checks, building the web interface, or starting its gateway.
Why use it?
They give coding agents the project context, development commands, test and lint commands, and a high-level view of how messages move through the system.

Instructions file for CodexOpenCode

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

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is # Build outputs to ../nanobot/web/dist (bundled into the Python wheel).

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/render-examples/nanobot-render/agents-md"><img src="https://agentmods.dev/badge/instructions/render-examples/nanobot-render/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,248 This file is loaded in full into every session.
When invoked 1,248 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 92% copy Near-identical to another mod 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.01248 $0.01248
Opus 5.5 $0.00499 $0.00499
Sonnet 5.5 $0.00250 $0.00250
Haiku 4.5 $0.00125 $0.00125

Measured 2mo ago against content hash 4b62dfb59b8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nanobot-render 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 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.

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

This is a copy

92% identical to nanobot AGENTS.md — 95 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 82 lines

How it starts

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

This file provides guidance to AI coding agents working with this repository.

Project Overview

nanobot is a lightweight, open-source AI agent framework written in Python with a React/TypeScript WebUI. It centers around a small agent loop that receives messages from chat channels, invokes an LLM provider, executes tools, and manages session memory.

Development Commands

# Python: run single test / lint
pytest tests/test_openai_api.py::test_function -v
ruff check nanobot/

# WebUI: dev server (proxies API/WS to gateway :8765), build, test
# Build outputs to ../nanobot/web/dist (bundled into the Python wheel)
cd webui && bun run dev      # or NANOBOT_API_URL=... bun run dev
cd webui && bun run build
cd webui && bun run test

# Gateway
nanobot gateway

High-Level Architecture

Core Data Flow

Messages flow through an async MessageBus (nanobot/bus/queue.py) that decouples chat channels from the agent core:

  1. Channels (nanobot/channels/) receive messages from external platforms and publish InboundMessage events to the bus.
  2. AgentLoop (nanobot/agent/loop.py) consumes inbound messages, builds context, and coordinates the turn.
  3. AgentRunner (nanobot/agent/runner.py) handles the actual LLM conversation loop: send messages to the provider, receive tool calls, execute tools, and stream responses.
  4. Responses are published as OutboundMessage events back to the appropriate channel.

Key Subsystems

  • Agent Loop (nanobot/agent/loop.py, runner.py): The core processing engine. AgentLoop manages session keys, hooks, and context building. AgentRunner executes the multi-turn LLM conversation with tool execution.
  • LLM Providers (nanobot/providers/): Provider implementations (Anthropic, OpenAI-compatible, OpenAI Responses API, Azure, Bedrock, GitHub Copilot, OpenAI Codex, etc.) built on a common base (base.py). Includes image generation (image_generation.py) and audio transcription (transcription.py). factory.py and registry.py handle instantiation and model discovery.
  • Channels (nanobot/channels/): Platform integrations (Telegram, Discord, Slack, Feishu, Matrix, WhatsApp, QQ, WeChat, WeCom, DingTalk, Email, MoChat, MS Teams, WebSocket). manager.py discovers and coordinates them. Channels are auto-discovered via pkgutil scan + entry-point plugins.
  • Tools (nanobot/agent/tools/): Agent capabilities exposed to the LLM: filesystem (read/write/edit/list), shell execution (with sandbox backends), web search/fetch, MCP servers, cron, notebook editing, subagent spawning, long-running tasks / sustained goals (long_task.py), image generation, and self-modification. Tools are auto-discovered via pkgutil scan + entry-point plugins.
  • Memory (nanobot/agent/memory.py): Session history persistence with Dream two-phase memory consolidation. Uses atomic writes with fsync for durability.
  • Session Management (nanobot/session/): Per-session history, context compaction, TTL-based auto-compaction (manager.py), and sustained goal state tracking (goal_state.py).
  • Config (nanobot/config/schema.py, loader.py): Pydantic-based configuration loaded from ~/.nanobot/config.json. Supports camelCase aliases for JSON compatibility.
  • WebUI (webui/): Vite-based React SPA that talks to the gateway over a WebSocket multiplex protocol. The dev server proxies /api, /webui, /auth, and WebSocket traffic to the gateway.
  • API Server (nanobot/api/server.py): OpenAI-compatible HTTP API (/v1/chat/completions, /v1/models) for programmatic access.
  • Command Router (nanobot/command/): Slash command routing and built-in command handlers.
  • Heartbeat (nanobot/templates/HEARTBEAT.md): Periodic task list checked via cron jobs (legacy dedicated service removed).
  • Pairing (nanobot/pairing/): DM sender approval store with persistent pairing codes per channel.
  • Skills (nanobot/skills/): Built-in skill definitions (long-goal, cron, github, image-generation, etc.) loaded into agent context.
  • Security (nanobot/security/): PTH file guard and other security measures activated at CLI entry.

Read the full file on GitHub · 82 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 · 82 lines · 1,248 tokens per session scan A 4b62dfb59b8a

Subscribe to this mod's changes

nanobot-render AGENTS.md is an instructions file published in the GitHub repository render-examples/nanobot-render (5 stars, last pushed 3mo ago), licensed MIT. It adds 1,248 tokens to every session, about $0.0050 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 92% identical to nanobot AGENTS.md, differing in 95 lines, and is treated as a copy.

Related

nanobot-render AGENTS.md compared with instructions from other repositories

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