Borrowing it
Nothing to install: this file belongs to coderzc/open-xiaoai-bridge. 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/coderzc/open-xiaoai-bridge/main/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/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/coderzc/open-xiaoai-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/coderzc/open-xiaoai-bridge/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.05471 | $0.05471 |
| Opus 5.5 | $0.02188 | $0.02188 |
| Sonnet 5.5 | $0.01094 | $0.01094 |
| Haiku 4.5 | $0.00547 | $0.00547 |
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 1mo 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 — 389 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)
│ │ ├── tts/router.py # 统一 TTS provider 路由与播放
│ │ ├── 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 客户端(火山引擎)
│ │ ├── tts/openai.py # OpenAI-compatible TTS 协议客户端
│ │ ├── tts/mlx_audio.py # MLX-Audio TTS provider(复用 OpenAI 协议客户端)
│ │ └── 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.
- 1mo ago Changed · +3 lines · +112 tokens per session 4fea45f90a7a
- 1mo 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 (425 stars, last pushed 15d ago), licensed MIT. It adds 5,471 tokens to every session, about $0.0219 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.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.