To understand the concept of agency and emergence thereof, it helps to think about very pure systems that exhibit agency emergence. One such system is Conway’s Game of Life, a kind of cellular automata system which exhibits some uncanny life-like behaviors. You should read the synopsis of Life as well as watch various simulations of it unfold so you get an understanding and an intuition about what’s happening. A remarkable aspect of Life that the rules that govern everything that happens in the system are extremely simple and only apply to a local neighborhood on a grid. What emerges as a run of Life unfolds could hardly be called simple though.
Very commonly in Life we start to see the emergence of structures dubbed Gliders, which appear to move diagonally across the grid, indefinitely if nothing stands in their path. At the basic level, the individual cells in the grid are simply responding to input around them — if so many neighbors are on then turn off, if so many are off, turn on, etc. At the level of the cell, you cannot “see” a Glider, nor does it even make sense to speak in terms of Gliders. The only things cells know about are on, off and the state of neighboring cells. From our higher vantage point above the grid, we see the Glider and we say “that’s a real thing, and it’s moving”. In fact, the Glider isn’t really one particular configuration of on/off cells, but rather a repeating cycle of different patterns.
The Glider is an agent. It emerged from the structure of Life, and is commonplace, meaning that many different starting configurations (random or ordered) will yield Gliders after several generations. There are many other common structures (i.e. agents) which emerge in Life, some of which are very stable, others of which oscillate between two or more states, and still others which exhibit looser forms of stability. Compared to real life, agents that we have observed in the Life seem very fragile. Gliders for instance can be destroyed quite easily by coming into contact with just one errant on cell in its path. The reason Gliders, et al are fragile is that they are highly reactive to external stimuli (the errant on cell), and they lack defenses and strategies which lead to stability, such as self-repair.
The hallmark of agency is a pantheon of mechanisms which keep the system structure stable, or relatively so. On the one end there is the simplest mechanism of pure stability: no change in structure, such as exhibited by a typical rock during the course of a day. On the other end there are more complex mechanisms such as consciousness, culture, and socio-technology* In a very real sense, Darwinian evolution selects for mechanisms which are good at achieving stability, or in other words, agency. This dualism is the fundamental relationship between evolution and emergence in complex adaptive systems. Selection cannot happen without agents to select; agents cannot emerge without selective pressure to create distinctive self-preserving structures. Stuart Kauffman first pointed out this missing link in evolutionary theory, what he calls self-organized criticality, and what others call emergence or agency.
We may be tempted try to establish the primacy of one or the other, evolution or agency. Evolutionary biologists could claim that agency appeared first with auto-catalytic sets of chemicals in the primordial soup that pre-dated life on Earth. But this would be a fundamental mistake. Because every system that we have studied exhibits aspects of evolution and agency to varying degrees. Water molecules under the right selective pressure (which turns out to partially consist of literal pressure) organizes into higher level structures like steam, ice, rivers, laminar flows, turbulent flows, etc. Which in turn organize under the right selective pressures into snowflakes, avalanches, water fountains, tributary river systems, snow men, ice sculptures, so on.
* Socio-technology is a generalized notion of technology embedded in a co-evolutionary context with the society that produces it.