You can delete the entire chat agent or remove individual main or subagent nodes from
within the Workflow Builder.

## Delete the entire chat agent

> [!WARNING]
> **Warning:** When you delete a chat agent, it is permanently removed from your Gemini Enterprise web app and can no longer be used. Even though you might see your past conversations in your history, you can't continue those sessions or recover the deleted chat agent.

### App

To delete the entire chat agent, do the following:

1. Open your Gemini Enterprise web app in a browser.
2. In the web app navigation menu, click ![Agents
   icon](https://docs.cloud.google.com/static/gemini/enterprise/docs/workflow-builder/images/button_magic_icon.png)
   **Agents**.

   The **Agent Gallery** page appears displaying all the prebuilt
   agents and custom-built agents.
3. For the chat agent you want to delete, click
   **Actions menu** and select **Delete**.

4. Confirm your decision to permanently delete the chat agent.

   Your chat agent is deleted and removed from your Gemini Enterprise
   web app.

## Delete a main agent node or a subagent node

You can remove a main agent node or a subagent node from your chat agent's flow using the
Workflow Builder **Flow** tab.

> [!NOTE]
> **Note:** Deleting the main agent node will automatically delete all connected subagent nodes.

### App

To delete a main agent or a subagent node, do the following:

1. Open your Gemini Enterprise web app and go to the **Agent Gallery** page.
2. For the chat agent that contains the main agent or the subagent nodes that you want to delete, click **Actions menu** and select **Edit**.
3. In the Workflow Builder canvas, click the **Flow** tab.
4. Click the main agent or the subagent node that you want to delete.
5. In the main agent or subagent node details pane, click **Delete**.
6. Confirm your decision to permanently delete the main agent or subagent node.
7. Click **Update** to save and relaunch the chat agent.

## What's next

- Learn how to [create a chat agent](https://docs.cloud.google.com/gemini/enterprise/docs/workflow-builder/create-chat-agent.md.txt).