Agent
Agent is used to manage shared state. It is an abstraction over the low-level process management.
Actors are entities that encapsulate state and communicate by passing messages. Agents are often seen as "facilitators" or "intermediaries" for managing state and behavior in a controlled way.
The term "agent" is widely used in concurrent and distributed programming models. Other languages like Clojure also use similar terminology.
{:ok, agent} = Agent.start(fn -> 0 end)
Agent.get(agent, fn state -> state end)
Agent.update(agent, fn (state) -> state + 1 end)
Agent.get(agent, fn state -> state end)