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

# 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()
```