Share agents that you've created and launched using Agent Designer with other
users within your organization. Depending on your app's [feature control
configurations](https://docs.cloud.google.com/gemini/enterprise/docs/manage-web-app-features#configure_feature_controls),
you might need an administrator to [review and approve](https://docs.cloud.google.com/gemini/enterprise/docs/agent-designer/share-agent#review-request) before
you can share an agent.

> [!CAUTION]
> **Caution:** When you share an agent, you are also sharing access to all its associated data sources and files. Users are then able to query the agent about the content of these sources, even if they don't have direct file or data source access.
>
> For example, if you upload a confidential file to the agent's
> knowledge section and then share the agent, any user with whom you shared it can
> ask the agent questions about that file's content.

## Share an agent

To share an agent, do the following:

### App

1. Open your Gemini Enterprise app and go to the **Agent Gallery** page.

   The **Agent Gallery** page appears displaying all the prebuilt agents and custom-built agents.
2. In the **Your Agents section**, find the agent you want to share.

   > [!NOTE]
   > **Note:** You can't share an agent that is in a `draft` state.

3. Click **Actions menu** , and select **Share**.

4. In the share dialog, enter the email addresses of the users or
   Google Identity groups that you want to share the agent with. You can also click
   **Copy link** to generate a shareable link.

   > [!NOTE]
   > **Note:** You can share your agent with individual user email addresses. Sharing with Google Identity groups isn't enabled for end users. A Gemini Enterprise app administrator or any user with the [Discovery Engine Admin (discoveryengine.admin)](https://docs.cloud.google.com/iam/docs/roles-permissions/discoveryengine) role can enable group sharing at the Gemini Enterprise app level.

5. Click **Done**.

   The agent is shared with the users in your access list.

   > [!NOTE]
   > **Note:** If your app administrator has enabled administrator review for agent sharing, a share request is sent to the app administrator for review and approval. After the app administrator approves the request, the agent is shared with those in the access list. You can, at any time, edit the share request to add or remove users, or cancel the request.

## Administrator review control

By default, agent owners can share their agents with any user within their organization without approval from an app administrator. However, app administrators can change the app [feature control configurations](https://docs.cloud.google.com/gemini/enterprise/docs/manage-web-app-features#configure_feature_controls) to require administrator review and approval for sharing agents in the app.

By default, agent owners can't share their agents with groups.
However, the Gemini Enterprise app administrator can configure the app to make agents shareable
with Google Identity groups---with or without administrator approval.

### The sharing process

Agent sharing follows a two-step process when administrator review is enabled:

1. The agent owner [shares the agent with one or more users or
   Google Identity groups](https://docs.cloud.google.com/gemini/enterprise/docs/agent-designer/share-agent#share-agent).

2. The app administrator [reviews the sharing request and approves or denies it](https://docs.cloud.google.com/gemini/enterprise/docs/agent-designer/share-agent#review-request).

### Review a share request

App administrators are responsible for reviewing and managing agent sharing requests.

> [!NOTE]
> **Notes:**
>
> - This section only applies if the [Enable agent
>   sharing without admin approval](https://docs.cloud.google.com/gemini/enterprise/docs/manage-web-app-features) feature is disabled in the app's feature controls.
> - Only app administrators with the [Gemini Enterprise Admin](https://docs.cloud.google.com/gemini/enterprise/docs/access-control#discoveryengine.agentspaceAdmin) IAM role can review and approve share requests.

### Console

To review a share request as an app administrator, do the following:

1. In the Google Cloud console, go to the **Gemini Enterprise \> Apps** page.

   [Gemini Enterprise](https://console.cloud.google.com/gemini-enterprise/)
2. Click the name of the app containing the agent.

3. In the app navigation menu, click **Agents**.

4. Find the agent with a **Review share request** action in the **User permissions** column.

   ![Share agent review request](https://docs.cloud.google.com/static/gemini/enterprise/docs/images/agent-designer/admin-share-request.png)
5. Click **Review share request**.

6. In the **Share request** pane:

   - Review the access list under **Requested to share with the following users**.
   - Optional: Modify the access list to add or remove user accounts, Google Identity groups, or WIF identity pools.
7. To approve the request and grant access, click **Approve and enable**.

8. To reject the request, click **Deny**.

## Considerations

- When you share an agent, you are also sharing access to all its associated
  data sources and files. Users are able to query the agent about the content of
  these sources, even if they don't have direct file or data source access.

- App administrators can add and remove users from the access list at any time.

- If an administrator has enabled it for the Gemini Enterprise app, agent
  owners can share agents with Google Identity groups. If the organization uses
  WIF identity pools in your organization, then only
  app administrators can share the agent.

- Agent owners can remove any user from the access list at any time (including those added by the app admin).

- You can also share an agent from the Agent Designer canvas.

## What's next

- Learn how to [use an agent](https://docs.cloud.google.com/gemini/enterprise/docs/agent-designer/use-agent).
- Learn how to [create an agent](https://docs.cloud.google.com/gemini/enterprise/docs/agent-designer/create-agent).
- Learn how app administrators can [share agents from the Google Cloud console](https://docs.cloud.google.com/gemini/enterprise/docs/share-custom-agents).