agents-optimize

Configure evaluators, online monitoring, observability, and cost controls for AgentCore agents.

1|Updated Aug 1, 2024
One-click install
npx skills add https://github.com/obispobruno/dotfiles --skill agents-optimize-obispobruno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agents-optimize
Source: https://github.com/obispobruno/dotfiles/tree/main/dot_agents/skills/agents-optimize
Command: npx skills add https://github.com/obispobruno/dotfiles --skill agents-optimize-obispobruno

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Measuring and improving an AI agent's quality in production is hard: teams lack evaluators, continuous monitoring, CI/CD quality gates, and visibility into logs, traces, and costs. This Skill guides developers through setting up evaluation pipelines, observability, and cost optimization for AWS Bedrock AgentCore agents. ## Core Features & Use Cases - Evaluation Setup: Run one-time evals with built-in evaluators (Helpfulness, Correctness, GoalSuccessRate), create custom LLM-as-judge or code-based evaluators, and evaluate local dev traces without deploying. - Continuous Monitoring & CI/CD Gates: Configure online eval configs with sampling rates, pause/resume monitoring, and generate quality gate scripts that fail builds when scores drop below thresholds. - Observability & Cost Optimization: Set up CloudWatch logging, X-Ray tracing, cross-account observability, and reduce costs via model selection, memory strategy tuning, and log retention policies. - Use Case: A developer notices their agent's responses degrading in production. They use this Skill to add an online eval config at 5% sampling, stream eval logs, identify the regression, and add a CI/CD quality gate to prevent future regressions. ## Quick Start Ask the assistant to set up an evaluator and quality monitoring for your AgentCore agent, for example by saying "add a quality gate and online monitoring to my agent".

Frequently Asked Questions about agents-optimize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I evaluate my AgentCore agent's quality?▼

Run a one-time eval with the agentcore CLI using a built-in evaluator like Builtin.Helpfulness via agentcore run eval. Scores are normalized 0-1, and results are saved to agentcore/.cli/eval-runs/ for history review.

How do I set up continuous quality monitoring for an agent in production?▼

Add an online eval config with agentcore add online-eval, specifying evaluators and a sampling rate of 1-5% for production. Deploy to activate it, then stream results from CloudWatch Logs or the GenAI Observability console.

Can I run evals without deploying my agent?▼

Yes. agentcore dev auto-instruments OTEL and ships spans to CloudWatch, so agentcore run eval works against local dev sessions after about 10 seconds of ingestion. You can also call the Evaluate API directly with hand-constructed spans.

Why are my agent logs or traces not showing up in CloudWatch?▼

Three things must be true: the Dockerfile CMD uses the opentelemetry-instrument wrapper, the runtime execution role has CloudWatch and X-Ray permissions, and code uses the logging module instead of print(). Also verify CloudWatch Transaction Search is enabled.

How do I reduce AgentCore costs?▼

Use cheaper models like Haiku or Nova Micro for simple tasks, limit memory strategies to what you need, keep online eval sampling at 1-5%, set CloudWatch log retention policies, and stop idle runtime sessions since compute bills by vCPU-hour.

When should I not use this skill?▼

Do not use it for debugging a broken agent producing errors or wrong answers; use agents-debug instead. Production security hardening like IAM and auth configuration belongs to the agents-harden skill.