agents-optimize

bởi aws

Use when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization.…

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill agents-optimize

optimize

Measure and improve your AgentCore agent's quality through evaluation, monitoring, and observability.

When to use

  • You want to know if your agent is giving good answers
  • You want to set up continuous quality monitoring in production
  • You want to add a quality gate to your CI/CD pipeline
  • You want to understand agent behavior through logs, metrics, and traces
  • You want to set up CloudWatch dashboards or X-Ray tracing

Do NOT use for:

  • Debugging a specific broken agent (wrong answers, errors) → use agents-debug
  • Production security hardening (IAM, auth) → use agents-harden

Input

$ARGUMENTS can be:

  • An eval goal: "add a quality gate", "set up monitoring"
  • An observability goal: "set up CloudWatch dashboard", "understand my traces"
  • A specific evaluator: "llm-as-a-judge", "code-based"
  • Empty — the skill will guide based on project context

Process

Step 0: Verify CLI version

Run agentcore --version. This skill requires v0.9.0 or later.

Step 1: Read project context

Read agentcore/agentcore.json to understand existing evaluators, online eval configs, and agent setup.

If agentcore/agentcore.json is not found:

"This skill requires an AgentCore project. Use agents-get-started to create one."

Step 2: Determine the workflow

Developer intentAction
Measure quality, add evaluator, run eval, CI/CD gate, online monitoringLoad references/evals.md and follow its workflow
Set up observability, CloudWatch, X-Ray, logs, metrics, dashboardsLoad references/observability.md and follow its workflow
Understand or reduce AgentCore costsLoad references/cost.md
Both — "I want to understand and improve my agent"Start with observability setup, then add evals

Step 3: Follow the loaded reference

The reference file contains the full procedure. Follow it step by step.

Cross-references

  • After setting up evals, suggest agents-harden for production readiness
  • If eval results reveal agent issues, suggest agents-debug for root cause analysis
  • If the developer needs to add capabilities first, suggest agents-build

Output

Depends on the workflow — see the loaded reference for specific outputs.

Quality criteria

  • Evaluator configuration uses only valid CLI flags
  • Online eval sampling rate is appropriate (not 100% in production without discussion)
  • CI/CD quality gate has a clear pass/fail threshold
  • Observability setup includes both tracing and logging
  • The developer understands the eval data delay: ~10 seconds put-to-get, end-to-end — one ingestion step covers both trace reads and eval queries; there is no separate indexing wait

Thêm skills từ aws

agents-build
aws
Dùng để mở rộng một dự án agent hiện có với bộ nhớ, tích hợp ứng dụng, VPC, multi-agent, di chuyển, mô hình, trình duyệt, trình thông dịch mã, thanh toán hoặc tài nguyên…
official
agents-connect
aws
Sử dụng khi kết nối agent của bạn với API, công cụ hoặc dịch vụ bên ngoài qua Gateway, hoặc hạn chế quyền truy cập công cụ bằng chính sách Cedar. Xử lý thiết lập gateway, mục tiêu…
official
agents-debug
aws
Use when your agent or environment is broken — wrong answers, errors, timeouts, tool failures, or CLI issues. Reads traces and logs to diagnose root causes.…
official
agents-deploy
aws
Sử dụng khi triển khai agent của bạn lên AWS, hoặc khi quá trình triển khai thất bại. Xử lý xác thực trước khi triển khai, chẩn đoán lỗi CDK/IAM/hạn mức, quản lý phiên bản, khôi phục,…
official
agents-get-started
aws
Sử dụng khi nhà phát triển muốn tạo một dự án agent mới hoặc bắt đầu với AgentCore. Xử lý lựa chọn framework, tạo khung dự án, triển khai lần đầu, và…
official
agents-harden
aws
Use when preparing your agent for production — IAM scoping, inbound auth (JWT, SigV4), secrets management, cold start optimization, session lifecycle, rate…
official
agents-pay
aws
Use when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments, and applying…
official
amazon-aurora-mysql
aws
Amazon Aurora MySQL — tạo, sửa đổi và tư vấn về các cụm Aurora MySQL cụ thể (công cụ tương thích MySQL, Aurora serverless, truy vấn song song).…
official