For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Return the SWML document as a plain object. The name matches the Python SDK’s
SWMLBuilder.build(). For a JSON string, use render(). For
property-style access to the same object, use the document
getter.
Returns
Record<string, unknown> — the SWML document with version and sections
keys.
Example
import { SwmlBuilder } from '@signalwire/sdk';
const builder = new SwmlBuilder();
builder.answer();
builder.ai({ prompt: { text: 'You are a helpful assistant.' } });