An agent run is a supervised OTP process tree.

Soma is an Erlang/OTP-native agent runtime. Every session, run, and tool call is a supervised OTP process — not a function calling tools in a loop.

Get started View on GitHub

The thesis is simple: agents fail in operational ways — they time out, they hang, they crash, they get cancelled. OTP already has the supervision, monitoring, and crash-isolation semantics for exactly that, so Soma models a run as a process tree instead of an in-process loop.

LFE DSL

A constrained Lisp-flavored grammar compiles to the exact step-list the runtime executes — compile-only, no processes, one-way dependency.

Decision layer

A pure proposal / policy boundary turns an LLM call into typed, allowlist-checked data before any tool ever runs.

Resume journal

A durable event log is the source of truth; the in-memory index is a rebuildable cache that reconstructs run progress after a restart.

Supervised, top to bottom

Every tool invocation crosses a process boundary. A tool crash is data for the run, not a crash of the session.

Soma supervision tree

Quick start

# start the daemon, then run a step list
soma daemon
soma run ./pipeline.lfe
soma status

Why Erlang/OTP

Real cancellation

A cancel is a message that stops the active tool process, not a flag checked at the end.

Crash isolation

Links, monitors, and supervision do the fault-tolerance work — not a pile of defensive try/catch.

Mandatory events

Every session, run, and tool call emits a durable, queryable event from day one.