Skip to main content
Truly Agentic gates every tool call across explicit AgencyLevel (1 | 2 | 3 | 4 | 5) and ActionTier ('read' | 'propose' | 'write') rules inside PolicyEngine (src/policy-engine.ts). Language models never evaluate their own permission boundaries. Even if an upstream prompt attempts to persuade the model into issuing a wire or bypassing review, PolicyEngine.evaluate() denies or holds the tool call deterministically in TypeScript.

Tier-to-Level Mapping

In src/policy-engine.ts:
Each ToolPolicy specifies both a tier and a minAgencyLevel, while PolicyEngine takes Math.max(policy.minAgencyLevel, TIER_REQUIRED_AGENCY[policy.tier]).

Deterministic Parameter Validation

Beyond agency levels, PolicyEngine enforces hard code-level checks (validateDeterministicConstraints) on every candidate ToolCallRequest:
  • maxAmountUsd: Rejects non-positive, non-finite, or over-ceiling monetary amounts
  • allowedCurrencies: Enforces uppercase currency allowlists (e.g. ['USD', 'AED', 'EUR'])
  • allowedIbanPrefixes: Validates structural IBAN regex and restricts permitted country prefixes (e.g. ['AE', 'GB', 'DE'])
  • allowedRecipientDomains: Restricts destination vendor/recipient email domains against approved allowlists
Any mismatch returns outcome: 'deny' tagged with ['ASI02', 'ASI05'] and appends a blocked audit record before returning.