microsoft/semantic-kernel · error · ArgumentException
Workflow inputs are not specified.
Error message
Workflow inputs are not specified.
What it means
Thrown by WorkflowBuilder.BuildProcessAsync when workflow.Inputs is null. Even if nodes are present, the builder requires an Inputs object to wire input events into the process, so a null Inputs is rejected after the nodes check.
Source
Thrown at dotnet/src/Experimental/Process.Core/Workflow/WorkflowBuilder.cs:46
/// <summary>
/// Builds a process from a workflow definition.
/// </summary>
/// <param name="workflow">An instance of <see cref="Workflow"/>.</param>
/// <param name="yaml">Workflow definition in YAML format.</param>
/// <param name="stepTypes">Collection of preloaded step types.</param>
public async Task<KernelProcess?> BuildProcessAsync(Workflow workflow, string yaml, Dictionary<string, Type>? stepTypes = null)
{
this._yaml = yaml;
var stepBuilders = new Dictionary<string, ProcessStepBuilder>();
if (workflow.Nodes is null || workflow.Nodes.Count == 0)
{
throw new ArgumentException("Workflow nodes are not specified.");
}
if (workflow.Inputs is null)
{
throw new ArgumentException("Workflow inputs are not specified.");
}
// TODO: Process outputs
// TODO: Process variables
ProcessBuilder processBuilder = new(workflow.Id, description: workflow.Description, stateType: typeof(ProcessDefaultState));
if (workflow.Inputs.Events?.CloudEvents is not null)
{
foreach (CloudEvent inputEvent in workflow.Inputs.Events.CloudEvents)
{
await this.AddInputEventAsync(inputEvent, processBuilder).ConfigureAwait(false);
}
}
if (workflow.Inputs.Messages is not null)
{
await this.AddInputMessagesEventAsync(processBuilder).ConfigureAwait(false);View on GitHub (pinned to c028a0c7dc)
Solutions
- Include a non-null 'inputs' section in the workflow definition.
- Validate workflow.Inputs != null before calling BuildProcessAsync.
- If the workflow genuinely has no external inputs, supply an empty Inputs object rather than null.
Example fix
// before workflow.Inputs = null; await builder.BuildProcessAsync(workflow, yaml); // after workflow.Inputs ??= new Inputs(); await builder.BuildProcessAsync(workflow, yaml);
Defensive patterns
Strategy: validation
Validate before calling
if (workflow.Inputs is null)
throw new ArgumentException("Workflow must declare an inputs section."); Type guard
static bool HasInputs(Workflow w) => w.Inputs is not null;
Try / catch
try { await builder.BuildProcessAsync(workflow, yaml); }
catch (ArgumentException ex) when (ex.Message.Contains("inputs are not specified"))
{ /* supply an Inputs object, possibly empty */ } Prevention
- Always include an 'inputs' block in workflow definitions.
- Default Inputs to an empty object when authoring programmatically.
- Validate Inputs != null right after the Nodes check in a pre-build validator.
When it happens
Trigger: Calling BuildProcessAsync with a Workflow whose Inputs property is null (YAML omits the inputs section, or deserialization leaves it unset).
Common situations: Workflow definitions that declare nodes but forget the inputs block; partial test fixtures; schema mismatches during deserialization.
Related errors
- Workflow nodes are not specified.
- Unsupported node type: {node.Type}
- Declarative steps must have an agent defined.
- Failed to build step from agent definition: {node.Id}
- A complete on_complete condition is required for declarative
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/34ba22bc229fd514.
Report an issue: GitHub.