To solve the problems in the field of component repository, an agent-based peer-to-peer style distributed component repository is proposed in this paper, which benefits from the analysis of software reuse and the component repository. The infrastructure of the agent-based peer-to-peer style distributed component repository is presented and a prototype system is implemented based on this architecture. This component repository can achieve the goal of information share of software component resources and verify the feasibility of the method.