AgentsSkillBase

update_skill_data

View as MarkdownOpen in Claude

Write this skill instance’s namespaced state into a FunctionResult via update_global_data().

Parameters

result
FunctionResultRequired

The FunctionResult to add the global_data update to.

data
dict[str, Any]Required

Skill state dictionary to store under the skill’s namespace.

Returns

FunctionResult — The result, for method chaining.

Example

from signalwire import FunctionResult
def _handle_increment(self, args, raw_data):
state = self.get_skill_data(raw_data)
count = state.get("count", 0) + 1
result = FunctionResult(f"Count is now {count}")
self.update_skill_data(result, {"count": count})
return result