LLM-dev-demo AGENTS.md

Repository instructions for a collection of self-contained lessons demonstrating large-language-model applications, including agents, MCP, retrieval, and database queries.

In plain words
What is it for?
Use them when adding or modifying demos, running experiments, changing dependencies, or updating the accompanying Chinese handbook and README files.
Why use it?
They explain how to manage API keys, dependencies, model settings, demos, and matching documentation without exposing secrets.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/a3rdlab/llm-dev-demo/agents-md
Clone the repo
git clone --depth 1 https://github.com/A3RDLab/LLM-dev-demo

Made for: Codex, OpenCode.

Per session 1,682 This file is loaded in full into every session.
When invoked 1,682 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.01682 $0.01682
Opus 5 $0.00841 $0.00841
Sonnet 5 $0.00336 $0.00336
Haiku 4.5 $0.00168 $0.00168

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

Security

Grade A, and why

LLM-dev-demo AGENTS.md scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- 企业专属实例的 Key 常有模型白名单,跑 demo 前先用 `curl $API_BASE/models` 探测可用模型。
AGENTS.md · 69 lines

How it starts

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

AGENTS.md

This file provides guidance to Qoder (qoder.com) when working with code in this repository.

仓库性质

这是一个 LLM 应用开发教学实验合集,不是单一应用:每个 demo 是自包含脚本,按学习路线递进(基础调用 → 结构化输出 → Function Calling → LangGraph → Agent Harness → MCP → RAG → Text2SQL → 完整项目)。根目录 实验手册.md 是面向学员的引导式手册,其中的命令均经实机验证——修改 demo 的用法、参数或依赖后,必须同步更新实验手册与相关 README,保持文档与代码一致。

环境与密钥约定

  • 密钥一律走仓库根目录 .env(模板见 .env.example),切勿硬编码 API Key。关键变量:API_KEY / API_BASE(OpenAI 兼容端点)/ MODEL / EMBED_MODEL / DASHSCOPE_API_KEY
  • 所有脚本在启动时用 load_dotenv() 按相对路径显式加载根目录 .env(子目录脚本用 Path(__file__).resolve().parent.parent / ".env" 这类写法定位),新增脚本应保持此约定。
  • 所有 demo 支持 --model / --api_key / --base_url 命令行参数覆盖默认值(默认平台为硅基流动)。切换平台示例:--base_url https://dashscope.aliyuncs.com/compatible-mode/v1 --api_key $DASHSCOPE_API_KEY
  • 企业专属实例的 Key 常有模型白名单,跑 demo 前先用 curl $API_BASE/models 探测可用模型。

依赖管理

根目录 requirements.txt 管理公共依赖;子项目独立依赖不得混入根 requirements,各自维护:

子项目 依赖位置 安装/运行
function_call_and_agent_demo/excel-process/ 自己的 requirements.txt streamlit run app.py(需本机有 Docker,llm-sandbox 基于容器)
function_call_and_agent_demo/agent_harness_demo/ 自己的 requirements.txt(deepagents) python agent_harness_demo.py
finance_doc_review/ pyproject.toml(uv) uv venv .venv --python 3.12 && uv pip install -p .venv/bin/python -e .,然后 finance-doc-review samples/xxx.txt [--json]

版本约束用 >= 宽松策略,但 mcp[cli] 必须锁 <2:2.0 移除了 mcp.server.fastmcp 高层封装,MCP demo 依赖 1.x。

常用命令

# 根目录脚本(示例)
python first_llm_app.py
python structured_output_demo.py
python mini_rag_demo.py --query "..." --top_k 3     # --rebuild 强制重建向量索引
python text2sql_demo.py                              # 依赖根目录 Chinook.sqlite
python wiki_kb_agent_demo/kb_agent.py --once "问题"

# Function Calling / Agent
python function_call_and_agent_demo/demo-agent-with-tools-arg.py
python function_call_and_agent_demo/langgraph_demo/langgraph_agent_scaffold.py --query "..."
python function_call_and_agent_demo/mcp_server_demo.py     # MCP 服务端
python function_call_and_agent_demo/mcp_client_agent_demo.py  # MCP 客户端 agent

# Streamlit 应用
streamlit run function_call_and_agent_demo/excel-process/app.py

Read the full file on GitHub · 69 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. 2d ago First seen · 69 lines · 1,682 tokens per session scan A a9fe52ef28d7

Subscribe to this mod's changes

LLM-dev-demo AGENTS.md is an instructions file published in the GitHub repository A3RDLab/LLM-dev-demo (44 stars, last pushed 10d ago), licensed Apache-2.0. It adds 1,682 tokens to every session, about $0.0084 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.