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

type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews