-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Description
The Natural Language Policy Authoring notebook in 01-tutorials/08-AgentCore-policy/Natural-Language-Policy-Authoring/ is intended to demonstrate natural language policy generation but currently does not include the generation APIs. The notebook manually creates Cedar policies instead of using the AI-powered generation capabilities.
Current Problem
The notebook's purpose is to showcase how users can generate Cedar policies from natural language descriptions (e.g., "Allow refunds for amounts less than $500"), but it currently:
- Manually writes Cedar policy statements
- Does not use
policy_client.generate_policy()API - Misses the core value proposition of natural language policy authoring
- Does not demonstrate the AI-powered policy generation workflow
Expected Behavior
The notebook should:
- Accept natural language policy descriptions as input
- Use
policy_client.generate_policy()to convert natural language to Cedar policies - Display the generated Cedar policy
- Deploy and test the generated policy
- Demonstrate iterating with different natural language inputs
Proposed Solution
Add policy generation workflow using the starter toolkit's PolicyClient:
- Use
generate_policy()with natural language input - Show the AI-generated Cedar policy output
- Create and deploy the generated policy
- Test enforcement with the generated policy
- Include examples of different natural language policy descriptions
Impact
Without generation APIs, users cannot learn how to use the natural language policy authoring feature, which is the primary purpose of this tutorial.
Files Affected
01-tutorials/08-AgentCore-policy/Natural-Language-Policy-Authoring/AgentCore-Policy-Demo.ipynb
Labels
bug, enhancement, documentation