lostbean

lostbean

Hey everyone! I’ve been working on a library called
Jido Composer (hex, docs) and wanted to share it with the community.

What it does

Jido Composer lets you build agent flows by combining two patterns:

  • Workflow — deterministic FSM pipelines with compile-time validated
    transitions
  • Orchestrator — LLM-driven tool-calling loops (provider-agnostic via
    req_llm)

The thing that makes it interesting is that both patterns share the same Node
interface (context -> context), so they nest freely. Workflows can contain
orchestrators as steps, orchestrators can invoke workflows as tools, and you can
go as deep as you want.

Here’s a concrete example — a support bot (orchestrator) that uses a refund
pipeline (workflow) as a tool, where the pipeline itself contains an LLM-driven
fraud check (orchestrator):

# LLM reasons about fraud signals
defmodule FraudCheck do
  use Jido.Composer.Orchestrator,
    name: "fraud_check",
    model: "anthropic:claude-sonnet-4-20250514",
    nodes: [TransactionHistoryAction, RiskScoreAction],
    system_prompt: "Assess fraud risk using available tools."
end

# Deterministic refund pipeline with fraud check + human approval
defmodule RefundPipeline do
  use Jido.Composer.Workflow,
    name: "refund_pipeline",
    nodes: %{
      validate: ValidateRefundAction,
      fraud:    FraudCheck,                    # orchestrator as a step
      approval: %HumanNode{name: "approve", prompt: "Approve refund?"},
      process:  ProcessRefundAction
    },
    transitions: %{
      {:validate, :ok}       => :fraud,
      {:fraud, :ok}          => :approval,
      {:fraud, :flagged}     => :failed,
      {:approval, :approved} => :process,
      {:approval, :rejected} => :failed,
      {:process, :ok}        => :done
    },
    initial: :validate
end

# Support bot with the refund pipeline as one of its tools
defmodule SupportBot do
  use Jido.Composer.Orchestrator,
    name: "support_bot",
    model: "anthropic:claude-sonnet-4-20250514",
    nodes: [RefundPipeline, OrderStatusAction, FAQAction],
    system_prompt: "Help the customer. Use refund_pipeline for refund requests."
end

Three levels deep — LLM flexibility where you need it, FSM guarantees where you
don’t.

What else is built in

  • HumanNode — first-class approval gates that suspend the flow for human
    decisions
  • FanOutNode — parallel branches with merge strategies
  • Checkpoint/resume — persist any running or suspended flow to storage,
    resume later with idempotent semantics, even across deeply nested agent
    hierarchies
  • Generalized suspension — not just human gates; also handles rate limits,
    async completions, and custom pause reasons

Built on Jido, complements Jido AI

Composer is built on the core Jido packages
(jido, jido_action, jido_signal). It complements
Jido AI, which focuses on reasoning
strategies (ReAct, CoT, ToT, and more). Composer focuses on structure — how
you wire agents together, gate them, run them in parallel, and persist them. You
can wrap a Jido AI agent as a node inside a Composer workflow to get structured
flow control around open-ended reasoning.

Getting started

def deps do
  [{:jido_composer, "~> 0.2.0"}]
end

The repo includes 7 interactive livebooks, from a basic ETL pipeline (no API key
needed) to multi-agent pipelines with human-in-the-loop and observability. The
Getting Started guide
walks through your first workflow in 5 minutes.

Would love to hear feedback, questions, or ideas for composition patterns you’d
find useful!

https://github.com/lostbean/jido_composer

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews