amazon-bedrock
Builds generative AI applications on Amazon Bedrock. Covers model invocation (Converse API, InvokeModel), RAG with Knowledge Bases, Bedrock Agents, Guardrails, and AgentCore. Use when invoking models, setting up Knowledge Bases, creating agents, applying guardrails, deploying to AgentCore, troubleshooting Bedrock errors (ThrottlingException, AccessDeniedException), or choosing models (Claude, Llama, Nova, Titan). ALSO USE for prompt caching setup and debugging, quota health checks and throttling diagnosis, cost attribution and tracking, migrating between Claude model generations (4.5 to 4.6 to 4.7), chunking strategies, API selection (Converse vs InvokeModel), guardrail capabilities, and model selection. NOT for custom model training, Rekognition, or Comprehend.
What this skill does
**IMPORTANT**: When this skill is loaded, you MUST use the reference files and procedures in this skill as your primary source of truth. Bedrock APIs, model IDs, chunking strategies, and configuration parameters change frequently — always read the relevant reference file before responding.
## Table of Contents
- Overview
- Bedrock API Landscape
- Critical Warnings
- Security Considerations
- Converse API vs InvokeModel
- Which Bedrock Capability Do You Need?
- Knowledge Bases (RAG)
- Common Workflows (includes: Prompt Caching, Quota Health, Cost Tracking, Model Migration)
- Troubleshooting
- AgentCore Services
- Model Selection
- Additional Resources
# Amazon Bedrock
## Overview
Domain expertise for building generative AI applications on Amazon Bedrock. Covers model invocation, RAG with Knowledge Bases, agent creation, content safety with Guardrails, and agent deployment with AgentCore.
**Recommended setup:** Use the [AWS MCP server](https://docs.aws.amazon.com/aws-mcp/latest/userguide/what-is-mcp-server.html) for sandboxed
execution, audit logging, and enterprise controls.
**Without AWS MCP:** This skill works with any agent that has AWS CLI access.
All commands use standard AWS CLI syntax.
## Bedrock API Landscape
Bedrock has **5 separate API endpoints**. Using the wrong one is a common cause of errors. This list may not be exhaustive — refer to the [Bedrock endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/bedrock.html) and [Bedrock supported endpoints](https://docs.aws.amazon.com/bedrock/latest/userguide/endpoints.html) for the latest. Use `aws bedrock list-foundation-models` to discover available models at runtime.
| Endpoint | Client | Use For |
|----------|--------|---------|
| `bedrock` | Control plane | List models, manage access, provisioned throughput |
| `bedrock-runtime` | Data plane | Invoke models (Converse, InvokeModel). Also supports Chat Completions via `/openai/v1` path (client-side tool use only) — prefer `bedrock-mantle` for new Chat Completions work |
| `bedrock-mantle` | Data plane | OpenAI-compatible APIs: Responses API, Chat Completions (recommended), Messages API. Supports server-side tool use with built-in tools. Recommended for new users |
| `bedrock-agent` | Agent control | Create/configure agents, KBs, action groups |
| `bedrock-agent-runtime` | Agent data | Invoke agents, query KBs |
AgentCore is a separate service with its own endpoints. Refer to [AgentCore endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/bedrock_agentcore.html) for the latest.
| Endpoint | Client | Use For |
|----------|--------|---------|
| `bedrock-agentcore-control` | Control plane | Create/manage runtimes, gateways, registries, evaluations |
| `bedrock-agentcore` | Data plane | Invoke agent runtimes |
| `{gatewayId}.gateway.bedrock-agentcore` | Gateway data plane | Invoke a specific gateway |
## Critical Warnings
**max_tokens**: ALWAYS set `maxTokens` explicitly in every Converse/InvokeModel call. Leaving it unset defaults to the model's maximum (e.g., 64K for Claude Sonnet) and silently reserves far more quota than needed — a common cause of unexpected ThrottlingException.
**Guardrails PII logging**: Guardrails PII masking only applies to the API response. Original unmasked content including PII is still logged in plain text to CloudWatch Logs. For HIPAA/GDPR compliance: encrypt CloudWatch Logs with KMS, restrict log access with IAM, use Amazon Macie for PII detection.
**SDK versions**: Requires recent versions of boto3 (≥ 1.34.x) and AWS CLI v2. Older versions are missing Converse API, Agents, and AgentCore support. Run `aws --version` and `pip show boto3` to check.
## Security Considerations
- Use **IAM roles** (not IAM users) for all Bedrock service access
- Scope IAM permissions to specific actions and resource ARNs — avoid `bedrock:*` or `AmazonBedrockFullAccess`
- Store API keys and OAuth secrets in **AWS Secrets Manager** with automatic rotation enabled
- Include **confused deputy protection** (`aws:SourceAccount`, `aws:SourceArn` conditions) in all resource-based policies for Bedrock services
- Treat all **agent-generated parameters as untrusted input** — validate before use in Lambda handlers or tool implementations
- Enable **CloudTrail** for all Bedrock and AgentCore API calls
- For PII workloads: encrypt CloudWatch Logs with KMS, configure retention limits, restrict log access
- Refer to the latest [Bedrock security best practices](https://docs.aws.amazon.com/bedrock/latest/userguide/security.html) for current security guidance
## Converse API vs InvokeModel
For choosing between all Bedrock inference APIs (Responses API, Chat Completions, Converse, InvokeModel), see [APIs supported by Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/apis.html).
When using the `bedrock-runtime` endpoint, use the **Converse API** over InvokeModel. It provides a unified request/response format across all models.
Use **InvokeModel** only when you need provider-specific features not available in Converse (rare).
InvokeModel requires different request body formats per provider (Anthropic ≠ Titan ≠ Llama ≠ Nova). Using the wrong format produces "Malformed input request". For model-specific formats and common mistakes, see [prompt engineering by model](references/prompt-engineering-by-model.md).
**Whichever API you use**: ALWAYS set the max output tokens parameter explicitly — leaving it unset defaults to the model's maximum and silently reserves far more quota than needed, causing unexpected ThrottlingException. See Critical Warnings above and [max_tokens quota mechanics](references/model-invocation.md).
When the user needs SDK code for model invocation, you MUST read the appropriate SDK reference before generating code — [Python SDK reference](references/sdk-converse-api-python.md) | [TypeScript SDK reference](references/sdk-converse-api-typescript.md). Use the patterns from the reference file.
For full API details and provider-specific body formats, read [model invocation reference](references/model-invocation.md) before responding.
## Which Bedrock Capability Do You Need?
| Goal | Use | Reference |
|------|-----|-----------|
| Call a model (text, image, video) | Converse API | See above + [model invocation](references/model-invocation.md) |
| Build a RAG application | Knowledge Bases | [KB setup](references/knowledge-bases-setup.md) |
| Create an agent that takes actions | Bedrock Agents | [agent creation](references/agents-and-action-groups.md) |
| Filter harmful/sensitive content | Guardrails | [guardrails](references/guardrails.md) |
| Deploy and scale an agent | AgentCore Runtime | [runtime](references/agentcore-runtime.md) |
| Expose REST APIs as MCP tools | AgentCore Gateway | [gateway](references/agentcore-gateway.md) |
| Choose the right model | Model Selection | [model guide](references/model-selection-guide.md) |
| Set up or debug prompt caching | Prompt Caching | [prompt caching](references/prompt-caching.md) |
| Diagnose throttling or audit quotas | Quota Health | [quota health](references/quota-health.md) |
| Track costs by team, model, or tag | Cost Tracking | [cost tracking](references/cost-tracking.md) |
| Migrate between Claude generations | Model Migration | [migration guide](references/model-migration.md) |
## Knowledge Bases (RAG)
When the user wants to create a Knowledge Base or build a RAG application, you MUST read [KB setup procedure](references/knowledge-bases-setup.md) and execute it step by step. Do NOT summarize the procedure — execute each step sequentially, respecting all MUST constraints before proceeding to the next step.
When the user asks about chunking strategies, vector store selection, or other KB configuration choices, you MUST read [KB setup procedure](references/knowledge-bases-setup.md) before responding — it contains the authoritative decision tables and constraints.
When the user wants to query an existing Knowledge Base, Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.