delete_conversation_metadata
Delete a metadata key from the current conversation.
delete_conversation_metadata(context: dict, key: str) -> dictRemoves a metadata key-value pair from the conversation.
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}