$ show gorango/flowcraft
Flowcraft is a workflow orchestration framework for building, executing, and monitoring durable workflows. It provides a type-safe, composable API for defining workflows as directed graphs of nodes and edges, supporting both programmatic (fluent) and declarative (JSON) definitions. The framework enables progressive scaling from in-memory execution to distributed systems via adapters for message queues and cloud services, with built-in support for patterns like retries, timeouts, human-in-the-loop, batch processing, and subflows. Key architectural pieces include a dependency-free core runtime, a sophisticated context tracking system for efficient state persistence, a plugin-based adapter architecture for distributed execution, and LLM tooling for workflow introspection and control via natural language.
The LLM identified 3 files worth highlighting for reuse:
Implements a sophisticated context tracking system that enables efficient persistence of workflow state by storing only delta changes. The `AsyncContextView` and `TrackedAsyncContext` classes provide a mechanism to track modifications to the context, allowing for optimized storage and retrieval in distributed environments. This pattern is reusable in any stateful application requiring efficient state synchronization.
Defines a clean adapter interface for distributed workflow execution, allowing the core engine to work with various queueing systems (e.g., BullMQ, SQS, RabbitMQ) without modification. The `BaseDistributedAbstract` class encapsulates common operations like enqueueing, dequeuing, and acknowledging tasks, promoting loose coupling and ease of extension to new messaging systems.
Provides a set of tools that enable large language models to interact with and control workflow executions. By exposing functions such as getting workflow output, pausing, resuming, and retrying nodes, this component allows LLMs to act as intelligent agents in workflow orchestration, demonstrating a novel pattern for integrating AI with traditional workflow systems.