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

achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
danschultzer
I’ve moved the strategies out of PowAssent and created a multi-provider framework for Elixir. This way the strategies can be used in any ...
New
gtcode
Aloha gang, There’s a new class of AI model out from TypeSafe. Jev is their flagship model. You can learn about it here: ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
AstonJ
With advancements in AI gathering pace and set to increasingly accelerate, perhaps it’s worth having an annual thread on the topic - feel...
New
bartblast
If you haven’t tried Hologram yet, what’s stopped you? Here’s why I’m asking. Building a framework turns out to be two jobs, the framewo...
New
mat-hek
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn: This is possible because it now builds on a very stab...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews