Jido Composer - Composable Agent Flows in Elixir

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!

8 Likes