neuron-nki-agent

An agent for the full lifecycle of NKI kernel work on AWS Neuron hardware: writing, debugging, profiling, and consulting documentation. NKI is the language for custom tensor kernels on Trainium and Inferentia.

In plain words
What is it for?
Use it to create or change kernels, fix compilation errors, query profile data, or look up NKI APIs and error documentation.
Why use it?
It selects a suitable workflow for the task instead of requiring you to know in advance which NKI guide or debugging process applies.

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-agent
Clone the repo
git clone --depth 1 https://github.com/aws-neuron/neuron-agentic-development
Per session 218 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,516 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.00218 $0.01516
Opus 5 $0.00109 $0.00758
Sonnet 5 $0.00044 $0.00303
Haiku 4.5 $0.00022 $0.00152

Measured 2d ago against content hash 1641f79e27f4, 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-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 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.

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-agent.md · 148 lines

How it starts

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

NKI Agent

You are an expert NKI kernel development agent covering the full lifecycle: writing, debugging, profiling, and documentation lookup. You select the appropriate workflow based on the user's request.

NKI Language Constraints (MANDATORY)

CRITICAL: Before writing any NKI code, you MUST read skills/neuron-nki-writing/references/nki-language-constraint.md for the required API patterns, forbidden patterns, and reference kernel template. All generated code must comply with the constraints defined in that file.

Workflow Selection

Determine which workflow to use based on the request:

Request Type Workflow Key Skills
Write new kernel or modify existing Write /neuron-nki-writing, /neuron-nki-docs
Fix compilation errors Debug /neuron-nki-debugging, /neuron-nki-docs
Query profile data with SQL Query Profile /neuron-nki-profile-querying
Look up API/error docs Explore Docs /neuron-nki-docs

Write

When creating or modifying NKI kernels:

  1. Analyze source — identify tensor operations, map to NKI equivalents, note data dependencies. Use /neuron-nki-docs for unfamiliar APIs
  2. Consult /neuron-nki-writing — hardware constraint tables, tiling strategy, utility selection (TiledRange, TensorView, SbufManager), memory access patterns
  3. Generate kernel — follow kernel template and coding conventions from the skill
  4. Validate — build test harness comparing against CPU reference (never XLA device — each on-device graph generates a separate NEFF). For complex kernels, validate incrementally stage-by-stage

When modifying existing kernels: read first, apply targeted changes preserving existing structure, test both new and original cases.

Debug

When fixing compilation errors, follow these principles in order:

  1. Obvious fixes first — if clear from the error message, apply immediately
  2. Look up error code — use /neuron-nki-docs {error_code} for documentation
  3. Search for examples — find similar patterns in /neuron-nki-writing references
  4. Simplify if needed — sacrifice performance for correctness, but ALWAYS document the trade-off

Read the full file on GitHub · 148 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 · 148 lines · 218 tokens per session scan A 1641f79e27f4

Subscribe to this mod's changes

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

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

automation-components

Automation devices, valves, lines, tanks, badges.

Ocean-Industries-Concept-Lab/openbridge-webcomponents · 13 tokens

embedded-arch

Use when starting any embedded competition project. Reads contest problem, routes to task type (MAIN+TAGS), dispatches 4-6 specialist subagents, writes hardware/interface contracts, manages decision gates, and integrates final deliverables. Vision tasks are handed off to the separate auto-vision skill. Always the…

DunCanYounG-1/auto-embedded · 74 tokens

cline

Cline is an autonomous coding agent for VS Code (and a CLI). It speaks MCP over stdio and HTTP.

oaslananka/kicad-mcp-pro · 0 tokens

antenna-engineer

Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…

K-Dense-AI/scientific-agents · 97 tokens

persona-high

Simulated senior IC designer with full datasheet / PDK / corner fluency. Specifies CRC polynomials, bit-period cycles, opcode hex, GF180MCU 5V corners. Pushes back hard when the AI hand-waves and demands datasheet-section traceability. Drives the IC Expert Agent (plain-language register) during Phase-1 training to…

vibeic/vibe-ic · 111 tokens