Skip to main content

A powerful workflow orchestration engine for composing complex computational tasks from modular, type-safe nodes

Project description

Aceteam Workflow Engine

PyPI version Python 3.12+ License: MIT

A powerful, modular workflow orchestration system designed for composing complex computational tasks from smaller, configurable steps. This engine powers the workflow functionality in Aceteam.ai and is now available as an open-source package.

Overview

The Workflow Engine enables you to:

  • Define workflows as directed acyclic graphs (DAGs)
  • Chain node-based tasks with type-safe data passing
  • Persist and retrieve node outputs using various storage backends
  • Execute workflows programmatically or via API

Installation

pip install aceteam-workflow-engine

Example

import asyncio

from workflow_engine import IntegerValue, Workflow
import workflow_engine.nodes
from workflow_engine.contexts import LocalContext
from workflow_engine.execution import TopologicalExecutionAlgorithm

context = LocalContext()
algorithm = TopologicalExecutionAlgorithm()

# Load and run a workflow
with open("examples/addition.json") as f:
    workflow = Workflow.model_validate_json(f.read())

result = asyncio.run(algorithm.execute(
    context=context,
    workflow=workflow,
    input={"c": IntegerValue(-256)},
)) # {'sum': 1811}

Check the examples directory for more sample workflows in JSON form:

Key Features

Core Functionality

  • Graph-Based Execution: Workflows are executed as DAGs with automatic dependency resolution
  • Type-Safe Data Flow: Data passing between nodes is validated using MIME types
  • Flexible Storage: Supports multiple storage backends (Supabase, Local, In-Memory)
  • Error Handling: Robust error propagation and logging system
  • Versioning: Built-in support for workflow versioning

Node Types

  • Input Nodes: Accept workflow inputs with type constraints
  • Processing Nodes: Execute computational tasks with configurable parameters
  • Output Nodes: Format and return workflow results

Storage Backends

  • Supabase: Primary storage backend for production use
  • Local: File-system based storage for development
  • In-Memory: Lightweight storage for testing

Value Type Casting

The workflow engine supports automatic type casting between Value types. The graph below shows all available casting paths:

Value Typecasting Graph

Architecture

src/workflow_engine/
├── contexts/          # Storage backend implementations
│   ├── in_memory.py   # In-memory storage
│   └── local.py       # Local file system storage
├── core/              # Core workflow components
│   ├── context.py     # Execution context
│   ├── data.py        # Data handling
│   ├── edge.py        # Edge definitions
│   ├── execution.py   # Execution logic
│   ├── file.py        # File handling
│   ├── node.py        # Node base classes
│   └── workflow.py    # Workflow definitions
├── execution/         # Execution strategies
│   └── topological.py # DAG-based execution
├── nodes/             # Node implementations
│   ├── arithmetic.py  # Math operations
│   ├── constant.py    # Constant values
│   ├── json.py        # JSON operations
│   └── text.py        # Text operations
└── utils/             # Helper utilities

Development

Setup

# Using uv (recommended)
uv sync

# Using pip
pip install -e .

Testing

uv run pytest  # Runs both unit and integration tests

Documentation

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT License

About

This workflow engine is developed and maintained by Adanomad Consulting and powers the workflow functionality in Aceteam.ai. For commercial support or consulting, please contact us at contact@adanomad.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aceteam_workflow_engine-1.2.0rc1.tar.gz (146.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aceteam_workflow_engine-1.2.0rc1-py3-none-any.whl (72.6 kB view details)

Uploaded Python 3

File details

Details for the file aceteam_workflow_engine-1.2.0rc1.tar.gz.

File metadata

  • Download URL: aceteam_workflow_engine-1.2.0rc1.tar.gz
  • Upload date:
  • Size: 146.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aceteam_workflow_engine-1.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 23409941ed181d6936e71bb8ff222f785e002cfb640ea4a198ccc3e3f366b8bb
MD5 789c06694941e0fc264ab23e88a586af
BLAKE2b-256 db3fa35bb3e32c685ed4d6f3eaf98defd5ba08f15e7f178dc80483736b2c4443

See more details on using hashes here.

File details

Details for the file aceteam_workflow_engine-1.2.0rc1-py3-none-any.whl.

File metadata

  • Download URL: aceteam_workflow_engine-1.2.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 72.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aceteam_workflow_engine-1.2.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 15b52c84a780ca678a1dea3122051514fddff8a0a3de4e44698f7c01d13500ff
MD5 3e6e89efed1a919dc7cfea0d53a14473
BLAKE2b-256 90ad7f775fbe56ad26b1e4d8b95b2edaf30feda8f7420231f3897569d9082b60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page