> 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. # setupGracefulShutdown > Register signal handlers for graceful shutdown, useful for Kubernetes and containerized deployments. Static method that registers process 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. Only registers handlers once, even if called multiple times. ## **Parameters** **`opts`** `object` Optional configuration. --- **`opts.timeout`** `number` — default: 5000 Shutdown timeout in milliseconds before the process exits. --- ## **Returns** `void` ## **Example** ```typescript {3} import { AgentBase } from '@signalwire/sdk'; AgentBase.setupGracefulShutdown({ timeout: 10000 }); const agent = new AgentBase({ name: 'support', route: '/support' }); agent.setPromptText('You are a helpful assistant.'); await agent.serve(); ``` > Register signal handlers for graceful shutdown, useful for Kubernetes and containerized deployments.