Baton.Flow.Step (Baton v0.27.4)

Copy Markdown View Source

One declarative step in a Baton.Flow: the worker that runs it, its logical dependencies, an optional Baton.Flow.FanOut, and an opaque meta bag.

Baton interprets name, worker, kind, deps, fan_out, and description when it builds the DAG (Baton.Flow.build/4) or projects the flow for display (Baton.Flow.project/1). meta is a free-form map a consumer stows its own data in (prompt keys, payload types, hooks, …); Baton stores it and echoes it back on the projected node but never reads it.

kind is :llm (a step that calls a model) or :function (a step that only transforms/persists — no LLM call, no output_schema).

Summary

Types

t()

@type t() :: %Baton.Flow.Step{
  deps: [atom()],
  description: String.t() | nil,
  fan_out: Baton.Flow.FanOut.t() | nil,
  kind: :llm | :function,
  meta: map(),
  name: atom(),
  worker: module()
}