Crate miyabi_workflow

Crate miyabi_workflow 

Source
Expand description

Miyabi Workflow DSL

Graph-based agent orchestration with fluent API for building complex workflows.

§Features

  • .then() - Sequential execution
  • .branch() - Conditional branching
  • .parallel() - Concurrent execution
  • State persistence with sled

§Example

use miyabi_workflow::WorkflowBuilder;
use miyabi_types::agent::AgentType;

// Define a workflow
let workflow = WorkflowBuilder::new("issue-resolution")
    .step("analyze", AgentType::IssueAgent)
    .then("implement", AgentType::CodeGenAgent)
    .parallel(vec![
        ("test", AgentType::ReviewAgent),
        ("lint", AgentType::CodeGenAgent),
    ])
    .then("deploy", AgentType::DeploymentAgent);

let dag = workflow.build_dag().unwrap();

Re-exports§

pub use builder::ConditionalBranch;
pub use builder::Step;
pub use builder::StepType;
pub use builder::WorkflowBuilder;
pub use condition::Condition;
pub use error::Result;
pub use error::WorkflowError;
pub use state::ExecutionState;
pub use state::StateStore;
pub use state::StepContext;
pub use state::StepOutput;
pub use state::WorkflowOutput;
pub use state::WorkflowStatus;

Modules§

builder
WorkflowBuilder - Fluent API for defining agent workflows
condition
Conditional branching for workflows
error
Error types for workflow execution
state
Workflow state management

Constants§

VERSION
Workflow DSL version