This paper presents an implementation of bottom-up learning in a cognitive model. The paper relates the learning mechanism, its implementation in a Soar agent, and an experiment where the agent learns to solve an example task. The agent first learns primary schemas (low-level patterns of behavior) and then secondary schemas (patterns of primary schemas). This implementation draws from theories of hierarchical sequence learning and constructivist learning. It constitutes a first implementation of these theories in Soar, and it shows that Soar can be used to model bottom-up learning, using the weighted preference mechanism available in Soar 9. This study also shows the importance of modeling the agent's activity traces to help the modeler develop the agent. This approach offers a way to represent how autonomous agents create declarative knowledge from and about their interaction with their environment, teammates or opponents.