Lavender Ratties!!! or Rat Trap by Michael J. Daley from Holiday House, 2008.
I reviewed Daley's Space Station Rat back here in 2006. It's remained one of my favourites in my collection.
In Rat Trap Daley continues the story, as Rat has to hide from investigators, learns something about ethics and learns how to tempt a computer into sentience.
I love this book. I love that Rat remains always and ever a grown up person who has as much practical to teach the boy as she has to learn. I love the fact that Daley never loses sight of the fact that in a rough, tough universe sentimental messages aren't half as useful as a good set of screwdrivers.