# `LangChain.Chains.LLMChain.Modes.Step`
[🔗](https://github.com/brainlid/langchain/blob/v0.8.0/lib/chains/llm_chain/modes/step.ex#L1)

Execution mode that runs a single step at a time.

A "step" is: execute any pending tool calls, then call the LLM.
If no tools were pending, just call the LLM.

## Options

- `:should_continue?` — Function `(LLMChain.t() -> boolean())` called after
  each step. If it returns `true`, another step runs. If `false` or not
  provided, the mode returns after one step.

## Usage

    # Single step
    LLMChain.run(chain, mode: :step)

    # Auto-loop with condition
    LLMChain.run(chain, mode: :step,
      should_continue?: fn chain ->
        chain.needs_response && length(chain.exchanged_messages) < 10
      end)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
