v0.3.0 — prompts move to the step
Breaking change: HasWorkflowPrompt is removed. An agent's prompt is workflow context, not agent behavior — so it's now defined on the step, and the same agent can be asked different things in different workflows:
AgentWorkflow::define('contract-review')
->step(ExtractClausesAgent::class,
prompt: fn ($s) => 'Extract the key clauses: '.$s->get('document'))
->step(RiskAnalysisAgent::class,
prompt: fn ($s) => 'Assess the risk of: '.$s->get('steps.ExtractClausesAgent.text'));step($target, prompt:)— closure over workflow state, or a plain string for static promptswhen(..., thenPrompt:, elsePrompt:)— prompts for agent branch targetsevaluate(..., prompt:)— per-iteration prompt for the loop body- No
prompt:? The state'spromptkey is used as before.
Migration: move each agent's workflowPrompt() body into the prompt on the step that uses it, then delete the interface from the agent. String prompts now count toward the definition hash (changing one is a behavior change under strict drift mode).