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.
npx agentmods add instructions/coderzc/open-xiaoai-bridge/agents-mdgit clone --depth 1 https://github.com/coderzc/open-xiaoai-bridgeWrote 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/coderzc/open-xiaoai-bridge/agents-md)<a href="https://agentmods.dev/instructions/coderzc/open-xiaoai-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/coderzc/open-xiaoai-bridge/agents-md.svg" alt="Measured on agentmods" 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 | $0.05359 | $0.05359 |
| Opus 5 | $0.02679 | $0.02679 |
| Sonnet 5 | $0.01072 | $0.01072 |
| Haiku 4.5 | $0.00536 | $0.00536 |
Grade A, and why
open-xiaoai-bridge 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 386 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
小爱音箱与外部 AI 服务(小智 AI、OpenClaw)的桥接器。 接管音箱音频输入输出,实现与第三方 AI 的对话。
系统架构
详见 README.md 系统架构(含 Mermaid 流程图和各模块工作流程)。
项目结构
open-xiaoai-bridge/
├── main.py # 入口:解析环境变量,启动 MainApp
├── config.py # 用户配置(唤醒词、路由钩子、TTS、OpenClaw 等)
├── core/
│ ├── app.py # MainApp 主控制器(单例,管理生命周期)
│ ├── xiaoai.py # XiaoAI 设备接入 / 事件桥接
│ ├── xiaoai_conversation.py # 小爱连续对话策略
│ ├── xiaozhi.py # 小智 AI WebSocket 协议客户端
│ ├── openclaw.py # OpenClaw 网关客户端(连接、消息、TTS 播放)
│ ├── openclaw_conversation.py # OpenClaw 连续对话循环(VAD → ASR → Agent → TTS)
│ ├── wakeup_session.py # 小智唤醒会话状态机
│ ├── ref.py # 全局引用注册表(get/set 依赖注入)
│ ├── models/ # 模型文件(KWS/VAD/ASR,.gitignore 排除)
│ ├── assets/sounds/ # 音效(tts_notify.mp3 等)
│ ├── services/
│ │ ├── speaker.py # SpeakerManager 音箱硬件控制
│ │ ├── api_server.py # HTTP REST API(aiohttp)
│ │ ├── audio/
│ │ │ ├── stream.py # GlobalStream 全局音频流(多路输入广播)
│ │ │ ├── codec.py # 音频编解码
│ │ │ ├── vad/silero.py # Silero VAD 语音活动检测(ONNX)
│ │ │ ├── kws/sherpa.py # Sherpa KWS 关键词唤醒
│ │ │ └── asr/sherpa.py # Sherpa ASR 离线语音识别(SenseVoice)
│ │ ├── tts/doubao.py # 豆包 TTS 客户端(火山引擎)
│ │ └── protocols/
│ │ ├── websocket_protocol.py # 小智 WebSocket 协议实现
│ │ └── typing.py # 协议类型定义
│ └── utils/
│ ├── logger.py # 彩色日志(XiaozhiLogger 单例)
│ ├── config.py # ConfigManager(嵌套路径查询、热重载)
│ ├── config_loader.py # config.py 动态导入
│ ├── base.py # 基础工具
│ └── file.py # 文件工具
├── native/ # Rust PyO3 扩展(maturin 编译)
│ └── src/
│ ├── lib.rs # 模块入口:on_output_data, start_server, stop/start_recording, stop/start_playing
│ ├── server.rs # WebSocket 音频服务器(TCP :4399)
│ ├── python.rs # Python 回调注册中心(HashMap)
│ ├── macros.rs # 辅助宏
│ └── tts/ # TTS 音频处理(流式、PCM 直通、MP3 解码)
├── app/openclaw/ # OpenClaw 设备身份存储(Ed25519 密钥)
├── skills/xiaoai-tts/ # Agent 工具:通过 HTTP API 控制小爱播放
└── tests/ # 测试脚本
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.
- 5d ago First seen · 386 lines · 5,359 tokens per session scan A 90e352404dc3
open-xiaoai-bridge AGENTS.md is an instructions file published in the GitHub repository coderzc/open-xiaoai-bridge (347 stars, last pushed 1mo ago), licensed MIT. It adds 5,359 tokens to every session, about $0.0268 per session on Opus 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.
Other instructions, from other repositories
rosclaw AGENTS.md
AGENTS.md instructions for ros-claw/rosclaw, covering rosclaw agent instructions, runtime boundary, tool policy, robot integration setup and capability apps.
rosclaw CLAUDE.md
Claude Code instructions for ros-claw/rosclaw, covering claude.md — rosclaw project onboarding, rosclaw runtime boundary (managed), safety contract (p0), robot integration setup and capability apps.
zeroclaw CLAUDE.md
Claude Code instructions for zeroclaw-labs/zeroclaw, covering claude.md — zeroclaw (claude code), claude code settings, hooks and slash commands.
clawdi AGENTS.md
AGENTS.md instructions for Clawdi-AI/clawdi, covering clawdi, oss boundary, repository map, local end-to-end and verification.
BootAgent AGENTS.md
AGENTS.md instructions for MaimoryLab/BootAgent, covering bootagent 开发约定, 目录, 本地命令, codegraph and 代码边界.
lobu AGENTS.md
Instructions for lobu-ai/lobu, covering repo map, unrecoverable — never do these, facts you cannot derive, ship a change and how to work.