Make avatars into a kind of prim, and make it possible for your agent to inhabit any object or prim that you own. Let avatar prims be scriptable just like normal prims. This would allow scripted avatars that are not controlled by users and better control of your own avatar or character(size, rotation etc.). Wanna make your own movie? Make your own scripted actors. Wanna be a small rat? Make a prim rat, and become it.
To make an agent inhabit an object/prim, there could do something like you right click an object and select "Become this object". This way you could let other prims/objects than avatars act as an "avatar". Any avatar prim would react to the normal avatar functions, so you could make an avatar prim play a walk animation and make it walk by using the physics functions, even use it as a vehicle. Permission requests for a script to animate an avatar prim would be displayed to the user, and it should have a setting like let anyone animate/let noone(except owner) animate. Agent functions would work as now, for example llTeleportAgentHome would teleport the agent and thus also the object that the agent currently resides in, which now might be a wooden cube, to home location. The avatar prim should react to the normal prim functions and have a new PRIM_TYPE_AVATAR so that all the current avatar look parameters could be set with llSetPrimitiveParams. The primitive params tab in the building menu could display something like the current avatar appearance menu.