ALF pipeline for processing a single agentic loop iteration.
Given an LLM response that may contain tool calls, this pipeline:
- ParseToolCalls — Extracts tool calls from the response
- ValidateCalls — Checks names exist, validates args vs schema
- BudgetGuard — Iteration budget enforcement
- DispatchTools — Executes tools via the resolver, collects results
- InjectResults — Builds tool result messages for the next turn
- LoopDecision — Decides
{:continue, msgs}or{:done, response}
This is the per-iteration counterpart to the outer loop in
LlmCore.Agent.Loop. The relationship mirrors the pattern of
an outer iteration controller wrapping a per-event processing pipeline:
GrooveExecutor.run_steps ↔ LlmCore.Agent.Loop.run
Stepwise.Pipeline.Stepwise ↔ LlmCore.Agent.Pipeline.Iteration
StepwiseAction / Advance / etc. ↔ ParseToolCalls / Dispatch / etc.
Summary
Functions
Ensures the ALF pipeline process is running, starting it if necessary.
Functions
@spec components() :: [map()]
Ensures the ALF pipeline process is running, starting it if necessary.
Checks if the pipeline process is registered. If not, starts it with the
given options. Supports sync: true for deterministic test execution.
Parameters
opts— keyword list passed to the ALF manager. Common options::sync— whentrue, pipeline runs synchronously (useful for tests)
Returns
:ok— pipeline is running{:error, reason}— pipeline failed to start
Examples
:ok = LlmCore.Agent.Pipeline.Iteration.ensure_started(sync: true)
@spec flow(map(), list(), Keyword.t()) :: Enumerable.t()
@spec start() :: :ok
@spec start(list()) :: :ok
@spec started?() :: true | false
@spec stream(Enumerable.t(), Keyword.t()) :: Enumerable.t()