LlmCore.Agent.ToolDispatch.Components.BuildPlan (llm_core v0.3.0)

Copy Markdown View Source

Evaluates the dispatch recipe to produce an execution plan.

The recipe is a function that takes the tool call's arguments and returns an execution plan with serial steps (dependent, run in order) and parallel steps (independent, run concurrently).

Plan Structure

%{
  serial: [%{tool: "tool_name", arguments: %{...}, label: "Step label"}],
  parallel: [%{tool: "tool_name", arguments: %{...}, label: "Step label"}],
  compose: &custom_compose_fn/1  # optional
}

Summary

Functions

Evaluates the recipe function to produce an execution plan.

Functions

call(event, opts)

Evaluates the recipe function to produce an execution plan.

Parameters

  • event%Event{} with recipe function and call
  • opts — ALF stage options (unused)

Returns

Updated %Event{} with plan and total_parallel populated. On recipe error, sets status: :error with details.