In Spinoza's Ethics the world is seen as fully deterministic and agency is a matter of perspective:
People think they make choice and act on the world (i.e. they see themselves as having agency), but in the grand scheme of things (from Nature's perspective) they just put in actuality what previous events set them to do anyway. It is to say, we think we change Nature, but we are just the way ("modes") by which Nature realizes itself. The reason we see ourselves as agent is that, most of the time, we ignore (we dont even perceive) what determined us to act the way we did.
The thing is (and this is commentary, not in the book), we all perceive ourselves and people around us as having this agency and act according to this perception, so although illusory the concept of agency is still relevant. Think of it like the value of a ten dollar bill, which is $10 only as long as everybody thinks it is $10.
So, people have agency from their point of view, but it is an illusion that does not count in the absolute, is how Spinoza reconcile determinism with agency.