Use Cases

Agent OTP secures AI agents across industries and applications. See how teams are using scoped, ephemeral permissions to build trustworthy AI systems.

Email Automation

Secure your AI agents that send emails on your behalf. Control who they can email, what subjects they can use, and require approval for sensitive communications.

  • Restrict recipients to whitelisted domains
  • Require approval for external emails
  • Limit daily email volume
  • Audit all sent communications
example.ts
await otp.requestPermission({
  action: 'email.send',
  resource: 'email:client@example.com',
  scope: {
    max_emails: 1,
    subject_pattern: '^Invoice.*',
  },
});

Financial Operations

Add human oversight to AI agents handling payments, transfers, and financial data. Set limits, require multi-level approval, and maintain compliance.

  • Set transaction amount limits
  • Require approval above thresholds
  • Restrict to specific accounts
  • Complete audit trail for compliance
example.ts
await otp.requestPermission({
  action: 'bank.transfer',
  resource: 'account:checking',
  scope: {
    max_amount: 1000,
    currency: 'USD',
  },
  context: {
    reason: 'Vendor payment',
  },
});

File System Access

Control what files your AI agents can read, write, or delete. Restrict access to specific directories, file types, and sizes.

  • Restrict to specific directories
  • Limit file size operations
  • Allow only certain file types
  • Auto-approve reads, require approval for writes
example.ts
await otp.requestPermission({
  action: 'file.write',
  resource: 'path:/data/reports',
  scope: {
    max_size: 10485760, // 10MB
    allowed_extensions: ['.pdf', '.csv'],
  },
});

Database Operations

Protect your databases from unintended modifications. Control what queries can be executed, which tables can be accessed, and how much data can be affected.

  • Restrict to read-only or specific operations
  • Limit affected row counts
  • Require approval for DDL statements
  • Whitelist specific tables
example.ts
await otp.requestPermission({
  action: 'db.query',
  resource: 'table:users',
  scope: {
    operations: ['SELECT'],
    max_rows: 1000,
  },
});

API Integrations

Secure third-party API calls made by your agents. Control rate limits, endpoints, and data exposure when interacting with external services.

  • Whitelist allowed endpoints
  • Rate limit API calls
  • Restrict HTTP methods
  • Mask sensitive response data
example.ts
await otp.requestPermission({
  action: 'api.call',
  resource: 'api:stripe.com',
  scope: {
    endpoints: ['/v1/charges'],
    methods: ['POST'],
    rate_limit: 10, // per minute
  },
});

Code Execution

For agents that can execute code or run commands, add safety controls. Sandbox environments, restrict commands, and require approval for system changes.

  • Whitelist allowed commands
  • Restrict execution environments
  • Set resource limits (CPU, memory)
  • Require approval for system modifications
example.ts
await otp.requestPermission({
  action: 'shell.execute',
  resource: 'env:sandbox',
  scope: {
    allowed_commands: ['ls', 'cat', 'grep'],
    max_runtime: 30000, // 30 seconds
  },
});

Ready to secure your AI agents?

Start with our free tier and scale as your needs grow. Full SDK access, no credit card required.