Gleam Actor Model

Orchestrate concurrent fault-tolerant actors using Gleam OTP patterns on the Erlang VM.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill gleam-actor-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Gleam Actor Model
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-gleam/skills/gleam-actor-model
Command: npx skills add https://github.com/TheBushidoCollective/han --skill gleam-actor-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Leverage Gleam and the BEAM's actor model (processes, OTP patterns) to build concurrent, fault-tolerant applications with isolation and message passing.

Core Features & Use Cases

  • Lightweight processes and message passing
  • GenServer-like stateful actors and supervisors
  • Process linking, monitoring, and fault tolerance
  • Concurrency-safe state management and patterns

Quick Start

Create a simple actor that maintains state, handles messages, and restarts on failure via a supervisor.

Frequently Asked Questions about Gleam Actor Model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build concurrent applications with fault tolerance on the Erlang VM?

Actor-based concurrency on the Erlang VM uses lightweight processes and message passing for fault-tolerant applications. Gleam's OTP patterns enable you to create stateful actors that restart automatically on failure through supervisor trees, providing isolation and reliable message delivery without manual error handling.

What's the best way to design stateful actors in Gleam?

Gleam actor design follows GenServer-like patterns with typed message protocols. Define actors that maintain internal state, handle typed messages, and respond to callers. Use process linking and monitoring to detect failures, and organize actors under supervisors to enforce restart strategies and fault tolerance.

Can I use Gleam for building distributed workers and request-response services?

Yes. Gleam supports designing worker pools and request-response services through OTP supervisor patterns. Spawn multiple worker actors under a supervisor, route messages to available workers, and handle selective receive to match responses. This scales concurrent request handling across the BEAM.

How do supervision trees manage actor lifecycle and recovery?

Supervision trees organize actors in hierarchical structures with restart policies. Supervisors monitor child actors, detect crashes, and automatically restart failed processes according to the strategy defined. This decouples failure recovery from application logic and ensures system resilience without explicit restart code.

Do I need prior experience with OTP to use actor patterns in Gleam?

Gleam abstracts OTP complexity into functional patterns, but understanding process linking, message passing, and supervisor concepts helps. Gleam's typed approach to messages and actor creation reduces boilerplate, making OTP patterns accessible for building event streams, counters, and stateful services without deep Erlang expertise.