AgentTask required tool-call enforcement best practice

With AgentTasks, what’s the recommended way to ensure a required tool call actually happens before the task progresses? For example, if the model responds conversationally but skips the tool call, should we enforce progress in task code with state checks/no-progress guards, or is there a built-in LiveKit pattern for requiring a tool call before continuing?

The Collect Consent demo comes to mind, this is from Tasks and task groups | LiveKit Documentation and only calls complete() from within the function tool once it has been executed.

from livekit.agents import AgentTask, function_tool

class CollectConsent(AgentTask[bool]):
    def __init__(self, chat_ctx=None):
        super().__init__(
            instructions="""
            Ask for recording consent and get a clear yes or no answer.
            Be polite and professional.
            """,
            chat_ctx=chat_ctx,
        )

    async def on_enter(self) -> None:
        await self.session.generate_reply(
            instructions="""
            Briefly introduce yourself, then ask for permission to record the call for quality assurance and training purposes.
            Make it clear that they can decline.
            """
        )

    @function_tool
    async def consent_given(self) -> None:
        """Use this when the user gives consent to record."""
        self.complete(True)

    @function_tool
    async def consent_denied(self) -> None:
        """Use this when the user denies consent to record."""
        self.complete(False)