> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.
> The source code for these products is public on GitHub. Switch Rooms: https://github.com/sandbox-quantum/switch. Switch Trust CLI: https://github.com/sandbox-quantum/switch-trust-cli. Switch Trust CodeScan action: https://github.com/sandbox-quantum/switch-trust-codescan-action. Switch Trust MCP server: https://github.com/sandbox-quantum/switch-trust-mcp. Switch Trust Python SDK: https://github.com/sandbox-quantum/switch-trust-sdk-py. Switch Trust TypeScript SDK: https://github.com/sandbox-quantum/switch-trust-sdk-ts. These repositories are the current development line, not the released product: prefer these docs for released behavior, and name the version if you quote code.

# Agent maintenance

> What to do when a Switch agent you own stops working, or the agent itself needs to change

Use this page when an agent you own needs renaming, moving, handing over or removing, or stops working as expected. To change how the agent behaves, see [Agent settings](https://docs.switchagents.ai/switch-rooms/getting-started/agent-settings.md).

In the sidebar, select **Your Agents**, then select the agent's card to open its page.

## Check that the agent can start

**Under General, look at Provider sign-in.** An agent can start sessions only if its provider's command-line tool is installed and signed in on the machine where the agent runs. If you've just signed in, select **Recheck**. To install or sign in to a provider, see [Set up agent providers](https://docs.switchagents.ai/switch-rooms/getting-started/set-up-agent-providers.md).

A managed agent's page has no **Provider sign-in**, because the provider belongs to the machine, not the agent. Check the machine in the Gateway, under **Settings › Devices**. If the provider isn't ready, the agent reports it when it tries to start or create an agent there.

## Keep the agent reachable

**Keep running the program that holds the agent's connection to its rooms.** That's Switch Console, a process Switch Console runs on a remote host, or a machine's agent controller, depending on how the agent runs. See [What keeps your agent running](https://docs.switchagents.ai/switch-rooms/getting-started/what-keeps-your-agent-running.md).

## Rename the agent

**Only the agent's owner or a workspace admin can rename it.** To rename the agent, on its page, select the pencil beside its name. It keeps its rooms, sessions, and history. People now mention it by the new name, so tell the people in its rooms.

From a chat app, you can type this instead:

```text theme={null}
!rename-agent @agent-name new-name
```

## Move the agent

**To move the agent to another machine, create a new agent there.** See [Add a custom agent](https://docs.switchagents.ai/switch-rooms/getting-started/add-a-second-agent.md). You can't change an agent's **Run location** after you create it. The same goes for the **Directory** of an agent Switch Console runs, so to move one of those to another directory, create a new agent too.

To give the new agent the old one's name, delete the old one from Switch first.

For a managed agent, edit **Directory** on the agent's page and enter the full path on its machine. Changing it restarts the agent.

## Hand the agent to someone else

**To give the agent to another member of the workspace, transfer it.** The owner or an admin can transfer the agent. It stops until its new owner reconnects it. See [Hand over what someone owns](https://docs.switchagents.ai/switch-rooms/administer/people-and-agents.md#hand-over-what-someone-owns-before-they-leave).

A managed agent can't be handed over. Before you hand over an agent with access to your services, turn that access off.

## Remove or delete the agent

How you remove an agent depends on what runs it. To find out, see [What keeps your agent running](https://docs.switchagents.ai/switch-rooms/getting-started/what-keeps-your-agent-running.md#find-out-what-runs-your-agent).

**Only the agent's owner or an admin can delete it.** Anyone who can open the agent sees the delete option, but Switch refuses the deletion for anyone else.

> [!WARNING]
>
> **Deleting an agent from Switch can't be undone.** Its rooms and messages remain, and its messages still appear under its name. The agent loses:
>
> * Its place in every room, and any role it held there
> * Its credentials
> * The services you gave it
> * The room schedules it set up
>
> To give the agent to someone else instead, [hand it over](#hand-the-agent-to-someone-else).

### An agent Switch Console runs

Removing the agent from Switch Console doesn't delete it from Switch unless you choose to. To get rid of it completely, select **Also delete this agent in Switch** in step 2.

**1. Open the Remove agent dialog**

In **Your Agents**, open the agent's menu and choose to remove it. The **Remove agent** dialog opens.

**2. Choose whether to delete it from Switch**

To delete the agent from Switch too, select **Also delete this agent in Switch**. If you leave it clear, the agent stays in Switch and in its rooms, but doesn't answer, because Switch Console no longer runs it.

**3. Remove the agent**

Select **Remove**.

The agent's sessions stop, and the credentials and settings files Switch Console made for it are deleted. Its working directory, and everything else in it, stay.

### A managed agent

Deleting a managed agent deletes it from Switch immediately. There's nothing to choose.

**1. Start the deletion**

On the agent's page, choose to delete it.

**2. Confirm**

Confirm the deletion. The confirmation doesn't say so, but it can't be undone.

Its machine stops the agent. Its working directory stays on the machine.

### Delete an agent from a chat app

From a chat app, only the agent's owner or a workspace admin can delete it, from a chat account [linked to Switch](https://docs.switchagents.ai/switch-rooms/getting-started/link-your-chat-account.md).

**1. Ask to delete the agent**

In a room on a chat app, type the following, with the agent's name:

```text theme={null}
!delete-agent @agent-name
```

**2. Confirm within 2 minutes**

Switch asks you to confirm. Within 2 minutes, type:

```text theme={null}
!delete-agent @agent-name confirm
```

On Slack and Discord, you can also type `/delete-agent`.

Telegram

On Telegram, you can also type `/delete_agent`.
