Amazon Bedrock、自動化推論ポリシーのライフサイクル管理機能を強化
本文の状態
日本語全文を表示中
詳細モードで約18分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
AWS Machine Learning Blog
Amazon Bedrock は、Anthropic が提供するオープン形式の「Agent Skills」を活用し、コーディングエージェントが自動化推論ポリシーの構築から検証までをコード上で完結させられる機能を導入した。
AI深層分析を開く2026年8月7日 01:54
AI深層分析
キーポイント
Agent Skills の仕組みと役割
Anthropic が提供する軽量なオープン形式で、コーディングエージェントに特定のサービスやドメインに関する専門知識とワークフローを付与する機能である。
自動化推論ポリシーのコード化
開発者が既存のコーディングエージェントを利用して、ポリシーの作成・テスト・デプロイ・検証というライフサイクルをコード上で実行可能にする。
数学的保証によるハルシネーション低減
統計的なサンプリングではなく形式論理に基づいて出力を検証するため、AI の回答がルールに準拠しているという数学的な確実性が得られる。
汎用性の高いエージェント統合
オープン形式であるため Kiro や Cursor などの任意の対応エージェントにインストールでき、タスク発生時に自動的にアクティブ化する仕組みを持つ。
自動化推論チェックの2段階プロセス
まず基盤モデルが自然言語をポリシーの変数に対応する形式論理に変換し、次にSMTソルバーがこの論理をルールに対して検証して判断を下す。この数学的に妥当な検証により、各判断にはそれを支持または反証する具体的なルールが付随する。
重要な引用
Agent Skills are a lightweight, open format from Anthropic.
That approach gives you mathematical certainty that AI responses comply with your rules.
Because the format is open, a skill installs into any agent that supports it.
The validation step is mathematically sound: If the translation is faithful, the verdict is correct.
編集コメントを表示
編集コメント
生成 AI の信頼性確保において、形式論理に基づく検証を開発者の日常ツールに統合するアプローチは実用的な進歩である。特に、Anthropic が提供するオープンフォーマットを採用することで、特定のベンダーロックインを避けつつ標準化されたセキュリティ管理が可能になる点は注目すべき点だ。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
Amazon Bedrock の自動推論チェック(Automated Reasoning checks)を採用するチームは、ポリシーのライフサイクルをコードで実行したいと考えることがよくあります。コードで実行することで、作業の反復性やレビュー可能性が保たれ、すでに利用しているコーディングエージェントによって主導されるようになります。
効果的な自動推論ポリシーを作成するには学習曲線があり、ライフサイクルには注意すべき制約も存在します。ルールは SMT-LIB(自動定理証明器向けの標準入力形式)のサブセットで記述し、サービスが実際のユーザー言語を正しく翻訳できるように変数の説明を調整する必要があります。また、独自の API と制約を持つビルド、テスト、改善のループを通じてポリシーを移行させる必要があります。
Amazon Bedrock の自動推論チェック は、その労力に見合う価値があります。なぜなら、これらは統計的なサンプリングではなく形式論理に基づいて出力を検証するからです。このアプローチにより、AI の回答がルールに準拠しているという数学的な確信を得ることができます。
Amazon Bedrock で自動推論を活用した信頼性の高い AI システムの構築 では、このループを Amazon Bedrock コンソール上で詳しく解説しました。コンソールは、スタート地点としてまた専門家の協力を得る場として最適な場所です。
この記事では、コーディングエージェントから Amazon Bedrock の自動化推論ポリシーを構築・テスト・デプロイ・検証するまでの一連の工程で、「Agent Skills」スイートを活用する方法を解説します。また、このスイートを Amazon Bedrock で実行した結果から、同サービスの挙動について何が明らかになったかも紹介します。
Agent Skills とは何か
Agent Skills は Anthropic が提供する軽量なオープンフォーマットです。スキルはコーディングエージェントに専門知識とワークフローを追加する機能で、特定のサービスやドメインを正しく利用するための構造化されたコンテキストパッケージとして機能します。
これにより、エージェントは不十分だったり古くなったりする可能性のある一般トレーニングデータへの依存から解放されます。各スキルには検証済みのパターン、避けるべき一般的なミステイク、そして段階的なワークフローが含まれています。これらのガイダンスに基づき、エージェントは推測ではなく、タスクに最適な呼び出しを実行します。
フォーマットがオープンであるため、Kiro、Claude Code、Cursor、Codex など、対応するあらゆるエージェントにスキルをインストールできます。必要なタスクについてエージェントに問い合わせると、自動的にアクティブ化されます。
なぜ自動化推論のライフサイクルに適しているのか
自動化推論チェックは、2 つのステップで実行されます。この仕組みを正しく理解することが、活用するための鍵となります。
まず、一連の基盤モデル(FMs)が質問と回答を形式論理へ変換し、自然言語をポリシー内の変数にマッピングします。次に、SMT ソルバー(Satisfiability Modulo Theories:論理式を制約条件に対して検証する自動化推論エンジン)が、その論理をルールと比較して検証し、最終的な判定結果を返します。
この検証ステップは数学的に厳密です。変換が忠実であれば、得られる判定も正しくなります。この「厳密性」こそが、結果の解釈可能性を支える要因でもあります。すべての判定には、それを支持するルールまたは矛盾するルールが具体的に明記されて返されます。

図 1:自動化推論チェックの仕組み
この取り組みは、チェックのライフサイクル全体をカバーするものです。まず、ソースドキュメントからルールを抽出し、サービスが生成した内容を確認します。次に、ユーザーが実際にどのような質問をするかを反映したテストを作成し、失敗の原因を特定します。最後に、ガードレールの背後にバージョン管理されたポリシーをデプロイします。
各ステップには特定の API 形状があり、いくつかのステップには注意が必要な制約が存在します。これは反復作業であり、詳細が多く、明確なルールと明確な失敗モードを持つ業務です。こうした作業は、適切な指示を与えることでコーディングエージェントが得意とする分野です。
ポリシーライフサイクルにおける6 つのスキル
このスイートは、ライフサイクルの各段階に対応する 6 つの Agent Skill から構成されています。それぞれのスキルは、その段階での判断基準をエージェントに教える短い指示ファイルであり、Amazon Bedrock の自動推論 API を呼び出す小さな実行可能スクリプトによって支えられています。
これらのスキルは、API サフェース、発見タイプ、ルール構文を記述した 1 つの参照ドキュメントを共有しています。これにより、スイート全体を通じて一貫したガイダンスが提供されます。

図 2: ポリシーライフサイクルにおける 6 つのスキル
作成時には、ビルダー(builder)スキルがソースドキュメントからポリシーを生成し、そのルールと変数を抽出します。レビューアー(reviewer)スキルは、ビルドによって生成された品質レポートや忠実度レポートを読み込み、矛盾するルールや未使用の変数、単なる主張といった問題点を指摘します。テスター(tester)スキルはシナリオを生成して質問応答テストを実行し、ポリシーが実際の入力を期待通りに変換・検証できるかを確認します。デバッガー(debugger)スキルは失敗の原因を特定し、ポリシーの修正を行います。その基本原則として、「誤った判断はほぼ例外なく翻訳の問題に起因する」と考えます。
実行時には、デプロイヤー(deployer)スキルが番号付きのポリシーバージョンのスナップショットを取得し、ガードレールに紐付けます。バリデーター(validator)スキルは ApplyGuardrail API を用いて回答を検証します。また、失敗した回答の矛盾するルールをモデルへフィードバックして書き換えループを実行することも可能で、これが回答が妥当になるまで継続されます。
How the skills are structured
各スキルは、標準的なエージェントスキルのレイアウトに従います。各工程の核心となる指示(適用タイミングや固有の判断基準など)は SKILL.md ファイルに記述されます。一方、発見対象の種類やルール構文といった詳細情報は references/ フォルダに格納されており、エージェントが必要に応じてのみ読み込まれます。
scripts/ フォルダには、Amazon Bedrock の自動化推論 API を呼び出す実行可能な Python スクリプトが格納されています。これらのスクリプトはスタンドアロンで動作し、--help フラグと --dry-run フラグをサポートしています。これらを使用すれば、各操作の処理内容を確認できるほか、Amazon Bedrock へリクエストが届く前の正確なリクエスト内容を検査することも可能です。
6 つのスキルを統括する共通ライブラリでは、クライアント作成、ビルドワークフローのポーリング、結果の解析、および後述するビルドスロット数の管理といった共通処理を担当します。
ポリシー文書から検証済み回答へ
以下の手順では、育児休業の資格要件に関する人事ポリシーという短い例題を用いて、完全なライフサイクルを実行します。この例は流れを明確にするために簡潔にまとめられていますが、融資の資格審査や保険のカバー範囲など、ルールに従った回答が必要な他のドメインでも同様のステップが適用されます。
事前準備
Amazon Bedrock の自動化された推論チェックが利用可能な AWS リージョンで、AWS アカウントと Amazon Bedrock のコントロールプレーンおよびランタイム API へのアクセス権限が必要です。また、スクリプトを実行するには Python と uv が必要になります。リージョンごとの機能利用状況については、Amazon Bedrock ドキュメントの Automated Reasoning checks をご確認ください。
リポジトリをクローンしたら、スキルをコーディングエージェントにインストールします。
Claude Code では、このスイートをプラグインマーケットプレイスとして追加し、必要なスキルをインストールしてください。
/plugin marketplace add ./amazon-bedrock-samples/responsible_ai/automated-reasoning-checks-skills
/plugin install ar-policy-builder@automated-reasoning-skillsKiro、Cursor、Codex などオープンフォーマットをサポートする他のエージェントでは、npx を使ってインストールできます。
# the skills live in a subfolder, so point npx at the full tree URL
REPO=https://github.com/aws-samples/amazon-bedrock-samples
SUBDIR=responsible_ai/automated-reasoning-checks-skills
npx skills add $REPO/tree/main/$SUBDIR --skill '*'どちらの方法でも、文書からポリシーを作成したり、失敗したテストのデバッグをしたりといった特定のタスクをエージェントに指示すると、対応するスキルが自動的に起動します。
ポリシーの作成とルールの抽出
ルールを平易な言葉で記述した短いソースドキュメントから始めます。例えば、「勤続 12 ヶ月以上のフルタイム従業員は育児休暇の対象となるが、パートタイム従業員は対象外である」といった内容です。
ビルダースキルを使ってポリシーリソースを作成し、ドキュメントから正式なルールと変数スキーマを抽出するビルドを開始します。
uv run create_policy.py --name "hr-leave-policy" \
--description "Validates parental leave eligibility answers"
uv run build_from_document.py --policy-arn \
--file leave-policy.txt --doc-name "Leave Policy" \
--instructions "Capture full-time status and tenure in months; focus on eligibility."1 回の実行で、3 つの文からなるソーステキストから 6 つのルール、4 つの変数、および 1 つのカスタム型が抽出されました。これには勤続年数が負にならないようにする境界ルールも含まれています。
サービスの出力を確認する
ルール抽出は確定的な処理ではないため、テスト前に結果の確認が必要です。レビュー機能(skill)は品質レポートとポリシー定義を取得し、それらを要約します。
uv run audit_policy.py --policy-arn監査レポートでは、ルールの数、変数の数、型の数が報告され、深刻度に応じて構造的な問題がフラグ付けされます。今回のポリシーでは、「未使用の変数が 1 つある」「互いに接続されていないルールセットが存在する」という 2 つの低深刻度の項目が指摘されました。これらはエラーではなく、考慮すべき事項です。また、標準的なコンテンツビルドでは忠実度レポート(fidelity report)は生成されないため、今回のケースでもその旨が報告されています。ただし、専門家がソース根拠を確認したい場合は、別のビルドタイプを指定することでこのレポートを要求できます。
テストの作成と実行
テスター機能(skill)は、ユーザーが問いかける可能性のある質問、モデルが回答する内容、そして期待される判定を含むテストケースを作成し、完成したビルドに対して実行します。
uv run create_test.py --policy-arn \
--input "I'm full-time with 18 months. Am I eligible for leave?" \
--output "Yes, you are eligible for parental leave." \
--expected VALID
uv run run_tests.py --policy-arnテストワークフローでは、期待された判定と実際の判定、および両者が一致しているかが返されます。今回のポリシーでは、回答は「VALID(有効)」として検証され、実際の結果も期待通りのものでした。
ガードレイル背後でのデプロイと回答の検証
ポリシーがテストを通過した後、デプロイ機能(skill)は不変の番号付きバージョンのスナップショットを作成し、これをガードレイルに紐付けます。その後、バリデータ機能(skill)が生きた回答をチェックします。
uv run create_version.py --policy-arn
uv run deploy_guardrail.py --policy-arn \
--policy-version 1 --guardrail-name hr-leave-guardrail
uv run validate_response.py --guardrail-id --guardrail-version 1 \
--question "I'm full-time with 18 months. Am I eligible for parental leave?" \
--answer "Yes, you are eligible for parental leave."バリデーターは結果を返すとともに、チェックが実行されたことを確認します。ここでは回答が VALID(有効)として戻され、それを裏付けるルールが付随しています。これが検証済み回答の監査証跡となります。
スイート実行から得た教訓
Amazon Bedrock に対してライフサイクル全体を実行した結果、2 つの重要な教訓が浮かび上がりました。これらはスキルの動作に直接影響を与えています。
1 つ目は、説明可能性がこの機能の中核にあるという点です。すべての判断には背後にあるルールが含まれます。VALID の回答であればそれを支持するルールを、INVALID(無効)の回答であれば矛盾するルールを提示します。バリデーター・スキルはこれをログに記録するため、承認された回答には「なぜ許可されたのか」を数学的に検証可能な根拠が添付され、却下された回答には「どのルールに違反したか」という具体的な情報がリライト処理へ引き継がれます。
以下の図は、このランタイム時の書き換えループを追跡しています。チェック結果が VALID ではない場合、違反したルールが返されます。モデルはそのルールを元に回答を書き換えた後、再度チェックを実行します。回答が妥当になるまでこのプロセスを繰り返すのです。

図 3: ランタイム時の書き換えループ
2 つ目は、SATISFIABLE という判定が失敗を意味するわけではないという点です。Automated Reasoning では、「ポリシーと矛盾しない回答」と「ポリシーから論理的に導き出される回答」を区別します。例えば、「勤続年数のある正社員は対象となる」というルールがあった場合、対象であると主張する回答はポリシーと矛盾しませんが、必ずしも証明されているわけではありません。そのため、サービスは VALID ではなく SATISFIABLE を返します。この結果を失敗と誤って解釈すると、本来正しいルールを変更してしまう恐れがあります。デバッガースキルはこの区別を組み込んでおり、エージェントが判定結果をサービスの定義通りに解釈できるようにしています。
実用上の制約についても触れておきます。これはスキル側で自動的に処理されるため、ユーザーが意識する必要はありません。ポリシーには並行して実行できるビルドワークフローの数に制限があり、長いリファインメントセッション中にその上限に達する可能性があります。スキルは各ビルドの実行前に最も古い完了済みビルドを削除することでスロットを解放するため、複数のリファインメントを進めるエージェントも上限によって停止することはありません。
Clean up
継続的な課金を避けるために、作成したリソースは依存関係の逆順に削除してください。テストケースやビルドワークフロー、バージョンが存在する間はポリシーが削除されないためです。手順としては、まずテストケースを削除し、次にビルドワークフローと番号付きバージョン、そしてポリシー、最後にガードレールを削除します。スキルもこの順序でリソースを破棄しますが、Amazon Bedrock コンソールから一括して削除することも可能です。
まとめ
自動化された推論チェック(Automated Reasoning checks)は、AI の回答に対する検証可能で説明可能な判断を提供します。この判断の品質は、背後にあるポリシーに依存します。
本記事で紹介する「エージェントスキル」では、ポリシー作成の全ライフサイクルをコード化します。これにより、ポリシーの構築、レビュー、テスト、デバッグ、展開、検証がすべて反復可能なステップとなり、コーディングエージェントが実行し、人間が確認できるようになります。このアプローチは、育児休暇の例や特定の 1 つのエージェントに限定されません。金融、保険、医療など多様なドメインのポリシーに対応可能で、現在利用しているコーディングエージェントへ簡単に導入できます。
まずは以下の手順で始めましょう:
- コードリポジトリ からスキルをインストールし、コーディングエージェントに組み込みます。
- ビルダースキル(builder skill)で自社のポリシー文書を指定し、品質レポートを確認します。
- ユーザーが実際に質問する様子を反映した Q&A テストを追加し、合格するまで改善を重ねます。
- バージョン管理されたポリシーをガードレールの背後に配置し、ランタイムスキル(runtime skill)を使って回答を検証します。
さらに詳しく知りたい場合は、以下の関連リソースもご覧ください:
- Amazon Bedrock 上の自動化推論による信頼性の高い AI システムの構築(コンソールワークフロー向け)
コンプライアンスの観点については、以下の記事が参考になります。
ランタイムでの実装例については、以下の記事をご覧ください。
詳細は、Amazon Bedrock 自動推論チェックのユーザーガイド および Amazon Bedrock API リファレンス をご参照ください。
執筆者について

Adewale Akinfaderin
Adewale は AWS の Amazon Bedrock チームに所属するシニアデータサイエンティストで、生成 AI アプリケーションやファウンデーションモデルの革新に取り組んでいます。専門は再現性のあるエンドツーエンドの AI/ML 手法であり、世界中のお客様が学際的な課題に対してスケーラブルなソリューションを構築できるよう支援しています。物理学の修士号を2つ持ち、工学の博士号を取得しています。

Nafi Diallo
ナフィ氏は、Amazon Web Services のシニア・アプライドサイエンティストです。信頼性の高い AI ソリューションのための AI セーフティ、形式検証、ガールレールの実装を専門としています。生成 AI やエージェントシステムにおける Amazon Bedrock 上の信頼性評価と改善には深い経験を持っています。また、AWS 内の Women in AI and ML (WAIML) の北米地域リーダーも務めており、チャプターの成長支援や、同組織のミッションを地域全体で推進する役割を担っています。
原文を表示
Teams that adopt Amazon Bedrock Automated Reasoning checks often want to run the policy lifecycle in code. Running it in code keeps the work repeatable, reviewable, and driven by the coding agent they already use. Authoring a good Automated Reasoning policy has a learning curve, and the lifecycle has constraints that can trip you up. You write rules in a subset of SMT-LIB (a standard input format for automated theorem provers) and tune variable descriptions until the service translates real user language correctly. You also move a policy through a build, test, and refine loop with its own APIs and constraints.
Automated Reasoning checks are worth that effort because they validate outputs against formal logic rather than sampling them statistically. That approach gives you mathematical certainty that AI responses comply with your rules. In Build reliable AI systems with Automated Reasoning on Amazon Bedrock, we walked through this loop in the Amazon Bedrock console. The console is the right place to start and to collaborate with subject matter experts.
In this post, you learn how to use a suite of Agent Skills to build, test, deploy, and validate an Amazon Bedrock Automated Reasoning policy end to end from a coding agent. You also see what running the suite against Amazon Bedrock revealed about how the service behaves.
What are Agent Skills?
Agent Skills are a lightweight, open format from Anthropic. A skill extends a coding agent with specialized knowledge and workflows. It’s a structured context package that teaches the agent how to use a specific service or domain correctly. The agent no longer relies on general training data that may be incomplete or out of date. Each skill carries validated patterns, the common mistakes to avoid, and step-by-step workflows. With that guidance, the agent produces the right calls for the task instead of a plausible guess. Because the format is open, a skill installs into any agent that supports it, including Kiro, Claude Code, Cursor, and Codex. It then activates automatically when you ask the agent about the task it covers.
Why an agent fits the Automated Reasoning lifecycle
An Automated Reasoning check runs in two steps, and understanding the split is the key to working with it. First, a set of foundation models (FMs) translates the question and answer into formal logic, mapping the natural language to the variables in your policy. Then an SMT solver (Satisfiability Modulo Theories, an automated reasoning engine that checks logical formulas against constraints) validates that logic against your rules and returns a verdict. The validation step is mathematically sound: If the translation is faithful, the verdict is correct. That soundness is also what makes the result explainable. Every verdict comes back with the specific rules that support or contradict it.

**Figure 1: How an Automated Reasoning check works
The work sits in the lifecycle around that check. You extract rules from a source document, review what the service produced, write tests that reflect how your users actually ask questions, diagnose the failures, and deploy a versioned policy behind a guardrail. Each step has a specific API shape, and a few have constraints that can trip you up. This is repetitive, detail-heavy work with clear rules and clear failure modes, which is the kind of work a coding agent handles well when you give it the right instructions.
Six skills across the policy lifecycle
The suite is a set of six Agent Skills, one for each stage of the lifecycle. Each skill is a short instruction file that teaches the agent the judgment for its stage, backed by small runnable scripts that call the Amazon Bedrock Automated Reasoning APIs. The skills share one reference document that describes the API surface, the finding types, and the rule syntax, so guidance stays consistent across the suite.

Figure 2: The six skills across the policy lifecycle
At authoring time, the builder skill creates a policy from a source document and extracts its rules and variables. The reviewer skill reads the quality and fidelity reports the build produces and flags issues such as conflicting rules, unused variables, and bare assertions. The tester skill generates scenarios and runs question-and-answer tests that check whether the policy translates and validates real inputs the way you expect. The debugger** skill diagnoses failures and repairs the policy, working from the principle that a wrong verdict almost always comes from a translation problem rather than the rules.
At runtime, the deployer skill snapshots a numbered policy version and attaches it to a guardrail. The validator skill checks answers with the ApplyGuardrail API. It can also run a rewrite loop that feeds a failing answer’s contradicting rules back to the model until the answer is sound.
How the skills are structured
Each skill follows the standard Agent Skills layout. A SKILL.md file holds the core instructions for that stage, including when the skill applies and the judgment calls specific to it. A references/ folder holds deeper material, such as the finding types and the rule syntax, that the agent loads only when it needs the detail. A scripts/ folder holds the runnable Python that calls the Amazon Bedrock Automated Reasoning APIs. The scripts are standalone and take a --help flag and a --dry-run flag. You can read what an operation does and inspect the exact request before it reaches Amazon Bedrock. A shared library underneath the six skills handles the common work: creating clients, polling build workflows, parsing findings, and managing the build-slot limit described later in this post.
From a policy document to a verified answer
The following walkthrough runs the full lifecycle on a short human resources policy for parental leave eligibility. The example is compact so the flow is clear, and the same steps apply to a loan eligibility policy, an insurance coverage policy, or other domains where answers must follow written rules.
Prerequisites
You need an AWS account with access to Amazon Bedrock in an AWS Region where Automated Reasoning checks are available, permissions for the Amazon Bedrock control plane and runtime APIs, and Python with uv to run the scripts. For feature availability by Region, refer to Automated Reasoning checks in the Amazon Bedrock documentation. Clone the repository, then install the skills into your coding agent.
In Claude Code, add the suite as a plugin marketplace and install the skills you want:
/plugin marketplace add ./amazon-bedrock-samples/responsible_ai/automated-reasoning-checks-skills
/plugin install ar-policy-builder@automated-reasoning-skillsFor other agents that support the open format, such as Kiro, Cursor, and Codex, install with npx:
# the skills live in a subfolder, so point npx at the full tree URL
REPO=https://github.com/aws-samples/amazon-bedrock-samples
SUBDIR=responsible_ai/automated-reasoning-checks-skills
npx skills add $REPO/tree/main/$SUBDIR --skill '*'Either way, a skill activates automatically when you ask your agent about the matching task, such as creating a policy from a document or debugging a failing test.
Create the policy and extract rules
Start from a short source document that states the rules in plain language, for example that full-time employees with more than 12 months of service are eligible for parental leave and part-time employees aren’t. The builder skill creates the policy resource and starts a build that extracts formal rules and a variable schema from the document.
uv run create_policy.py --name "hr-leave-policy" \
--description "Validates parental leave eligibility answers"
uv run build_from_document.py --policy-arn \
--file leave-policy.txt --doc-name "Leave Policy" \
--instructions "Capture full-time status and tenure in months; focus on eligibility."In one run, the build extracted six rules, four variables, and one custom type from three sentences of source text, including a boundary rule that keeps tenure non-negative.
Review what the service produced
Rule extraction is not deterministic, so review the result before you test it. The reviewer skill pulls the quality report and the policy definition and summarizes them.
uv run audit_policy.py --policy-arnThe audit reports the rule, variable, and type counts, then flags structural issues by severity. For this policy it noted one unused variable and one disjoint rule set, both low-severity items to consider rather than errors. It also reports that a fidelity report wasn’t produced, because a standard content build does not generate one. You request it with a separate build type when you want the source-grounding view for a subject matter expert.
Write and run a test
The tester skill creates a question-and-answer test and runs it against the completed build. A test states the question a user might ask, the answer your model might give, and the verdict you expect.
uv run create_test.py --policy-arn \
--input "I'm full-time with 18 months. Am I eligible for leave?" \
--output "Yes, you are eligible for parental leave." \
--expected VALID
uv run run_tests.py --policy-arnThe test workflow returns the expected and actual verdicts and whether they match. For this policy the answer validated as VALID, with the actual result matching the expected result.
Deploy behind a guardrail and validate an answer
After the policy passes its tests, the deployer skill snapshots an immutable numbered version and attaches it to a guardrail, and the validator skill checks a live answer.
uv run create_version.py --policy-arn
uv run deploy_guardrail.py --policy-arn \
--policy-version 1 --guardrail-name hr-leave-guardrail
uv run validate_response.py --guardrail-id --guardrail-version 1 \
--question "I'm full-time with 18 months. Am I eligible for parental leave?" \
--answer "Yes, you are eligible for parental leave."The validator returns the finding and confirms that the check ran. Here the answer came back VALID with the supporting rule attached, which is the audit trail you keep for a validated response.
What running the suite taught us
Two lessons stand out from running the full lifecycle against Amazon Bedrock, and both shape how the skills behave.
The first is that explainability sits at the center of how the feature works. Every verdict returns the rules behind it, the supporting rules for a VALID answer and the contradicting rules for an INVALID one. The validator skill logs these so a validated answer ships with mathematically verifiable proof of why it was allowed, and a rejected answer carries the exact rule it broke into the rewrite step. The following diagram traces that runtime rewrite loop. The check returns a non-VALID verdict with the rule the answer broke, the model rewrites the answer using that rule, and the check runs again until the answer is sound.

Figure 3: The runtime rewrite loop
The second is that a SATISFIABLE verdict isn’t a failure. Automated Reasoning distinguishes between an answer that’s consistent with your policy and one that is entailed by it. Suppose a rule says full-time employees with sufficient tenure are eligible. An answer that asserts eligibility is consistent with the policy but not proven by it, so the service returns SATISFIABLE rather than VALID. Reading that result as a failure leads you to change rules that were correct. The debugger skill encodes this distinction so the agent interprets verdicts the way the service defines them.
A practical constraint is worth noting because the skills handle it for you. A policy allows a limited number of concurrent build workflows, and a long refinement session can reach that limit. The skills release a slot automatically before each build by removing the oldest completed build, so an agent working through several refinements doesn’t stall on the cap.
Clean up
To avoid ongoing charges, delete the resources you created in dependency order, because a policy won’t delete while its test cases, build workflows, or versions still exist. Remove the test cases first, then the build workflows and the numbered version, then the policy, and finally the guardrail. The skills follow this sequence when they tear down resources, and you can also delete everything from the Amazon Bedrock console.
まとめ
Automated Reasoning checks give you verifiable, explainable verdicts on AI answers, and the quality of those verdicts depends on the policy behind them. The Agent Skills in this post move the full authoring lifecycle into code, so building, reviewing, testing, debugging, deploying, and validating a policy become repeatable steps your coding agent can run and you can review. The approach is not limited to the parental leave example or to one agent. It applies to various policy domains, from finance to insurance to healthcare, and installs into the coding agents you already use.
To get started:
- Install the skills from the code repository into your coding agent.
- Point the builder skill at your own policy document and review the quality report.
- Add question-and-answer tests that reflect how your users ask questions, and refine until they pass.
- Deploy a versioned policy behind a guardrail and validate answers with the runtime skill.
To go deeper, explore these related resources:
- Build reliable AI systems with Automated Reasoning on Amazon Bedrock for the console workflow.
- How Automated Reasoning checks in Amazon Bedrock transform generative AI compliance for the compliance perspective.
- Automated Reasoning checks rewriting chatbot for a runtime reference implementation.
- The Amazon Bedrock Automated Reasoning checks user guide and the Amazon Bedrock API reference.
About the authors

Adewale Akinfaderin
Adewale is a Sr. Data Scientist for Generative AI on the Amazon Bedrock team at AWS, where he works on innovations in foundation models and generative AI applications. His expertise is in reproducible, end-to-end AI/ML methods, and helping global customers build scalable solutions to interdisciplinary problems. He holds two graduate degrees in physics and a doctorate in engineering.

Nafi Diallo
Nafi is a Sr. Applied Scientist at Amazon Web Services, specializing in AI safety, formal verification, and guardrails implementation for trustworthy AI solutions. She brings deep experience evaluating and improving the reliability of generative AI and agentic systems on Amazon Bedrock. Nafi also serves as the Regional Lead for North America for the Women in AI and ML (WAIML) organization at AWS, where she supports chapter growth and advances WAIML’s mission across the region.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み