> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# setup_graceful_shutdown

> Register signal handlers for graceful shutdown, useful for Kubernetes and containerized deployments.

Register signal handlers for `SIGTERM` and `SIGINT` so the agent shuts down cleanly.
This is especially useful in Kubernetes deployments where the pod receives `SIGTERM`
before termination.

## **Parameters**

None.

## **Returns**

`None`

## **Example**

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.setup_graceful_shutdown()
agent.serve()
```