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.
npx agentmods add instructions/axera-tech/magnetar/agents-mdgit clone --depth 1 https://github.com/AXERA-TECH/MagnetarWhat 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 | $0.04812 | $0.04812 |
| Opus 5 | $0.02406 | $0.02406 |
| Sonnet 5 | $0.00962 | $0.00962 |
| Haiku 4.5 | $0.00481 | $0.00481 |
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 3d 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 — 232 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.docker_util |
latest_pulsar2_image(), docker_pulsar2() |
Docker/Pulsar2 封装 |
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 Docker 可用 |
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.
- 3d 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 20d ago), licensed MIT. It adds 4,812 tokens to every session, about $0.0241 per session on Opus 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
ii-agent AGENTS.md
Instructions for Intelligent-Internet/ii-agent, covering ii-agent contributor guide, quick start, repository map, mandatory rules and architecture.
intelligent-terminal rust.instructions.md
Concise Rust coding conventions for this repository.
Browser4 CLAUDE.md
Instructions for platonai/Browser4, covering browser4 — project context for claude, architecture, key dispatch chain (cli → browser), batch commands and e2e test structure.
nimbalyst AGENTS.md
AGENTS.md instructions for nimbalyst/nimbalyst: At the beginning of every AI session, read the root CLAUDE.md and any applicable package-level CLAUDE.md before taking actions.
sortie copilot-instructions.md
Instructions for sortie-ai/sortie, covering sortie coding & review standards, 1. layered imports (downward only; violation is critical), 2. concurrency safety, 3. workspace path safety (critical: security boundary) and 4. persistence (sqlite).
GENesis-AGI AGENTS.md
AGENTS.md instructions for WingedGuardian/GENesis-AGI, covering agent instructions, code review mandate (adversarial), gitnexus — code intelligence (advisory), genesis capability surface and skills.