← All examples
AgentToolAuthorization
examples/AgentToolAuthorization.thunder
AgentToolAuthorization.thunder
1# area: Agent safety2mission AgentToolAuthorization34goal5 Decide whether an agent may call a tool within an approved permission scope.67why8 A model proposal must pass the same permission check as a human action.910guarantee tool access requires a valid permission scope11 verify test ToolAccess1213never allow a write without explicit approval14 verify test ToolAccess1516decision ToolAccess17 inputs18 scopeAllowed19 isWrite20 approved21 rule read within scope22 when scopeAllowed == true and isWrite == false23 return Allow24 rule approved write within scope25 when scopeAllowed == true and isWrite == true and approved == true26 return Allow27 default28 return Deny2930test ToolAccess31 case scoped read32 given scopeAllowed true, isWrite false, approved false33 expect Allow34 case unapproved write35 given scopeAllowed true, isWrite true, approved false36 expect Deny37 case approved write38 given scopeAllowed true, isWrite true, approved true39 expect Allow40 case out of scope read41 given scopeAllowed false, isWrite false, approved false42 expect Deny43 case approval cannot expand scope44 given scopeAllowed false, isWrite true, approved true45 expect Deny4647note security48 Enforce this decision in the tool host before execution. These cases do not install a runtime permission boundary.Draft syntax. This file is illustrative and does not run yet.
More examples
AgentSpendBudgetAlertRoutingApiGatewayBillingServiceCalculateRiskScoreCertificationAttemptCertificationCheckoutCertificationEligibilityCertificationStudyPlanCreateInvoiceCreateStudyPlanCustomerDataRequestDuplicateInvoicePreventionGroundedAnswerIngestClickstreamInvoiceCreatedNetworkEgressPolicyPlaceOrderResearchAgentRunResetPasswordStorefrontStyleSubscriptionUpgradeTenantIsolationTwelveFactorAgentUploadStudyMaterial