Overview
The permission system determines agent access through multiple pathways:- Public agent flag
- Direct user-to-agent links
- Permission-based access
- Access control rules
- System requirements
Portal Access and Agent Permissions
Assigning permissions to a user determines which agents they can use. It does not, by itself, authorize that user to enter the client portal. For portals using Clerk sign-in, non-administrator accounts must also match an active email access rule: a specific email address, their email domain, or the wildcard domain*. Staff and superadmin accounts are exempt from this portal entry check.
For example, a user can have the seller permission and still receive 401 Unauthorized when opening the portal if no active email rule matches them. A direct agent assignment does not replace that rule either.
This portal entry check is separate from the agent access checks below and from widget authentication.
Public Agents
Toggle Make this agent public in an agent’s Access Control tab to let every user call it — including non-authenticated users — regardless of permissions or rules. Use this for agents meant to be available to everyone (for example, a general help agent) instead of linking the agent to every permission. The public-agent shortcut requires an active agent. Staff and superadmins can access inactive agents for testing, and an agent assigned as a permission’s default can remain accessible through that permission. To withdraw access, also remove default-agent assignments; do not rely on the status alone.How Access Is Determined
Staff and superadmins can access any existing agent. Other users can call an active public agent or an agent available through one of their active permissions. A missing agent returns 404 Not Found; an existing agent the user cannot access returns 403 Forbidden. For each active permission, AGO includes its active linked agents and its configured default agent. Direct user assignments and agents from matching email/domain rules supplement a permission group only when that group already has a default agent, an active linked agent, or an active public agent. A direct agent assignment or an agent-only email rule is therefore not sufficient for a user with no active permissions. For predictable access, grant an active permission and link the intended agents to it.
Custom permissions control customer-facing agents and content. They do not grant staff, viewer, or organization-management roles.
Permissions and User Types
Permissions (also called “user types”) group users with similar access needs. Each permission can be linked to multiple agents.Permission Configuration
How Permissions Work
- User Creation: User is assigned one or more permissions
- Agent Discovery: System compiles agents from all user’s permissions
- Display: User sees combined list of accessible agents
- Selection: Default agent is determined by permission priority
Default Agent Selection
When the user does not explicitly select an agent, AGO uses the selected permission if it belongs to the user. If no permission was selected, AGO chooses the user’s highest-priority active permission. For that permission:- Use its configured default agent, if present.
- Otherwise, use its first active linked agent, ordered by display order and then name.
- If neither exists, no default agent is resolved from that permission. AGO does not then fall back to an agent from an access rule.
Configuring Permissions
Creating Permissions
- Navigate to AI Studio → Permissions
- Click Create Permission or edit existing
- Configure fields:
- Name and description
- Priority number (higher = selected first)
- Linked agents
- Default agent selection
- Click Save
Granting Permissions with Rules
- Open AI Studio → Permissions.
- Choose Email-based permissions for email/domain rules, JWT-based permissions for JWT claims, or API-based permissions for data returned by your configured API.
- Create a rule and select the permissions it grants.
- Link the intended agents to those permissions and test with a non-admin account.
Access Control Rules
Matching rules add permissions cumulatively; a higher-priority rule does not revoke grants from another matching rule. Link agents to the granted permissions rather than relying on an additional-info rule’s agent assignment. These rules determine agent access after entering the application. They do not replace the portal entry check described above. See Access Control Examples for JWT rule setup.Widget Permission Override
When embedding the widget on third-party sites, you can dynamically assign a permission to a user by passing theX-Widget-Permission header in widget requests:
Impersonation and Permissions
When using impersonation, the agent list updates to show only agents accessible to the selected permission.Impersonation Flow
- Select a permission to impersonate
- Agent list refreshes to show:
- Agents linked to the selected permission
- Agents from access rules applicable to that permission
- Direct-linked agents (if any)
API Reference
For programmatic access to permissions and user management, see:- Public API v1 Reference - Permission and user management
Best Practices
Permission Design
- Group by role: Create permissions matching organizational roles
- Use meaningful priorities: Higher priority for more common roles
- Set defaults thoughtfully: Default agent should serve most use cases
Access Management
- Prefer permissions over direct links: Easier to maintain at scale
- Use access rules for dynamic access: When access depends on user attributes
- Audit regularly: Review who has access to which agents
Troubleshooting Access
- Test with non-admin accounts: Check the actual authentication and permission rules
- Check all pathways: A user might have access through unexpected paths
- Review rule conditions: Access rules can grant unexpected access
Troubleshooting
Issue: Client portal returns 401 despite assigned permissions
Issue: Client portal returns 401 despite assigned permissions
A non-administrator signing in through Clerk needs an active email access rule in addition to their agent permissions. Assigning a permission in the user’s profile does not create that rule.
- Open Agent Permissions → Email-based permissions.
- In Specific Emails, add an active rule for the user’s exact sign-in email, or verify that an active domain rule already covers them.
- Save the rule and retry opening the portal. Portal access rules are cached for up to one minute.
Issue: User can't see expected agent
Issue: User can't see expected agent
Problem: Agent doesn’t appear in user’s list.Solutions:
- Verify agent is active (not disabled)
- Check user’s permissions include the agent
- Review which permissions the matching access rules grant
- Test with a non-admin account using the intended authentication method
Issue: Wrong default agent selected
Issue: Wrong default agent selected
Problem: User sees unexpected agent as default.Solutions:
- Check permission priorities (highest number wins)
- Verify default agent is set on the correct permission
- Ensure user doesn’t have higher-priority permissions
Issue: User sees too many agents
Issue: User sees too many agents
Problem: User has access to agents they shouldn’t see.Solutions:
- Audit user’s permissions for unnecessary links
- Review access rules for overly broad conditions
- Check for direct agent links
- Consider using more restrictive permissions
Issue: Access rule not granting access
Issue: Access rule not granting access
Problem: User matches rule but can’t access agent.Solutions:
- Verify rule condition syntax is correct
- Check rule is active (not disabled)
- Verify the rule grants an active permission linked to the agent
- Test rule conditions with actual user attributes
Related Documentation
- Access Control Rules - Detailed rule configuration
- Access Control Examples - Common access patterns
- User Impersonation - Test permission configurations
- Agents - Agent configuration options
