

# Use controls with AI agents

Data protection and business continuity controls help you give AI agents more infrastructure work, such as cleanup and optimization. AI agents that deploy through CloudFormation or AWS Cloud Development Kit (AWS CDK) get the controls with no setup. The controls check the stack operations that the agent runs through CloudFormation, before any resource changes.

For agents, use the following recommendations:
+ Deny `DisableValidation` in the roles that agents use. For more information, see [Override controls for an operation](aws-managed-proactive-controls-proceed.md).
+ Set `FAIL` mode for the controls that cover the resources your applications depend on.
+ Have the agent preview changes with change sets, or with `cdk deploy --method=prepare-change-set`. Have the agent read the findings with `describe-events` before it executes the change set. For more information, see [View findings from controls](aws-managed-proactive-controls-findings.md).

## Install the CloudFormation skill for your agent
<a name="aws-managed-proactive-controls-ai-agents-skill"></a>

To help your agent work with CloudFormation, install the `aws-cloudformation` skill from the Agent Toolkit for AWS. The skill helps the agent validate templates and change sets, read validation results, and troubleshoot failed stack operations. For example, for agents that support the open source agent skills format, run the following command:

```bash
npx skills add aws/agent-toolkit-for-aws/skills --skill aws-cloudformation --yes --global
```

For installation steps for Claude Code, Kiro, and other agents, see [Agent setup guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/agent-setup-guide.html) in the *CloudFormation User Guide*.