New agent skill: Amazon SageMaker optimized generative AI inference for your coding agent
https://aws.amazon.com/blogs/machine-learning/new-agent-skill-amazon-sagemaker-optimized-generative-ai-inference-for-your-coding-agent/📌 讓coding agent懂SageMaker推理最佳化:aws-ai-ml技能上線
TL;DR:裝上aws-ai-ml技能,Kiro、Claude Code、Codex都能幫你benchmark端點、推薦部署設定並產出可執行程式碼。
多數工程師在部署大型語言模型時,面對的不是模型本身,而是Amazon SageMaker AI那片廣闊又深不見底的設定表面:該選哪個instance家族?哪種serving容器?on-demand還是保留容量?多數人帶著的其實是「我要多快的回應」「我的預算上限是多少」這類目標,而不是對SageMaker底層選項的熟悉度。aws-ai-ml這個新技能,就是想補上這個落差。
🤔 問題不是模型不夠好,是你不知道該選哪種部署設定
SageMaker AI支援real-time、batch、asynchronous等多種serverful託管模式,搭配on-demand與保留容量、異質instance、VPC隔離、自動擴展等選項。工程師通常不是帶著「我該用哪個container」這種問題進場,而是帶著效能目標與成本上限。aws-ai-ml技能的設計目的,就是讓coding agent扮演類似solutions architect的角色,透過自然語言對話理解你的業務限制,最終產出可審閱、可修改、可在自己環境執行的SageMaker Python SDK v3程式碼。
🧩 一個外掛,讓任何支援MCP的coding agent變成推理最佳化專家
aws-ai-ml是透過Agent Toolkit for AWS安裝的工具包,可以外掛到任何支援Model Context Protocol(MCP)的coding agent,包括Kiro、Claude Code與Codex。整個過程中,agent每一步都以程式碼形式呈現、可供審閱與提問,不會隱藏在不透明的UI介面後面。
安裝方式有兩條路:
- 本機安裝:先裝好Agent Toolkit for AWS(需要AWS CLI 2.35以上版本與uv),它會自動偵測你的agent、安裝技能並設定AWS MCP伺服器,之後安裝aws-ai-ml技能,在agent聊天視窗問「What skills are available?」確認技能已載入,之後就能用自然語言描述需求。
- 在Amazon SageMaker Studio的JupyterLab空間中使用:開啟Studio,建立一個私人的JupyterLab空間(技能僅會同步到私人空間),在映像檔選單中選擇已內建aws-ai-ml技能的映像檔,啟動空間後在終端機中以身分提供者授權coding agent,同樣以「What skills are available?」確認。文章也提醒,若技能列表是空的,可嘗試重啟Jupyter伺服器再重新整理頁面。
必要條件只有一項:你的AWS憑證要有呼叫SageMaker AI API(建立端點、執行benchmark與推薦任務)的權限,技能產出的程式碼會以你的憑證執行,技能本身不需要額外的IAM設定。文章也提到,Kiro與Claude Code可以在執行期透過AWS MCP伺服器動態搜尋並載入技能,不必事先本機安裝。
💡 三種核心用法:benchmark、選instance、比對結果
- Benchmark既有端點:告訴agent要測哪個端點,它會用SageMaker Python SDK的Workload.synthetic()與start_benchmark() API產出一份Python notebook來做負載測試。因為benchmark會對正式端點送出真實流量,agent會先確認端點適合做負載測試。測完後拿到的是實測吞吐量、延遲百分位等數據報告,而非估算值,agent也會建議像prefill decoding這類提升效能的機制。範例提問:「Benchmark my Llama endpoint on SageMaker AI.」
- 幫模型挑合適的instance:不論模型放在哪裡、怎麼取得的,agent都能產出程式碼去評估模型在候選instance與設定組合下的表現,並依吞吐量、延遲百分位、time-to-first-token與併發量列出排序後的部署選項,讓你依成本與效能需求自行決定。
- 比對兩次benchmark結果:提供兩個benchmark job名稱,agent會算出吞吐量、延遲百分位、time-to-first-token等指標的變化百分比(正值代表變好)。若其中一次benchmark還沒跑過,agent會主動提議先跑完再比對。範例提問:「I have two benchmark runs and I want to compare them. Which one is faster?」
⚠️ 這是工具整合,不是新模型或新演算法
這則發布本質上是把既有的SageMaker AI推理最佳化能力,透過MCP包裝成coding agent可呼叫的技能,屬於開發體驗層面的增量改進,而非底層推理技術的突破。
🎯 對工程團隊的實務意義
如果你的團隊已經在用Kiro、Claude Code或Codex這類coding agent,裝上aws-ai-ml技能幾乎是零成本的效率提升:不必先搞懂SageMaker所有instance家族與serving容器的排列組合,只要用自然語言描述效能目標與預算,就能拿到可審閱、可直接執行的部署程式碼,把「選型」這個耗時的嘗試過程,交給agent在你的真實benchmark數據上完成。
🔗 來源
- 標題:New agent skill: Amazon SageMaker optimized generative AI inference for your coding agent
- 作者/機構:Mona Mona, AWS Machine Learning Blog
- 連結:https://aws.amazon.com/blogs/machine-learning/new-agent-skill-amazon-sagemaker-optimized-generative-ai-inference-for-your-coding-agent/
#AWS #SageMaker #MCP #CodingAgent #ClaudeCode #LLMInference #MLOps #InferenceOptimization #AIAgent #ModelContextProtocol
原始資料 AWS ML · 收集於 2026-10-05
摘要原文
Engineers increasingly use coding assistance tools to accelerate their development workflows. Today, Amazon SageMaker AI optimized generative AI inference introduces the aws-ai-ml skill, available through the Agent Toolkit for AWS . This skill gives coding agents like Kiro , Claude Code, and Codex deep expertise in inference optimization and benchmarking. Install the skill, and your existing agent can benchmark endpoints, recommend deployment configurations, compare performance runs, and generate executable SageMaker Python SDK v3 code on your behalf. The aws-ai-ml skill is a toolkit that plugs into any coding agent that supports the Model Context Protocol (MCP), turning it into a SageMaker AI inference optimization expert. In this post, we walk through what the skill enables, how to set it up, and how it helps you move faster from model to production. Amazon SageMaker AI supports serverful hosting across real-time, batch, and asynchronous modes. It offers on-demand and reserved capacity, heterogeneous instances, virtual private cloud (VPC) isolation, automatic scaling, and integration with every SageMaker AI training path. The surface area is broad and deep, but most engineers do not arrive knowing which instance family or serving container will best serve their needs. They arrive with a use case: a performance target they want to hit, a cost envelope they need to stay within, or a model they need to evaluate before committing to production. The agentic experience for SageMaker AI optimized generative AI inference closes this gap. You tell the agent what you want to accomplish, and it produces executable SageMaker Python SDK v3 code that you can review, modify, and run in your own environment. The agent asks targeted clarifying questions, generates code grounded in real benchmarks and measured performance data, and adapts to your business constraints the way a solutions architect would. Throughout, you stay in control. Every step is visible in real time and expressed as code you can read and question. Nothing happens behind an opaque UI. You can install the aws-ai-ml skill through the Agent Toolkit for AWS on your local machine, or use it within an Amazon SageMaker Studio JupyterLab space. Either way, you can go from zero to a working conversation in 10 minutes. Step 1: Install the Agent Toolkit for AWS. If you haven’t already, set up the Agent Toolkit. This requires AWS Command Line Interface (AWS CLI) 2.35+ and uv installed. This auto-detects your agents, installs skills, and configures the AWS MCP Server. For agent-specific setup (plugin install commands, MCP config), see the Agent Toolkit for AWS getting started guide . Step 2: Install the aws-ai-ml skill. Add the SageMaker AI optimized generative AI inference skill to your agent: Step 3: Confirm and begin. Open your coding agent’s chat panel and ask: “What skills are available?” You should see aws-ai-ml listed. After you confirm, describe your intent in natural language. Your coding agent now has SageMaker AI inference optimization expertise built in. Prerequisites: Your AWS credentials must have permissions to call SageMaker AI APIs (creating endpoints, running benchmark and recommendation jobs). The skill generates code that runs under your credentials. No additional AWS Identity and Access Management (IAM) configuration is needed for the skill itself. Note: For Kiro and Claude Code, agents can discover skills at runtime. They can search for and load skills on demand through the AWS MCP Server , without any local installation. Ask your agent: “Search for AWS skills related to databases.” Refer to the readme for discovering skills at runtime. If you prefer to work inside a managed JupyterLab environment, you can use the skill in Amazon SageMaker Studio with a pre-configured image. Step 1: Open Amazon SageMaker Studio. Navigate to Amazon SageMaker Studio in your target AWS account and AWS Region. Select your Studio domain and launch the Studio IDE from your user profile. Step 2: Create a JupyterLab space. From the Studio landing page, choose JupyterLab , then choose Create JupyterLab space . Name the space (for example, my-inference-opt ) and keep the sharing setting Private (skills only sync on private spaces). Under the Image menu, select the image that includes the SageMaker AI optimized generative AI inference skill. This image ships pre-configured with the aws-ai-ml agent skill and all necessary dependencies. Choose Run space and wait for it to boot (5–10 minutes the first time). Note: Use a fresh space. A reused space with a locally modified skill version may not pick up the pre-configured image. Step 3: Open JupyterLab and launch a terminal. After the space boots, open JupyterLab and choose Terminal . Step 4: Authorize your coding agent. In the terminal, authenticate with your coding agent using your identity provider. For example, with Kiro: Step 5: Confirm and begin. Open your coding agent’s chat panel and ask: “What skills are available?” You should see aws-ai-ml listed. Once confirmed, describe your intent in natural language. If the agent reports no skills are available, verify that your space is set to Private . You can also check from the terminal: If that directory is empty but /etc/sagemaker/skills/ contains the skill files, run restart-jupyter-server , refresh the page, and retry. The agentic experience covers the following capabilities across the inference optimization lifecycle. You don’t need to know which capability to invoke. Describe what you want, and your agent figures out the next step or asks clarifying questions if anything is unclear. If you already have a model deployed on a SageMaker AI endpoint, you can ask the agent to benchmark it. Tell the agent which endpoint you want to test, and it generates a Python notebook that runs a load test using the Workload.synthetic() and start_benchmark() APIs from the SageMaker Python SDK. Before running any benchmark, the agent confirms that your endpoint is safe to load-test, because benchmarking drives real traffic to a live endpoint. When the benchmark completes, you get a quantitative performance report with: These are measured values from real load on real infrastructure, not estimates. The agent also recommends improvement mechanisms (such as prefill decoding) to boost performance. Example prompt: “Benchmark my Llama endpoint on SageMaker AI.” If you have a model and need to find the right instance type to deploy it on SageMaker AI, tell your agent. It doesn’t matter where your model lives or how you obtained it: In every case, your agent generates code that evaluates your model against candidate instances and configurations, then presents ranked deployment options with concrete performance metrics: throughput, latency percentiles, time-to-first-token, and concurrency. You choose based on your cost and performance requirements. If you ran multiple benchmarks (for example, before and after a configuration change, or across two instance types), you can ask the agent to compare them. Provide the two benchmark job names, and the agent generates a comparison that computes deltas across key metrics: throughput, latency percentiles, and time-to-first-token. The results show percentage changes where positive means better, giving you a single, interpretable summary of whether your change improved performance, degraded it, or had no meaningful effect. If one of the benchmark runs doesn’t exist, the agent offers to run it first before proceeding with the comparison. Example prompt: “I have two benchmark runs and I want to compare them. Which one is faster?” This table compares two deployed models on the same benchmark workload (512/256 tokens, concurrency 4). The Δ% column shows how much faster Model B (Qwen3-8B) is than Model A (Qwen3-1.7B) on each metric. A positive value means Model B is better. The two models run on different hardware. Qwen3-8B uses a 4-GPU ml.g5.12xlarge (4x A10G), while Qwen3-1.7B uses a single L4 GPU ( ml.
由 claude-code/sonnet 自動生成