We present a novel framework to develop a programmable and autonomous in vivo computer using E. coli, and implement in vivo finite-state automata based on the framework by employing the protein-synthesis mechanism of E. coli. Our fundamental idea to develop a programmable and autonomous finite-state automata on E. coli is that we first encode an input string into one plasmid, encode state-transition functions into the other plasmid, and introduce those two plasmids into an E. coli cell by electroporation. Second, we execute a protein-synthesis process in E. coli combined with four-base codon techniques to simulate a computation (accepting) process of finite automata, which has been proposed for in vitro translation-based computations in . This approach enables us to develop a programmable in vivo computer by simply replacing a plasmid encoding a state-transition function with others. Further, our in vivo finite automata are autonomous because the protein-synthesis process is autonomously executed in the living E. coli cell. We show some successful experiments to run an in vivo finite-state automaton on E. coli.