AutoGen
Install
Integration
from scopebound import ScopeboundSDK
from scopebound.adapters.autogen import enforce_autogen
sb = ScopeboundSDK()
@enforce_autogen(sb, role="invoice-processor")
def read_invoices(status: str = "pending") -> str:
return get_invoices(status)
Deny example
On deny, enforce_autogen returns a structured error dict instead of raising — AutoGen agents can handle this as a tool result:
result = read_invoices(status="pending")
if isinstance(result, dict) and result.get("error"):
print(result["deny_code"]) # SCOPE_VIOLATION