WorkflowsHost application
WORKFLOWS

Host application

Keep workflow registration, execution, and application policy in the host.

The ASP.NET Core host owns agents and the workflow catalog. Application handlers decide when to run a flow and how to use its result.

Register components together

Use the complete Defining workflows example.

RegistrationSupplies
AddRuniqServer(...)Agents and their runtime.
AddRuniqWorkflows(...)Catalog, step resolver, runner, and workflow controllers.
UseRuniqDashboard(...)Optional Studio UI and inspection routes.

As the project grows, move definitions into a dedicated folder. Studio should inspect the same registered agents the application executes.

Execute from a handler

Resolve FlowCatalog and IFlowRunner through dependency injection in a scoped service or endpoint. Running workflows provides a handler.

The application owns input validation, access checks, persistence, and business acceptance of the output.

Enable local inspection

After building the app and before app.Run():

Snippet
if (app.Environment.IsDevelopment())
{
    app.UseRuniqDashboard(options =>
    {
        options.Authentication(auth => auth.AllowAnonymous());
    });
}

Import Runiq.AI.Core. Open /runiq; see Studio authentication for protected hosting.

Understand the lifecycle

The runner executes in process. It does not persist checkpoints or resume a job after a host restart. Design durable job ownership and persistence in the application when required.

On this page