

# Give agents agent assist in the agent workspace

To show the Connect assistant panel, see [Access agent assist in the agent workspace](access-connect-assistant-in-workspace.md). On the AI self-service flow's contacts, the stack's agent assist AI agent runs the guide's flow modules as tools, so agents can ask it to:
+ find another customer;
+ summarize the account;
+ list the account's cases, ten at a time;
+ summarize the case open in the guide;
+ create a case;
+ create a customer;
+ update the account or one of its contacts.

Agent assist asks the agent to confirm each create and update. Confirmation is a setting on each of the AI agent's tools, which the stack turns on for Create a case, Create a customer and Update a record. Text in Salesforce records or in the chat can influence what agent assist proposes, so agents read each proposed write before they confirm it.

Agent assist runs a module only when the AI agent's security profile and one of the agent's own security profiles both list it: Connect Customer authorizes each tool call against the combination of the AI agent's and the human agent's permissions; see [Assigning security profile permissions to AI agents](ai-agent-security-profile-permissions.md). The agents' security profiles need these permissions between them:
+ **Access Contact Control Panel - Access**
+ **Views - View**
+ **Custom views - Access**
+ **Connect assistant - View**

Add the stack's `{{stack-name}}-ai-agent-assist-tools` security profile, which the `AgentAssistAgentSecurityProfile` output names, to agents who use agent assist. It allows all seven of agent assist's flow modules: reading, creating and updating. Its only permissions are **Connect assistant - View** and running flow modules as tools (`ContactFlowModules.Execute`). The stack keeps the profile's modules the same as agent assist's, so a stack update that adds a module to agent assist lets these agents run it too. Before you delete the stack, remove the profile from those agents; otherwise the delete fails.

**To add the stack's security profile to an agent**

1. In the Connect Customer admin website, choose **Users**, **User management**, and the agent's username.

1. In **Security profiles**, choose **Edit**. In the search box, type **{{stack-name}}-ai-agent-assist-tools** and choose it. Leave the agent's other security profiles in place, and choose **Save**.

The test agent's security profile, `rtdi-test-agent` if you used the test setup script, already has the permissions; add the stack's security profile to the test agent's user before the agent assist test. If you run the test setup script again, add it again: the script sets the user's security profiles to the test security profile only.

To let some agents read records but not create or update them, tick only the modules for reading in those agents' own security profile instead of adding the stack's security profile. An agent can run every module that any of their security profiles lists. Ticking a module also grants the permission to run flow modules as tools.

**To give a security profile the modules**

1. In the Connect Customer admin website, choose **Users**, **Security profiles**, the agents' security profile, and **Edit**. The modules are listed only on the **Edit** page.

1. Scroll to the bottom, past the rows for the gateway's tools, such as **Salesforce - {{stack-name}} - salesforce\_\_\_getAccount**, to the section **Flow modules ({{n}}/{{total}})**, described as **These permissions are used to configure access to Flow modules as a tool**.

1. Select **Access** for each module from the list after these steps, and choose **Save**.

The modules:
+ To read, for every agent: `{{stack-name}}-account-360-find-customer`, `{{stack-name}}-account-360-read-account`, `{{stack-name}}-account-360-read-case` and `{{stack-name}}-account-360-list-cases`.
+ To create records, only for agents who may: `{{stack-name}}-account-360-create-case` and `{{stack-name}}-account-360-create-customer`.
+ To update the account and its contacts, only for agents who may: `{{stack-name}}-account-360-update-record`.

A change applies to contacts that start after you save it, so test it with a new contact.

On contacts from your own inbound flow, agent assist uses the stack's agent assist AI agent only if that flow has a **Connect assistant** block that names it, the AI agent in the `AgentAssistAgentName` output, as the AI self-service flow's block does. Other contacts get the AI agent that their own flow or the assistant's defaults give them.

The block names a version of the AI agent. An upgrade that changes the AI agent publishes a new version and deletes the old one, so after each upgrade, open the block in your flow, choose the AI agent's newest version, and publish the flow.

For chat, turn on message streaming; see [Enable message streaming for AI-powered chat](message-streaming-ai-chat.md).