delete_conversation_metadata
Remove a metadata key from the current conversation once your flow no longer needs it.
delete_conversation_metadata(context: dict, key: str) -> dictRemoves a metadata key-value pair from the conversation. Use it to clear a flag your own flow set, so later actions and conditions no longer see it.
Parameters
| Name | Type | Description |
|---|---|---|
context | dict | The context object passed to your action |
key | str | The metadata key to delete |
Returns
dict: {"success": bool, "message": str}
Returns {"success": False, "message": "Key not found"} if the key doesn't exist.
Behavior
- In test/mock environments, returns a mock success response without persisting.
Examples
Clean up temporary metadata
def execute_action(context):
# Remove a temporary flag after processing
delete_conversation_metadata(context, "pending_verification")
return {"success": True}