LightAgent: Instructions file for Codex

AGENTS.md

LightAgent AGENTS.md is an instructions file for Codex, OpenCode from yideng966/LightAgent. It costs 19,455 tokens per session, scanned A, original, MIT.

Project instructions for LightAgent, a Python application that connects AI agents to multiple messaging channels, models, voice and translation services, tools, skills, memory, and knowledge bases.

In plain words
What is it for?
Use them when adding or changing channels, models, voice or translation routing, agent tools, MCP connections, skills, memory, knowledge bases, plugins, CLI commands, tests, or deployment.
Why use it?
They explain the project's boundaries, data flow, directories, development rules, and verification steps so changes are made in the right place.

Instructions file for CodexOpenCode

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

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/agent/.lightagent.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/yideng966/LightAgent/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/yideng966/LightAgent

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yideng966/lightagent/agents-md/github.svg)](https://agentmods.dev/instructions/yideng966/lightagent/agents-md)
Your own site
<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.

agentmods 80×15 button for LightAgent AGENTS.md

Your own site · 80×15
<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>
Per session 19,455 This file is loaded in full into every session.
When invoked 19,455 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 original No closer match found 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.19455 $0.19455
Opus 5.5 $0.07782 $0.07782
Sonnet 5.5 $0.03891 $0.03891
Haiku 4.5 $0.01946 $0.01946

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

Security

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.

AGENTS.md · 678 lines

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/

项目核心数据流:

  1. app.py 加载配置并启动 ChannelManager。
  2. channel/channel_factory.py 根据 channel_type 创建 Web、IM 或终端渠道。
  3. 渠道把消息包装为 bridge.context.Context。
  4. bridge/bridge.py 根据配置选择聊天模型、语音、翻译或 Agent 模式。
  5. Agent 模式通过 bridge/agent_bridge.py 进入 agent/,按工具、技能、记忆与知识库上下文执行任务。
  6. 回复通过原渠道发送回用户。

主要目录职责

  • 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目录不要提交开发过程截图。

Read the full file on GitHub · 678 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 · 678 lines · 19,455 tokens per session scan A 53e2ccd264c6

Subscribe to this mod's changes

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.

Related

LightAgent AGENTS.md compared with instructions from other repositories

LightAgent AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
LightAgent AGENTS.mdyideng966/LightAgentInstructions file232mo agoMITA19,455Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode