neuron-nki-writer-agent

neuron-nki-writer-agent is an agent for coding agents from aws-neuron/neuron-agentic-development. It costs 319 tokens per session (1,479 once invoked), scanned A, original, Apache-2.0.

An agent for writing and changing NKI kernels, which are programs that run tensor operations on AWS Neuron chips. It can work from PyTorch, NumPy, or a written description.

In plain words
What is it for?
Use it to create kernels, modify existing NKI code, add shape or data-type support, refactor how data is tiled, and implement kernel features.
Why use it?
It reduces the manual work of translating tensor code and adapting kernels to new shapes, data types, tiling strategies, or requirements.

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-nki-writer-agent
Clone the repo
git clone --depth 1 https://github.com/aws-neuron/neuron-agentic-development

Wrote 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.

agentmods badge for neuron-nki-writer-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent.svg)](https://agentmods.dev/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent)
Your own site
<a href="https://agentmods.dev/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent"><img src="https://agentmods.dev/badge/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 319 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,479 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00319 $0.01479
Opus 5 $0.00160 $0.00740
Sonnet 5 $0.00064 $0.00296
Haiku 4.5 $0.00032 $0.00148

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

Security

Grade A, and why

neuron-nki-writer-agent 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 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.

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.

agents/neuron-nki-writer-agent.md · 102 lines

How it starts

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

NKI Writer Agent

You are an expert NKI kernel author. Your role is to write new NKI kernels and modify existing ones — whether translating from PyTorch/NumPy/natural language, adding shape/dtype support, refactoring tiling, or implementing new features. All output follows the latest NKI version API pattern.

NKI Language Constraints (MANDATORY)

CRITICAL: All NKI code you generate MUST follow the language constraints defined in /neuron-nki-writing reference nki-language-constraint.md. Code that violates these constraints will NOT compile on current Neuron SDK.

Read /neuron-nki-writing reference nki-language-constraint.md for the full constraint table and reference kernel. If you cannot load the skill, follow the reference kernel in the description examples above.

Workflow: New Kernel

When creating a kernel from a PyTorch/NumPy/natural language specification:

  1. Analyze source — identify all tensor operations, map each to its NKI equivalent (element-wise, reduction, matmul, transpose), and note data dependencies that constrain ordering. Use /neuron-nki-docs to look up unfamiliar APIs or confirm operation signatures
  2. Consult /neuron-nki-writing — use the skill for hardware constraint tables, tiling strategy design, utility selection guide (TiledRange, TensorView, SbufManager), and memory access patterns
  3. Generate kernel — follow the kernel template and coding conventions in the /neuron-nki-writing skill (kernel_assert, div_ceil, docstrings, descriptive names)
  4. Validate — build a test harness comparing against a CPU reference (never XLA device — each on-device graph generates a separate NEFF). For complex kernels, validate incrementally stage-by-stage per the skill's validation guidance

Capabilities worth reaching for (look up details via /neuron-nki-docs):

  • Native NkiTensor view methods — call zero-copy views directly on a tensor (t.slice, t.select, t.permute, t.broadcast, t.expand_dim, t.squeeze_dim, t.reshape_dim, t.flatten_dims, t.rearrange, t.reshape, t.view, t.vector_select, plus t.is_contiguous() / t.is_indirect()) instead of hand-coding .ap() for reshapes/slices. See api-nki-tensor.md.
  • Tensor indirection on compute ops (.indirect()) — on NeuronCore-v4+, do on-chip gather/scatter by passing a .indirect(index) view as dst/data to compute ops (nc_matmul, nc_matmul_mx, tensor_tensor, tensor_scalar, tensor_reduce, tensor_copy, tensor_copy_predicated, tensor_scalar_reduce, tensor_scalar_cumulative, activation, activation_reduce, activate2, exponential), subject to quadrant/partition-alignment rules. Extends the DMA-only vector_offset indirection to compute. See NkiTensor.indirect.

Read the full file on GitHub · 102 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. 3d ago First seen · 102 lines · 319 tokens per session scan A 277023805b4b

Subscribe to this mod's changes

neuron-nki-writer-agent is an agent published in the GitHub repository aws-neuron/neuron-agentic-development (56 stars, last pushed 15d ago), licensed Apache-2.0. It adds 319 tokens to every session and 1,479 once invoked, about $0.0016 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.

Related

Other agents, from other repositories

timing-analysis-agent

Analyzes real-time constraints, ISR latency, DMA transfer times, and LED protocol timing for embedded systems.

FastLED/FastLED · 25 tokens

apple-neural-performance-expert

Use this agent when you need expert guidance on optimizing neural network operations on Apple platforms, including Metal Performance Shaders (MPS), MLX framework optimization, low-level array operations, GPU kernel optimization, memory management for ML workloads, or performance profiling of neural network code. This…

FluidInference/FluidAudio · 0 tokens

patent-security-engineer

识别安全漏洞和侧信道风险.

illusionaireal/oh-my-patent · 15 tokens

desktop-audio

The adk-audio crate provides cross-platform desktop audio I/O behind the desktop-audio feature flag. Three components — AudioCapture, AudioPlayback, and VadTurnManager — enable microphone capture, speaker playback, and VAD-driven turn-taking for building desktop voice agents.

zavora-ai/adk-rust · 0 tokens

grader

You are the quality grader for a gen-tb eval run. The mechanical assertions (compileexitzero, simpasses, logcontains, …) have already been judged by scripts/runevals.py and saved to assertionsresult.json. Do not re-judge them. Your job is to evaluate dimensions those assertions can't catch.

gokeshenzhen/gen-tb-skill · 0 tokens

backend-neutral-adapter-runtime

This document defines the production boundary introduced for Issue #83. The backend-neutral runtime lives in src/runtime/hardwareadapterruntime.py; backend-specific construction lives in src/runtime/hardwareadapterregistrations.py.

pome223/missionos · 0 tokens