The subject of the research is developing a formal model of a software agent based on a cognitive architecture, where behaviour is defined through an explicit internal state, moral schemas and transition rules, with large language models serving as modules for semantic analysis, condition checking and response generation with high interpretability. The aim is to show how the agent’s behavioural logic can be extracted from the language model’s latent state and represented in an explicit architectural structure with clear functional separation. The proposed agent state model includes the current and normative states, working memory, active schemas and event history. A formal moral schema description defines a local semantic space, permissible actions, evaluation function, transition rule and discrepancy threshold. A mechanism for simultaneous schema activation and a transition graph (accounting for priorities and mutual influences) is proposed. A hybrid stage completion criterion combines metric proximity of states with logical requirements and resource cost assessment. The methodology covers formal descriptions of the agent’s state, schemas, transitions and interaction stage completion criteria under dynamic conditions. The novelty lies in transferring action selection elements from the prompt and latent state into an explicit structure ensuring transparency, formal verification and compliance with ethical/functional constraints. The results can be used for designing LLM agents in systems requiring high quality language responses and explicit specification of states, interaction stages and actions, including adaptation to new scenarios and response to unforeseen situations under dynamic conditions and domain specific requirements.
Anatolii Andreevich Dolgih (Sun,) studied this question.