"The K-Machine" is a performance experiment that attempts to train artificial intelligence to continue writing the ending of Franz Kafka's unfinished work The Castle by rewriting it into a theatre text and performing it as a staged reading in the stage space of the Goethe-Institut in Beijing and Aranya Festival in June. The title of the work, "The K-Machine", corresponds to the aesthetics of Heiner Müller's masterpiece "The Hamlet Machine", a textual deconstruction and reconfiguration of the relationship between audience and actors through the self-revelation of the actors and counter-narratives of the characters. Through the intervention of artificial intelligence, however, the authorial subjectivity of the work is questioned on a meta-level. The performance is to be exhibited in the form of video during the CILECT Conference, in which serious discussions caused by Artificial Intelligence shall be provoked between the performers and the audiences, including the legitimacy of authorship, the belonging of aesthetical agency of AI-generated texts and images, as well as sustainability of AI tools in the age of techno-feudalism (a term coined by Yanis Varoufakis).