remove_global_data
remove_global_data
Remove one or more keys from the global session data.
Parameters
keys
A single key string or a list of key strings to remove from global data.
Returns
FunctionResult — self, for chaining.
remove_global_data
Remove one or more keys from the global session data.
A single key string or a list of key strings to remove from global data.
FunctionResult — self, for chaining.
1 from signalwire import AgentBase 2 from signalwire import FunctionResult 3 4 agent = AgentBase(name="my-agent", route="/agent") 5 agent.set_prompt_text("You are a helpful assistant.") 6 7 @agent.tool(name="clear_session_data", description="Clear session data") 8 def clear_session_data(args, raw_data): 9 return ( 10 FunctionResult("Session data cleared.") 11 .remove_global_data(["customer_id", "verified"]) 12 ) 13 14 agent.serve()