OpenVitamin: Instructions file for Codex

AGENTS.md

OpenVitamin AGENTS.md is an instructions file for Codex, OpenCode from fengzhizi715/OpenVitamin. It costs 1,520 tokens per session, scanned A, original, Apache-2.0.

A project-wide rulebook for OpenVitamin, a local web platform whose FastAPI backend routes AI requests and whose plugins provide additional capabilities.

In plain words
What is it for?
Use it when designing or changing gateway agents, model adapters, plugins, or the Vue and Python parts of the platform.
Why use it?
It sets boundaries for how agents and plugins work, including user control, predictable behavior, local processing, and keeping model calls behind the central gateway.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/fengzhizi715/openvitamin/agents-md"><img src="https://agentmods.dev/badge/instructions/fengzhizi715/openvitamin/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,520 This file is loaded in full into every session.
When invoked 1,520 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.01520 $0.01520
Opus 5 $0.00760 $0.00760
Sonnet 5 $0.00304 $0.00304
Haiku 4.5 $0.00152 $0.00152

Measured 9d ago against content hash 9e6be5810a20, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

OpenVitamin 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 9d 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 · 245 lines

How it starts

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

AGENTS.md — Inference Gateway & Plugin Governance

本文件是本项目中 优先级最高的行为与架构约束文档之一

所有 Agent / Plugin / 推理适配层的设计与实现,必须遵循本规范。


1. 项目与技术栈对齐说明

本项目是一个 Web 形态的本地 AI 推理平台,整体架构为:

  • 前端(UI 层):Vue 3 + Vite + Tailwind CSS + shadcn-vue

  • 后端(核心中枢):Python + FastAPI

  • 角色定位

    • Web UI 只是“控制台”
    • FastAPI 推理网关是“大脑”
    • Agent / Plugin 是“能力模块”
  • 后端的程序,都要在虚拟环境 conda 中运行。

本文件定义的 Agent,并不等同于“自主智能体”,而是指:

  • 推理网关中的系统模块
  • 推理后端的统一封装代理
  • 以插件形式加载的能力增强模块

2. 核心设计原则(Core Principles)

所有 Agent / Plugin 必须遵循 以下原则:

2.1 User-in-Control(用户始终掌控)

  • Agent 不得擅自改变用户意图
  • 默认不启用任何“自动决策”或“隐式代理”行为

2.2 Gateway-Centric(以推理网关为中心)

  • 所有模型调用必须经过 FastAPI 推理网关
  • 前端不得直连模型、推理引擎或工具

2.3 Determinism over Magic(确定性优于魔法)

  • 禁止隐藏 Prompt
  • 禁止隐式参数注入
  • 行为必须可预测、可复现

2.4 Plugin-first(插件优先)

  • 新能力优先设计为插件
  • 插件必须可独立启停、替换、升级

2.5 Local-first & Privacy-first(本地与隐私优先)

  • 默认假设系统运行在 无外网环境
  • 不得未经授权进行任何数据外传

3. Agent 分类(Agent Taxonomy)

3.1 Gateway System Agents(系统代理)

位置:FastAPI 推理网关核心层

职责:

  • 请求规范化(Request Normalization)
  • 模型路由与选择
  • 流式响应协调(SSE / Streaming)
  • 错误捕获与恢复

约束:

  • ❌ 不得包含业务逻辑
  • ❌ 不得访问外部网络或文件系统

3.2 Model Agents(模型代理 / 推理适配层)

对不同推理后端的统一封装。

示例:

  • OpenAI / API Agent
  • Ollama Agent
  • vLLM Agent
  • llama.cpp Agent

职责:

  • 将统一请求转换为后端调用
  • 统一流式输出格式
  • 明确暴露模型能力边界

约束:

  • ❌ 不得修改用户输入语义
  • ❌ 不得注入隐藏 Prompt 或系统提示

3.3 Capability Agents(能力插件)

插件形式 挂载在推理流程中的增强模块。

示例:

  • RAG Agent(本地知识库)
  • Tool Calling Agent
  • Memory / History Agent
  • Workflow / Agent Agent

职责:

  • 明确声明权限与依赖
  • 对输入输出负责

约束:

  • 必须可被禁用
  • 必须可观测、可审计

4. Agent / Plugin 生命周期

所有 Agent / Plugin 必须遵循以下生命周期:

load → initialize → ready → execute → teardown

规则:

  • Agent 应尽量无状态
  • 必须支持优雅失败(graceful failure)

5. Agent / Plugin 接口规范

每个 Agent / Plugin 必须声明

  • name(名称)
  • type(system / model / capability)
  • version(版本)
  • stage(pre / post / tool / router)
  • input schema
  • output schema
  • required permissions

可选声明

  • configuration schema
  • 前端 UI Hint(供 Web UI 自动渲染配置面板)

Read the full file on GitHub · 245 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. 9d ago First seen · 245 lines · 1,520 tokens per session scan A 9e6be5810a20

Subscribe to this mod's changes

OpenVitamin AGENTS.md is an instructions file published in the GitHub repository fengzhizi715/OpenVitamin (76 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 1,520 tokens to every session, about $0.0076 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.

Related

Other instructions, from other repositories

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.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens