Skip to main content
Security is built into PLai Framework at every level. This guide covers access control, credential management, safety guardrails, and compliance features.

Role-Based Access Control (RBAC)

RBAC determines who can do what in your organization and projects.

How RBAC Works

  1. Organization level
    • OWNER β€” full access
    • ADMIN β€” full access (except billing)
    • VIEWER β€” read-only
  2. Members join projects
  3. Project level (within each project)
    • MEMBER β€” create and edit resources
    • VIEWER β€” read-only access

Access Matrix

Best Practices for Access Control

Least Privilege

Grant only the minimum access needed. Default to VIEWER, grant MEMBER when necessary.

Regular Audits

Periodically review who has access and remove unnecessary members

Segregate Projects

Use different projects for different teams/use cases for better isolation

Admin Reviews

Have OWNER/ADMIN regularly review who has access to sensitive projects

Credentials: Secure Secret Storage

Credentials are securely stored API keys, tokens, passwords, and other secrets that tools and agents need.

What Can Be Stored as Credentials

  • API Keys - For external services (SendGrid, Stripe, etc.)
  • Tokens - OAuth tokens, bearer tokens
  • Passwords - Database passwords, service accounts
  • Connection Strings - Database URLs, connection info
  • Certificates - SSL certificates, authentication certs

Credential Security

PLai Framework keeps credentials safe: βœ… Encryption - All credentials encrypted at rest
βœ… Access Control - Only assigned agents can use them
βœ… Audit Logging - Every access logged and tracked
βœ… Rotation - Easily update without recreating tools
βœ… Scope - Credentials scoped to specific projects/agents

Using Credentials

1

Create Credential

Go to Project Settings β†’ Credentials β†’ Add credential
2

Enter Secret

Provide the API key, token, or password
3

Name It

Give it a descriptive name (e.g., β€œSendGrid API Key”)
4

Assign to Tools

When creating a tool, select which credential to use
5

Verify

Test the tool to ensure credential works

Credential Best Practices

Never put credentials directly in agent instructions or datasources. Always use the Credentials system.
  • βœ… Use descriptive names (β€œSendGrid API”, not β€œkey1”)
  • βœ… Rotate credentials periodically
  • βœ… Use service accounts instead of personal credentials
  • βœ… Limit credential scope to only what’s needed
  • βœ… Audit who accessed credentials

Guardrails: Safety Constraints

Guardrails are safety rules that constrain what agents can do.

Types of Guardrails

Prevent agents from outputting certain types of content:
  • No sensitive data (PII, passwords, etc.)
  • No hate speech or offensive content
  • No instructions for illegal activities
  • Custom filters based on keywords
Control how much an agent can do:
  • Max calls per hour/day
  • Max processing time per request
  • Throttle requests during high load
  • Prevent accidental runaway costs
Ensure inputs meet safety requirements:
  • Max input length
  • Required fields
  • Allowed patterns/formats
  • Block suspicious inputs
Verify outputs before sending:
  • Check response quality
  • Validate format
  • Ensure no sensitive data leaked
  • Scan for malicious content
Limit which tools agents can use:
  • Only specific APIs allowed
  • No code execution
  • No external datasources
  • Restricted tool parameters

Answer Filters

Answer Filters are specific guardrails for agent responses.
  1. Agent generates response
  2. Answer filters apply:
    • Check length
    • Check tone
    • Scan for PII
    • Validate accuracy
    • Check confidence
  3. Response sent or blocked

Configuring Guardrails

1

Go to Agent Settings

Open your agent configuration
2

Find Guardrails Section

Look for Safety, Constraints, or Guardrails settings
3

Define Rules

Set specific constraints:
  • Max tokens: 2000
  • Rate limit: 100/hour
  • Disallowed terms: [list]
4

Test

Test agent with guardrails enabled
5

Monitor

Track how often guardrails trigger

Encryption & Data Protection

Data Security at Rest

  • πŸ”’ All data encrypted in database (AES-256)
  • πŸ—„οΈ Backups encrypted
  • πŸ“ Credentials double-encrypted
  • πŸ”‘ Encryption keys rotated regularly

Data Security in Transit

  • πŸ” All communication via HTTPS/TLS
  • 🀝 Certificate pinning for APIs
  • πŸ“Š Secure WebSocket connections
  • πŸ›‘οΈ DDoS protection

Data Retention

  • πŸ“… Configurable retention policies
  • πŸ—‘οΈ Automatic deletion after X days
  • πŸ“‹ Audit logs retained longer
  • πŸ”„ Backups kept for recovery

Activity Audit Logs

Audit logs track everything that happens in your organization and projects.

What Gets Logged

Accessing Audit Logs

Audit Log Fields


Compliance Features

Data Governance

  • βœ… Data classification (public, internal, confidential)
  • βœ… Access controls based on classification
  • βœ… Automatic masking of sensitive data
  • βœ… Compliance reporting

Privacy

  • βœ… No data used for model training (data stays yours)
  • βœ… GDPR compliance (right to be forgotten)
  • βœ… Data residency options (EU, US, etc.)
  • βœ… Privacy-preserving analytics

Monitoring & Alerts

  • 🚨 Alerts for unusual activity
  • πŸ“Š Compliance dashboards
  • πŸ” Threat detection
  • πŸ“‹ Regular compliance reports

Security Best Practices

For Organizations

Limit OWNER Role

Keep OWNER role to 2-3 trusted people. Most people should be ADMIN or VIEWER.

MFA

Require multi-factor authentication for OWNER/ADMIN accounts

Regular Reviews

Monthly review of member access and audit logs

Incident Plan

Have a plan for security incidents. Know who to contact.

For Agents & Tools

Minimize Permissions

Only give agents the tools and datasources they actually need

Use Service Accounts

Use service account credentials, not personal credentials

Enable Guardrails

Always enable guardrails, especially for production agents

Rate Limit

Set reasonable rate limits to prevent runaway costs or abuse

For Data

Encrypt Credentials

Always use the Credentials system, never hardcode secrets

Mask PII

Use answer filters to prevent PII leakage

Audit Access

Regularly review audit logs for unauthorized access

Clean Logs

Archive old logs and delete sensitive test data

Troubleshooting Security Issues

Solutions:
  • Check if agent has permission for the tool
  • Verify credential is valid and assigned
  • Check rate limits not exceeded
  • Ensure guardrails aren’t blocking legitimate requests
Solutions:
  • Verify credential value is correct
  • Check credential hasn’t expired
  • Test credential outside PLai
  • Recreate credential if needed
Check:
  • Audit logs show who accessed what
  • All credentials encrypted
  • All communication HTTPS
  • Retention policies set appropriately
  • Guardrails enabled on production agents
Steps:
  • Go to Organization or Project Settings
  • Find the member
  • Click β€œRemove” (OWNER/ADMIN only)
  • They lose access immediately
  • Check audit log confirms removal

Compliance & Regulations

PLai Framework supports compliance with:
  • πŸ‡ͺπŸ‡Ί GDPR - General Data Protection Regulation (EU)
  • πŸ‡ͺπŸ‡Ί EU AI Act - The world’s first comprehensive legal framework regulating artificial intelligence across the European Union (EU)
  • πŸ“‹ ISO 27001 - Information security management (certification in prgoress)
For compliance requirements, contact your account manager.

Key Takeaways

βœ… RBAC - Control who can access what
βœ… Credentials - Safely store and manage secrets
βœ… Guardrails - Enforce safety constraints on agents
βœ… Encryption - All data protected in transit and at rest
βœ… Audit Logs - Track everything for accountability

Next Steps