Borrowing it
Nothing to install: this file belongs to yideng966/LightAgent. 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/yideng966/LightAgent/master/AGENTS.mdgit clone --depth 1 https://github.com/yideng966/LightAgentWrote 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/yideng966/lightagent/agents-md)<a href="https://agentmods.dev/instructions/yideng966/lightagent/agents-md"><img src="https://agentmods.dev/badge/instructions/yideng966/lightagent/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/yideng966/lightagent/agents-md"><img src="https://agentmods.dev/badge/instructions/yideng966/lightagent/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.19455 | $0.19455 |
| Opus 5.5 | $0.07782 | $0.07782 |
| Sonnet 5.5 | $0.03891 | $0.03891 |
| Haiku 4.5 | $0.01946 | $0.01946 |
Grade A, and why
LightAgent 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.
How it starts
The opening of the file, as written. The whole thing — 678 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LightAgent 项目协作指南
本文件面向在本仓库内工作的 AI Agent 与开发者。目标是先理解项目边界,再用最小改动完成需求,并保留可验证、可回退的交付路径。
项目概览
LightAgent 是一个以 Python 为主的多渠道 Agent Harness 项目,包含:
- 后端运行入口:
app.py - 配置中心:
config.py、config-template.json - 消息渠道层:
channel/ - 模型、语音、翻译路由:
bridge/、models/、voice/、translate/ - Agent 核心协议、工具、技能、记忆、知识库:
agent/ - 插件系统:
plugins/ - CLI:
cli/ - 历史桌面端归档:
desktop/(停止维护,不参与构建发布) - 文档站内容:
docs/ - 回归测试:
tests/
项目核心数据流:
app.py加载配置并启动ChannelManager。channel/channel_factory.py根据channel_type创建 Web、IM 或终端渠道。- 渠道把消息包装为
bridge.context.Context。 bridge/bridge.py根据配置选择聊天模型、语音、翻译或 Agent 模式。- Agent 模式通过
bridge/agent_bridge.py进入agent/,按工具、技能、记忆与知识库上下文执行任务。 - 回复通过原渠道发送回用户。
主要目录职责
agent/protocol/:Agent 执行协议、流式执行、动作与结果模型。agent/tools/:内置工具实现。新增工具时优先继承BaseTool,并确认agent/tools/__init__.py与ToolManager加载路径。agent/tools/mcp/:MCP 客户端与动态工具注册。修改时注意并发加载、热更新和子进程生命周期。agent/skills/:技能加载、过滤、启停配置与 prompt 格式化。内置技能在根目录skills/,用户技能通常在 workspace 的skills/。agent/memory/、agent/knowledge/:长期记忆、向量/关键词索引、知识库服务。bridge/:模型、语音、翻译、Agent 模式的统一路由层。改动这里会影响所有渠道。channel/:不同平台渠道。公共逻辑在channel/channel.py、channel/chat_channel.py;新增渠道需接入channel/channel_factory.py。channel/wechat_group/:个人微信群通道实现。Python 层负责 LightAgent 渠道适配、配置读取、上下文包装和回复发送;sidecar/下的 Node.js Wechaty 进程负责扫码登录、群列表、群消息事件和微信侧真实发送。models/:不同 LLM Provider 的 Bot 与 Session。新增 Provider 要同步common/const.py、models/bot_factory.py和相关配置/文档。plugins/:聊天命令插件与插件管理器。不要把 Agent 工具和插件混为一类。voice/、translate/:ASR/TTS 与翻译 Provider。desktop/:已停止维护的 Electron 历史源码归档,不再开发、修复、构建或发布;Python 后端app.py不属于桌面端,继续作为项目主入口维护。docs/:英文、中文。日文文档(docs/ja/)已停止维护,不再更新。涉及用户可见能力变更时,只需更新英文和中文对应文档。tests/:unittest风格回归测试,很多测试通过 stub/mocking 避免真实网络和外部服务。
本地运行与验证
默认在 Windows PowerShell 中工作。不要使用 && 串联命令。
访问 GitHub 时如果直连请求超时或不稳定,可以使用本地代理 http://192.168.3.5:1082 重试;仅在网络访问场景使用该代理,不要把代理地址写入项目运行配置或代码默认值。
整理或创建 GitHub issue 时,一律提交到 yideng966/LightAgent 项目;标题和正文描述应使用简体中文,避免默认写英文;提交时必须注明合适的 label,至少明确是 bug、功能需求、文档或其他类型;不要默认使用当前 remote、fork 或其他仓库;docs\images目录不要提交开发过程截图。
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.
- 2mo ago First seen · 678 lines · 19,455 tokens per session scan A 53e2ccd264c6
LightAgent AGENTS.md is an instructions file published in the GitHub repository yideng966/LightAgent (23 stars, last pushed 2mo ago), licensed MIT. It adds 19,455 tokens to every session, about $0.0778 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.
LightAgent AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| LightAgent AGENTS.mdyideng966/LightAgent | Instructions file | 23 | 2mo ago | MIT | A | 19,455 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |