A flexible and extensible workflow engine for building end-to-end automations and tasks.
This project is currently under active development and is not yet ready for production use. The APIs, interfaces, and functionality are subject to change without notice. We recommend waiting for a stable release before using FUSE in any production environment.
FUSE is a workflow engine that enables the creation of complex automation pipelines through a system of interconnected nodes. Each node in the workflow can process data, make decisions, and pass results to subsequent nodes through a standardized interface.
A Node is the fundamental building block of a workflow. Each node:
- Has a unique identifier
- Defines input and output metadata
- Executes specific logic
- Can operate in both synchronous and asynchronous modes
- Returns standardized results
Nodes define their interface through metadata that includes:
- Input parameters with validation rules
- Output specifications
- Edge configuration for connecting nodes
- Parameter schemas with type checking and validation
Nodes can return results in two ways:
- Synchronous: Immediate results with status and data
- Asynchronous: Results streamed through a channel
graph TD
A[Node] --> B[Execute]
B --> C[Sync Result]
B --> D[Async Result]
A --> E[Metadata]
E --> F[Input Schema]
E --> G[Output Schema]
E --> H[Edge Config]
- Type-Safe Interfaces: Strong typing and validation for node inputs and outputs
- Flexible Execution: Support for both synchronous and asynchronous node execution
- Metadata-Driven: Comprehensive metadata system for defining node interfaces
- Validation Rules: Built-in support for parameter validation with custom rules
- Edge Management: Configurable edge connections between nodes
- Parameter Schemas: Detailed schema definitions for node parameters
- Go 1.21 or later
- Make
- golangci-lint
make build
make test
make lint
// Define a custom node
type MyNode struct {
id string
metadata NodeMetadata
}
func (n *MyNode) ID() string {
return n.id
}
func (n *MyNode) Metadata() NodeMetadata {
return n.metadata
}
func (n *MyNode) Execute(input NodeInput) (NodeResult, error) {
// Process input
result := processData(input)
// Return synchronous result
return NewNodeResult(NodeOutputStatusSuccess, result), nil
}
// Create node metadata
metadata := NewNodeMetadata(
InputOutputMetadata{
Parameters: Parameters{
"input": ParameterSchema{
Name: "input",
Type: "string",
Required: true,
Validations: []string{"len>0"},
},
},
},
InputOutputMetadata{
Parameters: Parameters{
"output": ParameterSchema{
Name: "output",
Type: "string",
},
},
},
)
The project follows a clean architecture with the following structure:
pkg/workflow
: Core workflow engine implementationpkg/uuid
: UUID generation utilitiesinternal/
: Internal packages (not for external use)cmd/
: Command-line applicationsdocs/
: Documentation
Please see CONTRIBUTE.md for detailed information about:
- Setting up your development environment
- Code conventions and project structure
- Submitting pull requests
- Commit message guidelines
[License information to be added]