Applies real-world observation, abstract, solution in different levels of granularity to the computer network routing problem solving; and applies quotient space to agent, puts forwards the concept of quotient space. Then studies and researches the way of using quotient space granularity to improve the traditional method OSPF routing algorithm. By defining cluster, area and group granularity agent layered model, describes the idea of a multi-granularity agent routing. Establishes routing algorithm based on quotient granularity agent. In the end gives the test results of algorithm improvement by algorithm simulation.