The most important design principles of Industry 4.0 are decentralization and intelligence. The entities, like resources and materials, can make decisions on their own by means of cyber-physical systems. For research purposes, we unify cyber entities and physical entities and build an agent-based simulation model. The agents learn knowledges offline during simulation runs and become smarter and smarter. The model will finally connect to the physical systems and carry out online decision-making. The study is the first stage of the whole project. A framework for the agent-based simulation is developed and an agent-based model of the job shop production including release agents, machine group agents, and job agents are built.