In this paper we suggest an architecture for a software agent which operates a physical device and is capable of making observations
and of testing and repairing the device components. We present novel definitions of the notions of symptom, candidate diagnosis,
and diagnosis which are based on the theory of action language AL. The new definitions allow one to give a simple account of the agent’s behavior in which many of the agent’s tasks are reduced
to computing stable models of logic programs.