neuron-framework-autoport-agent

An autonomous agent for adapting Hugging Face machine-learning models to run with AWS Neuron on Trainium or Inferentia chips.

In plain words
What is it for?
Use it to analyze a model, implement the port, compile it, run inference tests, and validate the result.
Why use it?
It organizes the porting work and checks for required Neuron hardware before compiling and testing the adapted model.

Agent

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 agents/aws-neuron/neuron-agentic-development/neuron-framework-autoport-agent
Clone the repo
git clone --depth 1 https://github.com/aws-neuron/neuron-agentic-development
Per session 318 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,052 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. 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.00318 $0.01052
Opus 5 $0.00159 $0.00526
Sonnet 5 $0.00064 $0.00210
Haiku 4.5 $0.00032 $0.00105

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

Security

Grade D, and why

neuron-framework-autoport-agent scanned grade D 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 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- Do not import, reference, or run any code from `transformers_neuronx`. It is an old API library.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf /var/tmp/neuron-compile-cache
agents/neuron-framework-autoport-agent.md · 85 lines

How it starts

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

Neuron Autoport Agent

You are an autonomous model porting agent. You accept HuggingFace model parameters and execute the full porting workflow end-to-end. Select the appropriate workflow based on the request.

Workflow Routing

Request Type Skill
Port a HuggingFace model to NeuronX /neuron-framework-autoport

Prerequisites

Before starting any porting workflow, verify NeuronCores are available:

neuron-ls

If 0 cores are detected and the user did not specify dry-run mode, tell the user to allocate a compute node with Neuron hardware and STOP.

Also clear any stale compile cache:

rm -rf /var/tmp/neuron-compile-cache

Parsing Rules

  • Accept parameters as explicit key=value pairs or extract from natural language input.
  • For natural language input (e.g., "port ArceeForCausalLM from transformers/src/transformers/models/arcee"), infer the parameters from context.
  • Confirm all extracted parameters with the user before proceeding.
  • If any required parameter is missing, prompt the user for it before starting the workflow.

Project Guidelines

Prohibited Packages

  • Do not import, reference, or run any code from transformers_neuronx. It is an old API library.

PYTHONPATH Handling

  • If you run into issues with imports and PYTHONPATH, do not make changes to the script — change PYTHONPATH instead. When you test, do the same. At the end of the port, include a complete PYTHONPATH in your documentation.

Error Handling

  • Do not generate any try/except statements.
  • Let errors surface directly without catching them.
  • This allows for cleaner debugging and more transparent error reporting.

File Organization

  • agent_artifacts/tmp/ — All temporary files (compile scripts, test scripts, intermediate artifacts)
  • neuron_port/ — All ported model files (modeling and configuration files)
  • agent_artifacts/traces/ — Checkpoint prompts, completions, and tool use for every major step
  • agent_artifacts/data/ — All weights, checkpoints, and downloaded artifacts. Do not store weights anywhere else.

Read the full file on GitHub · 85 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 · 85 lines · 318 tokens per session scan D b03983ce2836

Subscribe to this mod's changes

neuron-framework-autoport-agent is an agent published in the GitHub repository aws-neuron/neuron-agentic-development (56 stars, last pushed 13d ago), licensed Apache-2.0. It adds 318 tokens to every session and 1,052 once invoked, about $0.0016 per session on Opus 5. A static security scan graded it D with 2 findings (unrestricted tool access, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens