Self-checking logical agents