Agentic.Loop.Stage behaviour
(agentic v0.2.2)
Copy Markdown
Behaviour for loop pipeline stages.
Each stage receives a context and a next function representing the rest of
the pipeline. Stages can:
- Pass through: call
next.(context)to continue the pipeline - Short-circuit: return
{:done, result}to stop the pipeline - Transform: modify context before calling
next - Loop: call
nextmultiple times (e.g. ModeRouter)
Stages optionally declare a model_tier/0 if they need an LLM model.
Summary
Callbacks
Execute this stage. Call next.(context) to continue the pipeline.
The model tier this stage needs (e.g. :primary, :lightweight, :image, :vision).
Return nil if no model is needed.
Types
Callbacks
Execute this stage. Call next.(context) to continue the pipeline.
@callback model_tier() :: atom() | nil
The model tier this stage needs (e.g. :primary, :lightweight, :image, :vision).
Return nil if no model is needed.