Skip to content

Steps Overview

A CARL chain is a list of steps. Each step is a typed description object that declares what to do and what it depends on. The DAG executor picks an executor based on the step’s type.

Use the typed classes (LLMStepDescription, ToolStepDescription, …) for new code — they give you type-checked fields and clear intent. The legacy unified StepDescription class is still accepted for backward compatibility; convert it with legacy_step.to_typed_step().

All step classes extend StepDescriptionBase and inherit these fields:

FieldTypeDefaultPurpose
numberint— (required)Step number in the sequence.
titlestr— (required)Human-readable title.
dependencieslist[int][]Step numbers this step waits for.
triggered_bylist[str][]Event names that gate this step (see event-driven steps). Becomes ready only when all listed events have been emitted and numeric dependencies are met.
checkpointboolFalseMark as a RE-PLAN rollback checkpoint.
checkpoint_namestr | NoneNoneOptional checkpoint label.
replan_enabledbool | NoneNonePer-step RE-PLAN override (None = use chain policy).
metricslist[MetricBase][]Metrics evaluated after the step runs.
loop_back_toint | NoneNoneStep to loop back to — see loops.
loop_configLoopConfig | NoneNoneLoop condition + budget guard.
cacheStepCache | NoneNoneResult memoization — see caching.
TypeClassWhat it does
llmLLMStepDescriptionChain-of-thought reasoning with an LLM (the default).
toolToolStepDescriptionCalls a registered Python function.
memoryMemoryStepDescriptionread / write / append / delete / list on shared memory.
transformTransformStepDescriptionData transforms with no LLM call.
conditionalConditionalStepDescriptionBranch to a step based on a condition.
structured_outputStructuredOutputStepDescriptionLLM output constrained to a JSON schema.

These are introduced on the advanced steps page and get full guides in their own sections (Orchestration, Skills, MCP, Evaluation).

TypeClassWhat it does
mcpMCPStepDescriptionCall a tool on an MCP server.
mcp_resourceMCPResourceStepDescriptionRead a named MCP resource into memory.
agent_skillAgentSkillStepDescriptionRun an AgentSkill folder.
agent_handoffAgentHandoffStepDescriptionDelegate to a complete sub-chain.
supervisorSupervisorStepDescriptionLLM routes the task to one of N sub-chains.
debateDebateStepDescriptionRound-robin multi-agent debate + judge.
parallel_samplingParallelSamplingStepDescriptionSample N responses, vote / judge the best.
human_inputHumanInputStepDescriptionPause for human input (callable or webhook).
tool_discoveryToolDiscoveryStepDescriptionDiscover + register tools at runtime.
evaluationEvaluationStepDescriptionInline quality gate on another step’s output.
  • Loops — re-run a range of steps until a condition holds.
  • Caching — memoize a step’s result within a run.
  • Dynamic references — $history, $memory, … wire steps together.