AgentPrismWorkflowsBuilderExtensions
AgentPrism.Workflows.dllExtensions that register workflow execution.
public static class AgentPrismWorkflowsBuilderExtensionsInheritance
Section titled “Inheritance”object ← AgentPrismWorkflowsBuilderExtensions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Section titled “Methods”AddWorkflow(IAgentPrismBuilder, string, Func<IServiceProvider, Workflow>, string?)
Section titled “ AddWorkflow(IAgentPrismBuilder, string, Func<IServiceProvider, Workflow>, string?)”Defines a factory-based workflow in code. How the graph is built is entirely up to the caller.
public static IAgentPrismBuilder AddWorkflow(this IAgentPrismBuilder builder, string name, Func<IServiceProvider, Workflow> factory, string? description = null)Parameters
Section titled “Parameters”builder IAgentPrismBuilder
The AgentPrism configuration chain.
name string
The workflow name.
factory Func<IServiceProvider, Workflow>
The factory that builds the graph.
description string?
A short description.
Returns
Section titled “Returns”The chain, for continued configuration.
Remarks
Section titled “Remarks”A workflow defined in code takes precedence over a database definition with the same name. The same rule applies to the agent catalog: someone with write access to the database cannot take over a behavior registered in code.
builder.AddAgentPrism() .UseWorkflows() .AddWorkflow("triage", provider => BuildTriageGraph(provider), "Routes an incoming ticket.");Exceptions
Section titled “Exceptions”One of the parameters is null.
name is empty.
UseWorkflows(IAgentPrismBuilder, Action<AgentPrismWorkflowOptions>?)
Section titled “ UseWorkflows(IAgentPrismBuilder, Action<AgentPrismWorkflowOptions>?)”Registers the workflow execution engine. Agents from the catalog can be
chained together with ready-made patterns, and every execution produces
a runs row.
public static IAgentPrismBuilder UseWorkflows(this IAgentPrismBuilder builder, Action<AgentPrismWorkflowOptions>? configure = null)Parameters
Section titled “Parameters”builder IAgentPrismBuilder
The AgentPrism configuration chain.
configure Action<AgentPrismWorkflowOptions>?
The option customizer.
Returns
Section titled “Returns”The chain, for continued configuration.
Remarks
Section titled “Remarks”Security boundary. A workflow defined from the UI does
not produce new behavior: it only sequences catalog agents with
ready-made patterns whose order is fixed. A free-form graph - custom
Executor types, conditional edges, sub-workflows - is only
defined in code, with AgentPrismWorkflowsBuilderExtensions.AddWorkflow. The code-only tools rule is
preserved this way.
The definition and checkpoint stores are already registered by
AddAgentPrism; this call only turns execution on.
While the engine is not registered, the HTTP layer can still list and
manage definitions - only the execution endpoint returns 501.
AgentPrismWorkflowOptions.SectionName (AgentPrism:Workflows)
is BOUND from IConfiguration - the same contract as
every other Use* extension (UseOpenAI,
UsePostgreSql, UseSkillScripts, and so on).
configure runs AFTER this binding, so code can still
override the config.
builder.AddAgentPrism() .UseOpenAI(apiKey) .UsePostgreSql(connectionString) .UseWorkflows() .UseUI();Exceptions
Section titled “Exceptions”builder is null.