Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
22db722
docs(server-sdks): remove TypeScript compat REST reference
hey-august Sep 6, 2026
760b9e1
docs(server-sdks): update TypeScript REST calling and datasphere sign…
hey-august Sep 6, 2026
a9f1f86
docs(server-sdks): add TypeScript REST messages, projects, and reques…
hey-august Sep 6, 2026
0e1eaea
docs(server-sdks): correct TypeScript skill and tool defaults
hey-august Sep 6, 2026
5320159
docs(server-sdks): add TypeScript AIChatClient, BedrockAgent, CLI, an…
hey-august Sep 6, 2026
5d9e386
docs(server-sdks): add new TypeScript AgentBase and context methods
hey-august Sep 6, 2026
c77276e
docs(server-sdks): add TypeScript Relay call helpers and typed states
hey-august Sep 6, 2026
9cf94a4
docs(server-sdks): raise Node floor to 22 in TypeScript guides
hey-august Sep 6, 2026
6f1314b
chore(server-sdks): sync TypeScript reference manifest to 6a2aa09
hey-august Sep 6, 2026
34c8193
fix(server-sdks): correct TypeScript REST examples and error docs
hey-august Sep 8, 2026
48384bf
fix(server-sdks): correct TypeScript agent CLI, Bedrock, and chat cli…
hey-august Sep 8, 2026
38b8e63
docs(server-sdks): add TypeScript defineSkillTool helper
hey-august Sep 8, 2026
237b94e
fix(server-sdks): correct TypeScript Relay helper examples and add mi…
hey-august Sep 8, 2026
816b923
Merge branch 'main' into august-20260904-update-typescript-docs
hey-august Sep 8, 2026
98193bd
fix(server-sdks): pass ParameterSchema output to defineTool as flat map
hey-august Sep 9, 2026
f326b66
fix(server-sdks): correct BedrockAgent promptAddSection example
hey-august Sep 9, 2026
eff40ec
fix(server-sdks): correct TypeScript REST log, recording, and agent f…
hey-august Sep 9, 2026
c9a69d9
fix(server-sdks): drop removed SwmlBuilder getDocument and renderDocu…
hey-august Sep 9, 2026
c6f1c85
fix(server-sdks): supply control_id to REST call commands instead of …
hey-august Sep 9, 2026
208972c
Merge branch 'main' into august-20260904-update-typescript-docs
hey-august Sep 9, 2026
ef3b790
fix(server-sdks): supply control_id in every TypeScript calling example
hey-august Sep 10, 2026
532c7d2
fix(server-sdks): point SwmlService render docs at build() and render()
hey-august Sep 10, 2026
99987aa
Merge branch 'main' into august-20260904-update-typescript-docs
hey-august Sep 10, 2026
dd114ec
fix(server-sdks): rename userEvent example field from order to event
hey-august Sep 10, 2026
e5c9802
fix(server-sdks): correct secure default and wrapped parameter schema…
hey-august Sep 10, 2026
e213168
fix(server-sdks): restore deleted Python compat namespace docs
hey-august Sep 10, 2026
67e6045
fix(server-sdks): correct ai.stop control_id note and initialTimeout …
hey-august Sep 10, 2026
7cb91b3
docs(server-sdks): rename stale Resource-suffixed reference titles
hey-august Sep 10, 2026
dab36fe
docs(server-sdks): sentence-case Title-Case headings
hey-august Sep 10, 2026
b2b3e8b
docs(server-sdks): consolidate control_id note across calling pages
hey-august Sep 10, 2026
46f0eb2
docs(server-sdks): dedupe npm install snippet
hey-august Sep 10, 2026
e564e6f
docs(server-sdks): drop unused link-reference boilerplate in relay ca…
hey-august Sep 10, 2026
e367997
fix(server-sdks): restore wire-name initial_timeout on promptTTS and …
hey-august Sep 11, 2026
4ec2c10
fix(server-sdks): correct swaig-test --override example to a top-leve…
hey-august Sep 11, 2026
a96390c
docs(server-sdks): state SIGNALWIRE_RELAY_HOST precedence over SIGNAL…
hey-august Sep 11, 2026
7081f43
docs(server-sdks): drop wrong Python service comparison on SwmlBuilde…
hey-august Sep 11, 2026
195d717
docs(server-sdks): name the Relay detect command on detectAnsweringMa…
hey-august Sep 11, 2026
fa43641
Merge branch 'main' into august-20260904-update-typescript-docs
hey-august Sep 11, 2026
b493028
docs(sdk): document SIGNALWIRE_SPACE behavior across TypeScript clients
hey-august Sep 11, 2026
7b376ce
docs(server-sdks): point SWML links at the calling reference tree
hey-august Sep 11, 2026
7fadd1c
docs(server-sdks): drop unsourced createConversation status values
hey-august Sep 11, 2026
3e0607a
docs(server-sdks): correct TypeScript reference details against SDK s…
hey-august Sep 11, 2026
f95af81
Merge branch 'main' into august-20260904-update-typescript-docs
hey-august Sep 14, 2026
e17dd2b
merge
hey-august Sep 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,26 @@ redirects:
- source: /docs/browser-sdk/click-to-call/:slug*
destination: /docs/browser-sdk/v3/click-to-call/:slug*

# The TypeScript SDK removed the Twilio-compatible LAML REST namespace
# (client.compat); point its old reference pages at the REST client overview.
- source: /docs/server-sdks/reference/typescript/rest/compat
destination: /docs/server-sdks/reference/typescript/rest
- source: /docs/server-sdks/reference/typescript/rest/compat/:slug*
destination: /docs/server-sdks/reference/typescript/rest

# The SWMLService `onRequest` override hook is now protected (renamed
# `buildSwmlForRequest`) and no longer documented; point its old page URL at
# the public equivalent, `setOnRequestCallback`.
- source: /docs/server-sdks/reference/typescript/agents/swml-service/on-request
destination: /docs/server-sdks/reference/typescript/agents/swml-service/set-on-request-callback

# SwmlBuilder getDocument()/renderDocument() were removed from the SDK in
# favor of the Python-parity names build()/render().
- source: /docs/server-sdks/reference/typescript/agents/swml-builder/get-document
destination: /docs/server-sdks/reference/typescript/agents/swml-builder/build
- source: /docs/server-sdks/reference/typescript/agents/swml-builder/render-document
destination: /docs/server-sdks/reference/typescript/agents/swml-builder/render

# The Python SDK removed its Twilio-compatibility REST namespace
# (`client.compat`, signalwire-python 3d08c96); the pages that documented it
# are gone. Send old URLs to the Python REST overview.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ Tell jokes to lighten the mood or entertain callers. Uses a curated joke databas

**Functions:**

- `tell_joke` - Get a random joke
- `get_joke` - Get a random joke. Takes a required `type` argument, `jokes` or `dadjokes`

**Requirements:** None

**Parameters:**

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `tool_name` | string | Custom function name | "tell_joke" |
| `tool_name` | string | Custom function name | "get_joke" |

```python
from signalwire import AgentBase
Expand Down Expand Up @@ -323,22 +323,13 @@ Play audio files in the background during calls. Audio plays while conversation

**Parameters:**

This skill supports two configuration styles:

- **Catalog mode** — preload named files via `files`, caller selects by `key`:
Preload named files via `files`; the caller selects one by `key`:

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `tool_name` | string | Custom play function name | "play_background_file" |
| `files` | array | List of `{ key, description, url, wait? }` entries | Required |

- **Free-form mode** — caller supplies a URL at call time (gated by `allowed_domains`):

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `default_file_url` | string | URL played when no argument is provided | Required |
| `allowed_domains` | array | Whitelisted domains for caller-supplied URLs | Required |

**Supported formats:** MP3, WAV, OGG

```python
Expand Down Expand Up @@ -570,9 +561,6 @@ Validate addresses and compute driving routes using Google Maps. Supports geocod
| `api_key` | string | Google Maps API key (falls back to `GOOGLE_MAPS_API_KEY`) | Required |
| `lookup_tool_name` | string | Address lookup function name | "lookup_address" |
| `route_tool_name` | string | Route computation function name | "compute_route" |
| `geocode_tool_name` | string | Reverse-geocoding function name | "geocode_address" |
| `route_by_coords_tool_name` | string | Coord-based route function name | "compute_route_by_coords" |
| `default_mode` | string | `"driving"`, `"walking"`, `"bicycling"`, or `"transit"` | "driving" |

```python
from signalwire import AgentBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "3000", "--workers", "
</Tab>
<Tab title="TypeScript">
```dockerfile
FROM node:20-slim
FROM node:22-slim

WORKDIR /app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ gcloud functions deploy signalwire-agent \
## TypeScript (Node.js)
gcloud functions deploy signalwire-agent \
--gen2 \
--runtime nodejs20 \
--runtime nodejs22 \
--trigger-http \
--allow-unauthenticated \
--entry-point main \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ max-toc-depth: 3
| Language | Runtime | Package Manager | OS |
|----------|---------|-----------------|-----|
| Python | 3.10+ | pip | Linux, macOS, Windows |
| TypeScript | Node.js 18+ | npm | Linux, macOS, Windows |
| TypeScript | Node.js 22+ | npm | Linux, macOS, Windows |
{/*
| Go | 1.21+ | go modules | Linux, macOS, Windows |
| Ruby | 3.0+ | gem/bundler | Linux, macOS, Windows |
Expand All @@ -36,7 +36,7 @@ npm install @signalwire/sdk
```

<Note>
`@signalwire/sdk` is published as an ES module only (no CommonJS build). Your project must use ESM — add `"type": "module"` to your `package.json`, use `.mjs` file extensions, or use a bundler/transpiler that supports ESM. `import` syntax works; `require('@signalwire/sdk')` does not work in Node older than 22 without the `--experimental-require-module` flag.
`@signalwire/sdk` is published as an ES module only (no CommonJS build). Your project must use ESM — add `"type": "module"` to your `package.json`, use `.mjs` file extensions, or use a bundler/transpiler that supports ESM. Import it with `import` syntax.
</Note>
</Tab>
</Tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Before starting, ensure you have the following:
| Language | Requirement | Package Manager |
|----------|-------------|-----------------|
| Python | 3.10+ | pip |
| TypeScript | Node.js 18+ | npm |
| TypeScript | Node.js 22+ | npm |
{/*
| Go | 1.21+ | go modules |
| Ruby | 3.0+ | gem/bundler |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,15 @@ client = RestClient(request_options=RequestOptions(timeout=10.0, retries=3))
numbers = client.phone_numbers.list(request_options=RequestOptions(timeout=60.0))
```

In TypeScript, every list resource has a `paginate()` method that returns an
async iterator over all pages:

```typescript
for await (const number of client.phoneNumbers.paginate()) {
console.log(number.name, number.number);
}
```

### Error Handling

REST errors raise `SignalWireRestError`. A request that never reaches the server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ max-toc-depth: 3
---

[agentbase]: /docs/server-sdks/reference/python/agents/agent-base
[amazon-bedrock]: /docs/swml/reference/amazon-bedrock
[swml-bedrock-reference]: /docs/swml/reference/amazon-bedrock
[amazon-bedrock]: /docs/swml/reference/calling/amazon-bedrock
[swml-bedrock-reference]: /docs/swml/reference/calling/amazon-bedrock
[setvoice]: /docs/server-sdks/reference/python/agents/bedrock-agent/set-voice
[setinferenceparams]: /docs/server-sdks/reference/python/agents/bedrock-agent/set-inference-params

Expand Down Expand Up @@ -72,7 +72,7 @@ full specification.
</Card>
</CardGroup>

## **Overridden Behavior**
## **Overridden behavior**

BedrockAgent overrides several AgentBase methods to adapt for the Bedrock
voice-to-voice model:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Choose one action per invocation:
after the function name.
</ParamField>

## Common Options
## Common options

<ParamField path="-v, --verbose" type="flag" toc={true}>
Enable verbose output with debug information, including raw result types and
Expand All @@ -62,7 +62,7 @@ Choose one action per invocation:
Mutually exclusive with `--agent-class`.
</ParamField>

## Function Execution Options
## Function execution options

<ParamField path="--minimal" type="flag" toc={true}>
Use minimal `post_data` containing only the function arguments. This is the default behavior.
Expand All @@ -77,7 +77,7 @@ Choose one action per invocation:
JSON string with custom `post_data` overrides merged into the request payload.
</ParamField>

## SWML Generation Options
## SWML generation options

<ParamField path="--call-type" type="string" default="webrtc" toc={true}>
Simulated call type. Valid values:
Expand All @@ -103,7 +103,7 @@ Choose one action per invocation:
Override the destination/to extension in mock data.
</ParamField>

## Data Customization
## Data customization

<ParamField path="--user-vars" type="string" toc={true}>
JSON string injected as `userVariables` in the mock request. Used to test
Expand All @@ -124,7 +124,7 @@ Choose one action per invocation:
Can be specified multiple times.
</ParamField>

## Serverless Simulation
## Serverless simulation

<ParamField path="--simulate-serverless" type="string" toc={true}>
Simulate a serverless platform environment. Valid values:
Expand All @@ -146,7 +146,7 @@ Choose one action per invocation:
Load environment variables from a file (one `KEY=VALUE` per line).
</ParamField>

### Platform-Specific Options
### Platform-specific options

Run `swaig-test agent.py --help-platforms` for the full list. Key options per platform:

Expand All @@ -158,7 +158,7 @@ Run `swaig-test agent.py --help-platforms` for the full list. Key options per pl

**Azure**: `--azure-env`, `--azure-function-url`

## Extended Help
## Extended help

<ParamField path="--help-platforms" type="flag" toc={true}>
Show detailed documentation for all serverless platform options.
Expand All @@ -176,7 +176,7 @@ Run `swaig-test agent.py --help-platforms` for the full list. Key options per pl

## Examples

### List Tools and Generate SWML
### List tools and generate SWML

```bash
# List all registered SWAIG functions
Expand All @@ -192,7 +192,7 @@ swaig-test agent.py --dump-swml --raw | jq '.'
swaig-test agent.py --dump-swml --raw | jq '.sections.main[1].ai.SWAIG.functions'
```

### Execute Functions
### Execute functions

```bash
# Execute with CLI-style arguments
Expand All @@ -212,7 +212,7 @@ Arguments are automatically type-converted: numeric values become integers or
floats, `true`/`false` become booleans, and everything else stays as a string.
</Tip>

### Multi-Agent Files
### Multi-agent files

```bash
# Discover agents in the file
Expand All @@ -225,7 +225,7 @@ swaig-test multi_agent.py --agent-class SalesAgent --list-tools
swaig-test multi_agent.py --route /support --exec create_ticket --issue "Login problem"
```

### Dynamic Agent Testing
### Dynamic agent testing

```bash
# Test with query parameters
Expand All @@ -238,7 +238,7 @@ swaig-test dynamic_agent.py --dump-swml \
--user-vars '{"preferences":{"language":"es"}}'
```

### Serverless Simulation
### Serverless simulation

```bash
# AWS Lambda
Expand All @@ -265,7 +265,7 @@ swaig-test agent.py --simulate-serverless lambda \
--exec my_function
```

## Exit Codes
## Exit codes

| Code | Meaning |
|------|---------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Add a remote function include to the SWAIG configuration.
max-toc-depth: 3
---

[ai-swaig-includes]: /docs/swml/reference/ai/swaig/includes
[swml-swaig-includes-reference]: /docs/swml/reference/ai/swaig/includes
[ai-swaig-includes]: /docs/swml/reference/calling/ai/swaig/includes
[swml-swaig-includes-reference]: /docs/swml/reference/calling/ai/swaig/includes
[ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base

Add a remote SWAIG function include so the agent can call tools hosted on an external
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Add a language configuration with voice settings for multilingual c
max-toc-depth: 3
---

[ai-languages]: /docs/swml/reference/ai/languages
[swml-languages-reference]: /docs/swml/reference/ai/languages
[ai-languages]: /docs/swml/reference/calling/ai/languages
[swml-languages-reference]: /docs/swml/reference/calling/ai/languages
[ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base

Add a language configuration with voice settings. The agent uses these configurations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ Look up a skill class by name in the global

## **Parameters**

<ParamField path="skillName" type="string" required={true} toc={true}>
Registered skill name (read from the target class's `SKILL_NAME`).
<ParamField path="skillName" type="SkillNameOrString" required={true} toc={true}>
Registered skill name (read from the target class's `SKILL_NAME`). The
`SkillName` union lists the 19 built-in names for editor autocompletion; any
other string resolves against skills you registered yourself.
</ParamField>

<ParamField path="params" type="SkillConfig" toc={true}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ None.

## **Returns**

`Hono` -- A Hono app with all agent endpoints (SWML delivery, SWAIG function
handling, post-prompt, debug events, health checks, etc.).
`HostAppRouter` -- The agent's Hono app, with all agent endpoints (SWML
delivery, SWAIG function handling, post-prompt, debug events, health checks,
etc.). `HostAppRouter` is a type alias for `Hono`, named for the host-app
mounting contract it fulfills.

## **Example**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ description: Programmatically define a SWAIG tool that the AI can invoke during
max-toc-depth: 3
---

[swaig-function]: /docs/swml/reference/ai/swaig/functions
[swml-swaig-functions-reference]: /docs/swml/reference/ai/swaig/functions
[swaig-function]: /docs/swml/reference/calling/ai/swaig/functions
[swml-swaig-functions-reference]: /docs/swml/reference/calling/ai/swaig/functions
[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result
[ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base
[parameter-schema]: /docs/server-sdks/reference/typescript/agents/parameter-schema
[on-error]: /docs/server-sdks/reference/typescript/agents/agent-base/on-error

Programmatically define a SWAIG function (tool) that the AI can invoke during a
conversation.
Expand Down Expand Up @@ -42,19 +44,25 @@ instead.
when to call the tool.
</ParamField>

<ParamField path="opts.parameters" type={"Record<string, unknown>"} toc={true}>
JSON Schema describing the tool's parameters. The AI generates arguments
conforming to this schema.
<ParamField path="opts.parameters" type="ToolParameters" toc={true}>
JSON Schema describing the tool's parameters. Write it either as a flat map of
property name to schema (`{ city: { type: 'string' } }`) or as a wrapped
object schema (`{ type: 'object', properties: { ... } }`). With the flat form
the handler's `args` is typed from the schema, so `args.city` is a `string`
and an `enum` narrows to its literal union. You can also build the schema
with [`paramSchema()`][parameter-schema].
</ParamField>

<ParamField path="opts.handler" type="SwaigHandler" required={true} toc={true}>
Callback invoked when the AI calls this tool. Receives
`(args: Record<string, unknown>, rawData: Record<string, unknown>)` and should
return a [`FunctionResult`][functionresult].
`(args, rawData: SwaigRequest)` and returns a [`FunctionResult`][functionresult],
a plain object, or a string.
</ParamField>

<ParamField path="opts.secure" type="boolean" default="false" toc={true}>
Whether to require token validation on tool calls. Recommended for production.
<ParamField path="opts.secure" type="boolean" default="true" toc={true}>
Whether to require token validation on tool calls. Tools are secure by
default: the rendered webhook URL carries a per-tool token. Pass `false` only
to expose the tool on the shared, unauthenticated webhook URL.
</ParamField>

<ParamField path="opts.fillers" type={"Record<string, string[]>"} toc={true}>
Expand Down Expand Up @@ -84,6 +92,19 @@ instead.
Additional fields merged into the SWAIG function definition. Equivalent to
Python's `**swaig_fields` kwargs (e.g., `meta_data`).
</ParamField>

<ParamField path="opts.onError" type="SwaigErrorHandler" toc={true}>
Per-tool error hook, called when the handler throws. Return a
[`FunctionResult`][functionresult] to control what the caller hears, or
nothing to fall back to `errorMessage`. Runs before the agent-level
[`onError()`][on-error] hook.
</ParamField>

<ParamField path="opts.errorMessage" type="string" toc={true}>
Message spoken to the caller when the handler throws and no error hook
supplies a response. Defaults to a generic apology asking the caller to try
again.
</ParamField>
</Indent>

## **Returns**
Expand Down
Loading
Loading