***

title: unregister
slug: /reference/python/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 FastAPI does not fully remove mounted routers at runtime.

<Note>
  Because FastAPI does not support unmounting routers, the agent's HTTP routes may still
  respond until the server restarts. This method primarily removes the agent from the
  internal registry used by `get_agents()`, SIP routing, and the health endpoint.
</Note>

## **Parameters**

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

## **Returns**

`bool` -- `True` if the agent was found and removed, `False` if no agent exists at that route.

## **Example**

```python {7}
from signalwire import AgentServer
from signalwire import AgentBase

server = AgentServer(port=3000)
server.register(AgentBase(name="sales", route="/sales"))

removed = server.unregister("/sales")
print(removed)  # True
```