# Agent Access Permissions & Visibility Troubleshooting How to make a published agent visible to end users in the Lightning Experience Copilot panel. --- ## Agent Access Permissions Employee Agents require explicit access via the `` element in Permission Sets. Without this, users won't see the agent in the Lightning Experience Copilot panel. ### Permission Set XML Structure ```xml Case_Assist true false ``` ### Key Points - `` must exactly match the `developer_name` in the agent's config block - Multiple `` elements can be included for multiple agents - `true` grants access; `false` or omission denies access ### Deploy and Assign Deploy the permission set with `sf project deploy start --json --metadata "PermissionSet:"`. Assign it to a specific user with `sf org assign permset --json --name --on-behalf-of user@example.com`. --- ## Visibility Troubleshooting When an Agentforce Employee Agent is deployed but not visible to users, work through these steps: ### Step 1: Verify Agent Status Confirm the agent is active. Query `BotVersion` to check: `sf data query --json -q "SELECT Status, VersionNumber FROM BotVersion WHERE BotDefinition.DeveloperName = ''"`. At least one version should have `Status = 'Active'`. If none do, activate with `sf agent activate --json --api-name ` before continuing. ### Step 2: Check for Agent Access Permission Retrieve permission sets with `sf project retrieve start --json --metadata "PermissionSet:*"`. Search retrieved files for `` containing agent's `developer_name`. If none, create a new permission set. ### Step 3: Create Permission Set (if needed) Create a file at `force-app/main/default/permissionsets/MyAgent_Access.permissionset-meta.xml`: ```xml MyAgent true false ``` ### Common Issues | Symptom | Cause | Solution | |---------|-------|----------| | No Agentforce icon | CopilotSalesforceUser PS not assigned | Assign CopilotSalesforceUser permission set | | Icon visible, agent not in list | Missing agentAccesses | Add `` to permission set | | Agent visible, errors on open | Agent not fully published | See Step 1: Verify Agent Status | | "Agent not found" error | Name mismatch | Ensure `` matches `developer_name` exactly |