```\nfunction beneficiaryWithdrawable(\n address recipient,\n address sender,\n uint256 agentID,\n uint256 proposedAmount\n) external returns (\n uint256 amount\n) {\n AgentBeneficiary memory beneficiary = \_agentBeneficiaries[agentID];\n address benneficiaryAddress = beneficiary.active.beneficiary;\n // If the sender is not the owner of the Agent or the beneficiary, revert\n if(\n !(benneficiaryAddress == sender || (IAuth(msg.sender).owner() == sender && recipient == benneficiaryAddress) )) {\n revert Unauthorized();\n }\n (\n beneficiary,\n amount\n ) = beneficiary.withdraw(proposedAmount);\n // update the beneficiary in storage\n \_agentBeneficiaries[agentID] = beneficiary;\n}\n```\n