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.
git clone --depth 1 https://github.com/Lawofall/AgentCoreWrote 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/rules/lawofall/agentcore/local-llm-dogfood)<a href="https://agentmods.dev/rules/lawofall/agentcore/local-llm-dogfood"><img src="https://agentmods.dev/badge/rules/lawofall/agentcore/local-llm-dogfood.svg" alt="Measured on agentmods" 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.00037 | $0.01361 |
| Opus 5 | $0.00018 | $0.00681 |
| Sonnet 5 | $0.00007 | $0.00272 |
| Haiku 4.5 | $0.00004 | $0.00136 |
Grade A, and why
local-llm-dogfood 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 yesterday.
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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
本地 LLM dogfood 凭据
两条起步路权威 → 本地开发 · 两条起步路。本规则只写 How。
症状 → 原因 → 对策
- 症状:eval / 探针报缺 key、或踩过期 / 线上池的
PLATFORM_API_KEY。 - 原因:clone 默认应走测试账号自己的 Key,不是平台 key;同构档也必须用本机独立平台 Key。
- 对策(默认档):
dev/devpassword(DEV_USERNAME/DEV_PASSWORD可覆盖)+ 账号已配 OpenCode Zen(如deepseek-v4-flash-free);先uv run python scripts/seed_dev_user.py,再设置页或scripts/set_dev_llm_key.py。 - 对策(同构档):本机
.envBILLING_MODE=platform+ 独立PLATFORM_*(Go +deepseek-v4-flash)+ 重启 api;uv run python scripts/set_quota.py dev --unlimited。禁止复制生产池 Key。
改 prompt / runtime 后仍像旧核
- 症状:刚跑过
start-dev-server.ps1,桌面本机对话的cost.prompt_assembled仍与改前逐字节相同(ceo_prompt字数 /assembly_hash不变),或行为完全没变。 - 原因:本机传统回合在 sidecar 里
import,不在 API 进程。清树脚本只杀-m agentcore,故意不碰 sidecar。 - 对策:完全退出并重开桌面后再开新对话。对账要看到新的
sidecar.ready,且本场装配哈希相对改前变化。云协作或通用·进阶关掉「允许本机执行」才是重启 API 即加载。权威 → 本地开发 · 改代码后哪边会加载。
真跑入口
- 产品回合:
scripts/archive/probe_turn.py(HTTP,与桌面同路)。 - 多端同权 / 对话级订阅:
scripts/archive/probe_multiend.py——挂两条真 SSE(一条扮桌面、一条扮手机?follow=true)断言帧到没到对端。多端类缺陷单测普遍抓不到(测里的回合是瞬时的),这条真跑就抓出过「对端晚 12.6s 才看到回合」。连跑 4 场景约十几个回合,容易打满限流窗(见下)。 - Eval / 多数探针:
EvalHarness→await eval_credentials()(已回落本地账号 Key;异步路径必须 await,勿在 running loop 里同步调_eval_credentials以免 DB Key 静默失败回落到过期 PLATFORM)。
优先级(勿颠倒)
EVAL_DEEPSEEK_*(显式覆盖)- 本地库测试账号自己的 Key(默认档;模型跟账号默认,常为
deepseek-v4-flash-free) PLATFORM_*(最后;默认档 禁止依赖。同构档的产品对话走这里,eval / 探针仍先走 1–2,除非你故意在测平台代付)
限流窗:连跑多个真回合会触发 llm.rate_limit_no_retry,回合以 error 帧收口、无正文——别把它误判成产品缺陷(症状:content_delta×0 但 message_end 正常)。小时级窗宜等不宜硬重试。
归因前先换模型对照
- 症状:产品 AI「不听话」——无视工具回执与 skill 明令(如已告知无执行环境仍手抄数据、仍宣称已校验),或某一跳墙钟离谱。
- 原因:免费档(
*-free)不只是慢和限流,行为也不同:会把数据搬进推理再交差。同一 prompt 换付费档可能直接消失。 - 对策:下「提示词压不住 / 该加闸 / 编排太贵」这类结论之前,先换官方
deepseek-v4-flash跑同一场景,对照 dev 的*-free档。免费档不只是慢,行为也不同(会把数据搬进推理再交差);贵的经常是模型不是工具表。同构档已经是付费 Flash,对照时不要再当成免费档。 - 反向同样成立:别拿「换付费档就没了」把问题判给模型档位然后收手。无执行分支上有没有「够得着的完整交付」(结构报告 + 待跑脚本 + 一句下一步)同样决定会不会手抄、会不会宣称已校验。
- 验证时别同时换两个变量:改完 prompt / skill,要用失败基线那个模型复跑。拿付费档去验刚改的 skill,好转可被换模型单独解释,等于没验。
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.
- yesterday Changed · +3 lines · +7 tokens per session c7f2494f1998
- 2d ago Changed 0867347b8faa
- 8d ago First seen · 43 lines · 30 tokens per session scan A 7f8a8f9261b6
local-llm-dogfood is a cursor rule published in the GitHub repository Lawofall/AgentCore (81 stars, last pushed today), licensed MIT. It adds 37 tokens to every session and 1,361 once invoked, about $0.0002 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.
Other cursor rules, from other repositories
project-overview
Core project architecture, patterns, and conventions for the AI Documentation Generator.
cursorrules
You are an AI agent building the module: {{MODULENAME}} This module is part of the Mnemosyne Neural OS ecosystem by XPACEGEMS LLC.
core-project-context
Canonical project context and ownership rules.
backend-python
Python and FastAPI standards for the backend.
dashboard-typescript
React and TypeScript standards for the operator dashboard.
supabase-safety
Supabase migration, RLS and data security constraints.