Fluent DSL for building durable agentic workflows with Wolverine sagas and Marten event sourcing. Supports Thompson Sampling agent selection, loop detection, budget enforcement, and fork/join parallelism.
$ dotnet add package LevelUp.StrategosFluent DSL for building durable agentic workflows with Wolverine sagas and Marten event sourcing.
dotnet add package LevelUp.Strategos
dotnet add package LevelUp.Strategos.Generators
using Strategos.Builders;
using Strategos.Attributes;
// Define your workflow state
public record OrderState : IWorkflowState
{
public Guid WorkflowId { get; init; }
public OrderStatus Status { get; init; }
public decimal Total { get; init; }
}
// Define workflow steps
public class ValidateOrder : IWorkflowStep<OrderState> { /* ... */ }
public class ProcessPayment : IWorkflowStep<OrderState> { /* ... */ }
public class FulfillOrder : IWorkflowStep<OrderState> { /* ... */ }
// Build the workflow with fluent DSL
[Workflow("process-order")]
public static partial class ProcessOrderWorkflow
{
public static WorkflowDefinition<OrderState> Definition => Workflow<OrderState>
.Create("process-order")
.StartWith<ValidateOrder>()
.Then<ProcessPayment>()
.Finally<FulfillOrder>();
}
.Branch() and .Case().RepeatUntil() and .While().Fork() and .Join().AwaitApproval() and escalation.OnFailure().Validate()MIT