AgentsDataMap

output

View as MarkdownOpen in Claude

Set the output for the most recently added webhook. The FunctionResult template is filled with response data after the API call succeeds.

Always set a fallback_output so the AI has something meaningful to say even when external APIs are unavailable.

Parameters

result
FunctionResultRequired

A FunctionResult defining the response template. Use ${response.field} to reference API response fields.

Returns

DataMap — Self for method chaining. Raises ValueError if no webhook has been added yet.

Example

1from signalwire import DataMap, FunctionResult
2
3dm = DataMap("get_weather")
4dm.webhook("GET", "https://api.weather.com/v1/current")
5dm.output(FunctionResult("The weather is ${response.current.condition.text}."))