Repolode
ergo-services

ergo-services/ergo

An actor-model framework for Go, inspired by Erlang/OTP, for building supervised, network-transparent distributed systems.

Stars
4,681
Forks
191
Open issues
0
Last commit
13 days ago

What is it?

Ergo is a Go framework that organizes a program as isolated actors (processes) that communicate only through messages. Each actor handles its messages one at a time, so developers do not need mutexes around shared state. Actors are organized into supervision trees that restart failed children according to configurable strategies, and an actor can be addressed the same way whether it lives on the local node or on another node in a cluster.

The framework includes supervisors, worker pools, routers, and meta processes that wrap blocking TCP, UDP, port, and web I/O so it does not block regular actor message handling. Clustering features cover service discovery through embedded or external registrars, distributed publish/subscribe events, remote process spawning, and interoperability with Erlang and Elixir nodes over the Erlang distribution protocol. The project has zero external dependencies and is licensed under MIT.

The companion Observer application provides a web UI for inspecting processes, networks, events, and logs on running nodes, and exposes an MCP endpoint so AI assistants can query a cluster. A CLI named ergo generates project scaffolding for applications, actors, and message types.

Key features

  • 01Isolated actors that handle messages sequentially, with four priority queues per mailbox.
  • 02Supervision trees with One For One, All For One, Rest For One, and Simple One For One strategies.
  • 03Same messaging API for local and remote actors, with EDF binary serialization.
  • 04Service discovery via embedded or external registrars such as etcd.
  • 05Distributed publish/subscribe events and remote process spawning.
  • 06Interoperability with Erlang and Elixir nodes over the Erlang distribution protocol.
  • 07Observer web UI and OpenTelemetry-compatible distributed tracing.

Use cases

  • Building real-time backends where each client connection is an addressable actor.
  • Managing large numbers of IoT devices, with one actor per device.
  • Coordinating multi-agent AI systems that need crash isolation and supervision.
  • Running Go services in a heterogeneous cluster alongside Erlang or Elixir nodes.

Quick start

  1. 1

    Import the framework and start a node in your Go code, as shown in the README example

  2. 2

    Spawn an actor on the node and send it messages

Topics

FAQ

What is ergo?
An actor-model framework for Go, inspired by Erlang/OTP, for building supervised, network-transparent distributed systems. Ergo is a Go framework that organizes a program as isolated actors (processes) that communicate only through messages. Each actor handles its messages one at a time, so developers do not need mutexes around shared state. Actors are organized into supervision trees that restart failed children according to configurable strategies, and an actor can be addressed the same way whether it lives on the local node or on another node in a cluster.
Is ergo free to use? What license does it have?
ergo is open source under the MIT license. Check the license terms before using it in commercial products.
Is ergo still maintained?
Actively maintained. The last commit to ergo was on Oct 9, 2026.
What can I use ergo for?
Building real-time backends where each client connection is an addressable actor. Managing large numbers of IoT devices, with one actor per device. Coordinating multi-agent AI systems that need crash isolation and supervision. Running Go services in a heterogeneous cluster alongside Erlang or Elixir nodes.
How do I install ergo?
Import the framework and start a node in your Go code, as shown in the README example Spawn an actor on the node and send it messages
Where can I get ergo?
The source code and installation instructions are on GitHub: https://github.com/ergo-services/ergo

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects