add doc entries for principal
add documentation for agents and remove unused principal update function