async def finalize(
        self, ctx: Context, output: AgentOutput, memory: BaseMemory
    ) -> AgentOutput:
        """
        Finalize the agent's execution (persist state, cleanup, etc).
        For AzureFoundryWorkflowAgent, this can be a no-op or can persist any final state if needed.
        """
        # Optionally, persist any final state to memory or context
        # For now, just return the output as-is
        return output

        Finalize the agent's execution (persist state, cleanup, etc).
        For AzureFoundryWorkflowAgent, this can be a no-op or can persist any final state if needed.
        
llama-index-integrations/agent/llama-index-agent-azure/llama_index/agent/azure_foundry_agent/base.py