Overview
AI agents—LLM-powered assistants, autonomous workflows, MCP servers—need to perform actions within user permission contexts. This guide covers patterns for implementing agent delegation in Bedrock.Setting Up Agent Delegation
1. Create the Agent Subject
2. Add Agent to Scope
3. Assign Agent Role
4. Evaluate with Delegation
Common Patterns
Pattern 1: Read-Only Agent
Agent can read anything the user can read, but cannot write:Pattern 2: Scoped Agent Access
Agent only has access in specific scopes:Pattern 3: Capability-Based Permissions
Different agents have different capabilities:Pattern 4: Override Agent Permissions in Sensitive Areas
Pattern 5: Time-Limited Agent Access
Use conditional permissions for time-based restrictions:MCP Server Integration
For Model Context Protocol (MCP) servers:Audit Logging
Always log delegation details:Security Considerations
Principle of least privilege
Principle of least privilege
Give agents the minimum permissions needed. They can never exceed user permissions, but should be further restricted.
Separate agent roles
Separate agent roles
Don’t reuse user roles for agents. Create dedicated agent roles with appropriate restrictions.
Scope restrictions
Scope restrictions
Limit agent memberships to necessary scopes. Don’t add agents to production if they only need development access.
Override sensitive areas
Override sensitive areas
Use scope overrides to disable agent access in compliance, PII, or other sensitive areas.
Audit everything
Audit everything
Log all agent actions with both actor and principal for complete audit trails.
Review agent permissions regularly
Review agent permissions regularly
Periodically audit agent roles and permissions to ensure they’re still appropriate.