***

title: unregister
slug: /reference/typescript/agents/agent-server/unregister
description: Remove an agent from the server's registry by route.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Remove an agent from the server's registry. The agent's routes are no longer tracked,
though Hono does not fully remove mounted routers at runtime.

<Note>
  Because Hono does not support dynamic route removal, the agent's HTTP routes may still
  respond until the server restarts. This method primarily removes the agent from the
  internal registry used by `getAgents()` and the root listing endpoint.
</Note>

## **Parameters**

<ParamField path="route" type="string" required={true} toc={true}>
  The route of the agent to remove (e.g., `"/sales"`).
</ParamField>

## **Returns**

`void`

## **Example**

```typescript {7}
import { AgentBase, AgentServer } from '@signalwire/sdk';

const server = new AgentServer({ port: 3000 });
const agent = new AgentBase({ name: 'sales', route: '/sales' });
server.register(agent);

server.unregister('/sales');
```