***

title: reset_document
slug: /reference/python/agents/swml-service/reset-document
description: Reset the SWML document to an empty state.
max-toc-depth: 3
---------------------

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

Reset the SWML document to an empty state. This clears all sections and verbs,
leaving only an empty `main` section. Use this to rebuild the document from scratch
without creating a new service instance.

## **Returns**

`None`

## **Example**

```python {8}
from signalwire import SWMLService

service = SWMLService(name="my-service")
service.add_verb("answer", {})
service.add_verb("play", {"url": "https://example.com/old.mp3"})

# Start over with a fresh document
service.reset_document()
service.add_verb("answer", {})
service.add_verb("ai", {"prompt": {"text": "You are a helpful assistant"}})

print(service.render_document())
```