Borrowing it
Nothing to install: this file belongs to AXERA-TECH/Magnetar. 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/AXERA-TECH/Magnetar/main/AGENTS.mdgit clone --depth 1 https://github.com/AXERA-TECH/MagnetarWrote 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/axera-tech/magnetar/agents-md)<a href="https://agentmods.dev/instructions/axera-tech/magnetar/agents-md"><img src="https://agentmods.dev/badge/instructions/axera-tech/magnetar/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/axera-tech/magnetar/agents-md"><img src="https://agentmods.dev/badge/instructions/axera-tech/magnetar/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.04966 | $0.04966 |
| Opus 5.5 | $0.01986 | $0.01986 |
| Sonnet 5.5 | $0.00993 | $0.00993 |
| Haiku 4.5 | $0.00497 | $0.00497 |
Grade C, and why
Magnetar AGENTS.md scanned grade C with 2 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 1mo 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
`curl -fsSL https://raw.githubusercontent.com/AXERA-TECH/ax-llm/axllm/install.sh | bash`。 Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
`curl -fsSL https://raw.githubusercontent.com/AXERA-TECH/ax-llm/axllm/install.sh | bash`。 How it starts
The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本仓库包含 Magnetar 模型部署工具。所有 Agent 回复默认使用中文。
项目目标
将远程或本地浮点模型转换为 AX 芯片客户交付包:
模型 → ONNX → Pulsar2 编译 → AXMODEL → 仿真验证 → Python/C++ SDK → 交付包 → 发布
工具库
Agent 负责编排和决策。magnetar/stages/*.py 提供确定性执行函数:
| 模块 | 函数 | 用途 |
|---|---|---|
magnetar.config |
load_config() |
读取 .magnetarrc + 环境变量 |
magnetar.errors |
MagnetarError/classify_error() |
类型化错误码注册表(与 magnetar.yaml retry_on 对齐,测试强制) |
magnetar.stages.events |
log_event()/log_error() |
追加式事件日志 .magnetar-events.jsonl(可回放审计流,mark_stage 自动写) |
magnetar.pulsar2_util |
ensure_pulsar2_package(), resolve_backend(), run_pulsar2(), config_check() |
Pulsar2 独立包后端(自动获取 ModelScope/HF 最新 *_package.tar.gz,解压即完整运行环境,强制不用 Docker) |
magnetar.proc_util |
run() |
通用子进程执行(限长输出 + 日志落盘) |
magnetar.recipes |
list_recipes(), load_recipe(name), match_recipe(...) |
已验证模型配方(recipes/*.json);命中则按配方确定性执行,未命中且 ALLOW_EXPLORE=false 时 STOP |
magnetar.board_util |
select_board(), ssh(), scp_to(), scp_from(), ensure_remote_infer(), port_open() |
AX 板端操作(上板前确保 ax-remote-infer 已装,18500 端口可发现板子) |
magnetar.stages.init |
run(config) → task_dir |
创建 TASK_DIR 结构 |
magnetar.stages.acquire |
run(task_dir, source);write_model_flow(task_dir, flow) |
获取模型到 origin/ 并记录运行流程 |
magnetar.stages.export |
run_mobilenet(task_dir) → sample;run_generic(task_dir, ...) → result |
MobileNet 专用 / 任意模型通用导出(先简后繁自动降级) |
magnetar.stages.toolchain |
run() → pulsar_image |
自动获取/验证 Pulsar2 独立包可用(无 PULSAR2_HOME 时自动下载最新 *_package.tar.gz) |
magnetar.stages.compile |
run(task_dir, target_hw, image) |
Pulsar2 编译 AXMODEL |
magnetar.stages.simulate |
run(task_dir, sample, image, board=board, target_hw=...) → metrics |
精度对分(有板优先上板 ax_run_model,无板才回退 pulsar2 run) |
magnetar.stages.sdk_gen |
run_mobilenet_python(), run_mobilenet_cpp();run_generic_python(task_dir), run_generic_cpp(task_dir) |
生成 Python/C++ SDK(通用版基于 model_meta + model_flow) |
magnetar.stages.runonboard |
run(task_dir, sample, hw, pwd) → metrics |
板端部署验证 |
magnetar.stages.package |
assemble(task_dir, metrics, image) → pkg, self_test(pkg) → result |
组装面向小白的交付包,含一键脚本 + README + 自测 |
magnetar.stages.publish |
publish(pkg, target, name, token, org, model) → result |
发布到 GitHub(源码)或 HuggingFace(预编译) |
magnetar.stages.llm |
classify(origin, ...) → 路由;llm_build(task_dir, input, chip, image, ...) → model_dir;install_axllm(board) / serve_axllm(board, model_dir) / validate_chat(api_url, ...) |
LLM/自回归模型路由与 ax-llm 部署(llm_build2 编译 + axllm 板端 serve/验证) |
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.
- 1mo ago Changed · +2 lines · +154 tokens per session 6cfd31da898b
- 1mo ago First seen · 232 lines · 4,812 tokens per session scan C 0be6ba321fea
Magnetar AGENTS.md is an instructions file published in the GitHub repository AXERA-TECH/Magnetar (22 stars, last pushed 1mo ago), licensed MIT. It adds 4,966 tokens to every session, about $0.0199 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
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).
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
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.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.