Overview
Piper uses a flexible Role-Based Access Control (RBAC) system to manage what users and API tokens can do within an organization. Each organization has roles that grant specific permissions, and users are assigned a single role within each organization.Organization Ownership
Every organization has a single owner - the user who has ultimate control over the organization. Organization ownership is tracked viaowner_user_id and is separate from RBAC roles.
The organization owner:
- Automatically has all permissions regardless of assigned role
- Is the only user who can delete the organization
- Is the only user who can transfer ownership to another user
- Can perform billing and subscription management
Ownership is not a role - it’s a separate property of the organization. The owner is typically assigned the Admin role, but their ownership status grants them all permissions automatically, even if their role wouldn’t normally allow it.
System Roles
Every organization comes with three built-in system roles that cannot be modified or deleted:| Role | Description | Key Capabilities |
|---|---|---|
| Admin | Organization management | Manage members, settings, tokens, and all content |
| Editor | Content creation | Create and edit agents, knowledge, and tests |
| Viewer | Read-only access | View resources and invoke agents |
Role Permission Matrix
The following table shows exactly which permissions each system role includes. Note that the organization owner (regardless of role) has all permissions.| Permission | Admin | Editor | Viewer |
|---|---|---|---|
| Organization | |||
org:read | ✓ | ✓ | ✓ |
org:update | ✓ | ||
org:delete | |||
org:billing | |||
| Members | |||
members:read | ✓ | ✓ | ✓ |
members:invite | ✓ | ||
members:update | ✓ | ||
members:remove | ✓ | ||
| Agents | |||
agents:read | ✓ | ✓ | ✓ |
agents:create | ✓ | ✓ | |
agents:update | ✓ | ✓ | |
agents:delete | ✓ | ✓ | |
| Knowledge | |||
knowledge:read | ✓ | ✓ | ✓ |
knowledge:create | ✓ | ✓ | |
knowledge:update | ✓ | ✓ | |
knowledge:delete | ✓ | ✓ | |
| Tests | |||
tests:read | ✓ | ✓ | ✓ |
tests:create | ✓ | ✓ | |
tests:update | ✓ | ✓ | |
tests:delete | ✓ | ✓ | |
tests:execute | ✓ | ✓ | |
| API Tokens | |||
tokens:read | ✓ | ||
tokens:create | ✓ | ||
tokens:revoke | ✓ | ||
| Roles | |||
roles:read | ✓ | ✓ | ✓ |
roles:create | ✓ | ||
roles:update | ✓ | ||
roles:delete | ✓ | ||
| Runtime | |||
runtime:invoke | ✓ | ✓ | ✓ |
The organization owner always has
org:delete and org:billing permissions, even though no system role grants them. These are ownership-specific permissions.Permissions
Permissions follow aresource:action format. For example, agents:create allows creating agents.
Permission Categories
Organization (org:*)
Organization (org:*)
| Permission | Description |
|---|---|
org:read | View organization details |
org:update | Update organization settings |
org:delete | Delete the organization (owner only) |
org:billing | Manage billing and subscription (owner only) |
Members (members:*)
Members (members:*)
| Permission | Description |
|---|---|
members:read | View organization members |
members:invite | Invite new members |
members:update | Update member roles |
members:remove | Remove members |
Agents (agents:*)
Agents (agents:*)
| Permission | Description |
|---|---|
agents:read | View agents |
agents:create | Create new agents |
agents:update | Modify existing agents |
agents:delete | Delete agents |
Knowledge (knowledge:*)
Knowledge (knowledge:*)
| Permission | Description |
|---|---|
knowledge:read | View collections and documents |
knowledge:create | Create collections and upload documents |
knowledge:update | Modify collections and documents |
knowledge:delete | Delete collections and documents |
Tests (tests:*)
Tests (tests:*)
| Permission | Description |
|---|---|
tests:read | View test configurations |
tests:create | Create test suites |
tests:update | Modify test configurations |
tests:delete | Delete tests |
tests:execute | Run test executions |
Platform Tokens (tokens:*)
Platform Tokens (tokens:*)
| Permission | Description |
|---|---|
tokens:read | View API tokens |
tokens:create | Create new API tokens |
tokens:revoke | Revoke existing tokens |
Roles (roles:*)
Roles (roles:*)
| Permission | Description |
|---|---|
roles:read | View roles and their permissions |
roles:create | Create custom roles |
roles:update | Modify custom roles |
roles:delete | Delete custom roles |
Runtime (runtime:*)
Runtime (runtime:*)
| Permission | Description |
|---|---|
runtime:invoke | Invoke agents and get responses |
Custom Roles
Admins can create custom roles with specific permission sets:Wildcard Permissions
Use wildcards to grant all permissions in a category:agents:*- All agent permissions (read, create, update, delete)*- All permissions (Admin role uses this)
Role Assignment
Each user has one role per organization. When inviting a user, you select which role they should have:- Admin - For users who need to manage the organization
- Editor - For users who create content (agents, knowledge, tests)
- Viewer - For users who only need to view and use existing resources
Platform Token Permissions
API tokens are created with explicit permissions rather than roles. The token can have any subset of the creating user’s permissions:Dashboard Experience
The Piper dashboard automatically adapts to your permissions. You’ll only see actions and features you’re authorized to use.What You’ll See by Role
| Role | Dashboard Experience |
|---|---|
| Viewer | Read-only access. Can browse agents, knowledge, and tests but cannot create, edit, or delete. Forms are disabled. |
| Editor | Full content creation. Can create and manage agents, knowledge, and tests. Cannot manage members or API tokens. |
| Admin | Organization management. Everything Editors can do, plus invite/remove members, manage API tokens, and update org settings. |
| Owner | Full control. Same as Admin plus the ability to delete the organization and manage billing. The owner is always shown with their assigned role (typically Admin). |
Permission-Aware UI
- Hidden buttons: Actions you can’t perform won’t appear. For example, Viewers won’t see “Create Agent” or “Delete” buttons.
- Disabled forms: If you can view a resource but not edit it, form fields will be disabled.
- Permission errors: If an action fails due to permissions (e.g., a permission was revoked mid-session), you’ll see a “Permission Denied” dialog explaining why.
Best Practices
Principle of Least Privilege
Assign users the minimum permissions they need. Start with Viewer and upgrade to Editor or Admin only as needed.
Use Custom Roles
Create custom roles for specific permission combinations rather than relying only on the three system roles.
Scope API Tokens
Create tokens with only the permissions required for their specific use case. Never use
* (all permissions) for tokens.Audit Regularly
Periodically review role assignments and remove unnecessary permissions.