Squid Mesh is an open source workflow automation runtime for Elixir applications.
It is aimed at Phoenix and OTP apps that want to define and run durable workflows in code without rebuilding the runtime layer around retries, replay, inspection, cancellation, and scheduling.
Core Idea
- define workflows declaratively with triggers, payload contracts, steps, transitions, and retries
- run them durably on top of an existing Repo and Oban
- inspect run history with step and attempt details
- replay and cancel runs through a small public API
- activate recurring workflows through cron-backed triggers
Current Features
- manual triggers
- cron triggers
- step retries with exponential backoff
- built-in
:waitand:logsteps - run inspection with history
- replay and cancellation
- HTTP tool adapter support
Example Workflow
defmodule Content.Workflows.PostDailyDigest do
use SquidMesh.Workflow
workflow do
trigger :daily_digest do
cron("0 9 * * 1-5", timezone: "Etc/UTC")
payload do
field(:feed_url, :string, default: "https://example.com/feed.xml")
field(:discord_webhook_url, :string)
field(:posted_on, :string, default: {:today, :iso8601})
end
end
step(:fetch_feed, Content.Steps.FetchFeed)
step(:build_digest, Content.Steps.BuildDigest)
step(:post_to_discord, Content.Steps.PostToDiscord,
retry: [
max_attempts: 5,
backoff: [type: :exponential, min: 1_000, max: 30_000]
]
)
transition(:fetch_feed, on: :ok, to: :build_digest)
transition(:build_digest, on: :ok, to: :post_to_discord)
transition(:post_to_discord, on: :ok, to: :complete)
end
end
Running from Host App
SquidMesh.start_run(Content.Workflows.PostDailyDigest, %{
discord_webhook_url: System.fetch_env!("DISCORD_WEBHOOK_URL")
})
Under the Hood
-
Oban for durable execution and scheduling
-
Jido for custom step actions
-
Postgres for persisted run state
Status
This is still an early alpha release.
Current focus:
-
API shape
-
workflow contract
-
runtime model
Links
-
Hex: squid_mesh | Hex
-
GitHub:
























