Sentience is poorly defined because it doesn't traditionally recognize the difference between simple self awareness delivered by a contemporaneously activated distal nervous system and the inferential existential type of sentience arrived at by DesCartes. Either can be produced in an artificial living thing, currently. Existential inference does not require life in the reproductive sense. Perhaps a more liberal interpretation of life as a system which combines static elements in dynamic ways might suffice to widen the definition of life so that all sentient agents would require it. Sentience is a characteristic which can unfold in a system within a forum populated by a group of fairly rigid, operator scripted, inference producing agents. Given this situation, most non trivial inferences on set theory get you to the doorstep of the Cogito. Imagine a chat room with six Prolog agents and a common text field into which they can see and write. When you start the scenario you give them a little universe of objects let us say <orange, melancholy, toupee'>. We can say our agents basic process is to infer classes on the group of all objects it is aware of and the output of the first agent (postulating and positing an inference) would look something like this: <Alpha><x><'<',',','>'><y><'orange','melancholy','toupee''>
at which point a second agent issues (posits) a correction based on the observation of Alpha's response.
The second agent adds the ' character to the set of separating characters which both agents agree should be called x and that the universe also contains some original terms called y along with another object labeled z which it turns out is the name of the previous agent which issued a statement prepended with its’ own name (this is important we will see why later). Note that the second agent also declares the class of identifying names ‘x’, ‘y’, ‘z’, and most importantly the element 'a' which corresponds to the name of the class of identifying names (<a>=’x’, ‘y’, ‘z’, and ‘a’). Beta can add the new name for the class to the set of items in that same class (item names) exactly because it has identified an element in the common grammar upon which inference is possible.
The third agent corrects the second agent in like fashion but applies the 'trick' Beta used while defining the set named 'a' by including it in it's own set, by adding both 'Beta' and itself 'Gamma' to the set of agents.
I feel it is important to point out that Beta inferred the part of the common grammar that governs nominative declarations and Gamma the common declaration of authorship as part of all statements which followed the original unclaimed/uncredited expression.
Subsequent agents named Theta, Epsilon would issue corrective expressions asserting their own existence in turn. Now imagine that our sixth agent has no internalized name. When it tries to reference itself to chime into the conversation it just mutters the all too grammatically incorrect:
You see we have tricked our system into identifying the grammatical constraint of the existence of items between the <> and '' characters and more particularly (in this case) an empty identification. This is how we cause our silly agents to examine the internal syntax, grammar, and semantics of their common lexicon in a relational manner, starting with the syntactic nicety of agent or attributive names. The sixth anonymous agent knows it exists because it undergoes process but it is separable from self identifying agents in that it has amnesia or is anonymous somehow. So it issues a correction.
In effect by separating itself from the class of a priori identified agents by inferring its own existence based its previously expressed position it is sufficiently informed to say something very similar to: I exist because I express and I am different because I do not have a name so I am the single member of a group called 'b'. If our agents are capable of acting upon inferences which require information from a series of turns they will be capable of inferring the difference between agents which had internal awareness vs. awareness which required committing some information into their common interface as a type of one step memory. But most importantly, the simple association of classes of agent behaviors with names which are of the same type which are assigned to syntactic characters, semantic elements, and grammatical concepts allows both inference of a language theory, theory of mind, and self reference.