> 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. # resetDocument > Reset the SWML document to an empty state. [ref-swmlservice]: /docs/server-sdks/reference/typescript/agents/swml-service Reset the SWML document to an empty state. Clears all sections and verbs, leaving only an empty `main` section. Use this to rebuild the document from scratch without creating a new [`SWMLService`][ref-swmlservice] instance. ## **Returns** `this` -- returns the service for fluent chaining. ## **Example** ```typescript {8} import { SWMLService } from '@signalwire/sdk'; const service = new SWMLService({ name: 'my-service' }); service.addVerb('answer', {}); service.addVerb('play', { url: 'https://example.com/old.mp3' }); // Start over with a fresh document service.resetDocument(); service.addVerb('answer', {}); service.addVerb('ai', { prompt: { text: 'You are a helpful assistant' } }); console.log(service.renderDocument()); ``` > Reset the SWML document to an empty state.