So, I got myself a robot and rigged it a bit, but when I parent the mesh to the rig with "automatic weights" it goes all laggy, so I think that automatic weights isn't the correct way of parenting this kind of robot, but what is?
Your mesh is set to flat shaded and then smoothed by subdivision modifier that cranks the model to 4 million faces and that is way it is getting laggy. This is not a proper way to make smooth models.
Select the mesh, find "Shading" in the left panel and click "Smooth". This provides smoothing that makes the subsurface modifier unnecessary. If you need some edges sharp, add an edge split modifier. You can further teak which edges are sharp and which smooth if you untick "edge angle" and go into edit mode, select the sharp edges and CTRL-E -> mark sharp and only those edges will be sharp.
The mesh seems to deform well with the amount of faces without subsurface modifier although the resolution still seems little high at certain places depending on the intended use.
first use the great advice of kheetor to reduce amount of vertices in the mesh to avoid lags, and then retouch a bit a rig itself. if you want automatic weights to work for you you need to length the main bone toward the top of the hat. or if you want the body and the hat to bent then just add some extra bones on its spine. the hat would have a single bone. and of course fingers - they are not covered with bones. and it seems that it's better for its both legs being attached to the wheel to be affected by a single bone (bone chain) instead of two. otherwise you'll have a headache trying to animate the legs ;-) if nothing works, try to use the "Weight paint mode" (just select a bone and paint its weight manually on the mesh). it's the ultimate solution =)