I've been trying to learn Elixir today. Maybe I'm just misunderstanding the whole threading thing but I don't quite see how Agents work. They are explained to be a simple abstraction around state, allowing you to safely access state from different processes. When calling start_link you usually get a PID to an agent process, right? Does that mean you hand this PID around to every place that has to access this particular instance of state? And you can "start" multiple "links" which are all separate instances of that particular kind of Agent, but they're separate from each other?
The whole promise of thread/process safety comes from how this is inherently based on passing messages around if I am understanding this correctly?