Lightweight Python workflow orchestration library for AI agents, async task execution, retries, and failure-safe automation.
Project description
VibeBlocks
AI-First Orchestration for Python.
VibeBlocks evolves the concept of task orchestration into an AI-ready framework. It maintains the "Zero-Gravity" architecture (no external dependencies) while introducing a Semantic Layer for LLM integration and dynamic flow generation.
Key Concepts
- Block: The atomic unit of execution (formerly Task).
- Chain: A linear sequence of Blocks (formerly Process).
- Flow: High-level orchestrator with failure strategies (formerly Workflow).
Installation
pip install vibeblocks
Publishing To PyPI
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
For a safer first release, upload to TestPyPI first:
python -m twine upload --repository testpypi dist/*
Quick Start
1. Classic Usage
from vibeblocks import Flow, ExecutionContext, block, execute_flow
# 1. Define your blocks with @block decorator
@block(description="Extracts data from source")
def extract(ctx: ExecutionContext):
print("Extracting data...")
ctx.data["raw"] = [1, 2, 3, 4, 5]
return ctx.data["raw"]
@block(description="Doubles the input values")
def transform(ctx: ExecutionContext):
print("Transforming data...")
data = ctx.data["raw"]
ctx.data['processed'] = [x * 2 for x in data]
return ctx.data['processed']
@block(description="Loads data to destination")
def load(ctx: ExecutionContext):
print(f"Loading data: {ctx.data['processed']}")
return True
# 2. Create the Flow
pipeline = Flow("ETL_Flow", [extract, transform, load])
# 3. Execute
result = execute_flow(pipeline, data={})
if result.status == "SUCCESS":
print("Flow completed successfully!")
else:
print(f"Flow failed: {result.errors}")
2. AI-Driven Dynamic Flows
VibeBlocks allows LLMs to generate flows on the fly using JSON schemas.
from vibeblocks.vibeblocks import VibeBlocks
# JSON definition (could come from an LLM)
flow_request = {
"name": "DynamicETL",
"steps": ["extract", "transform", "load"],
"strategy": "ABORT"
}
# Available blocks registry
blocks_registry = {
"extract": extract,
"transform": transform,
"load": load
}
# Execute dynamically
result = VibeBlocks.run_from_json(flow_request, initial_data={}, available_blocks=blocks_registry)
License
MIT License. See LICENSE for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibeblocks-0.1.0.tar.gz.
File metadata
- Download URL: vibeblocks-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa24170e950da5593ca11ee2cfa4e2f99debc2e97986569247e611ddf19ce954
|
|
| MD5 |
9e7623af6b10a30021b142ce1f67d3a7
|
|
| BLAKE2b-256 |
f9d3171d7ffaf2259e349d06f3de7a99e4e00031ddffaf999afa3f7271c2ff17
|
File details
Details for the file vibeblocks-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vibeblocks-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fe49ccdde5a4c2c95c5bdbaee4fb31a18080cba166e503016f7fe17a89e561b
|
|
| MD5 |
c7ee39d24494e9dc009f6d1604864cf8
|
|
| BLAKE2b-256 |
81a39039ef1ff2b06ee30d04a540dd9fe5e2091b201ea19fd5f05153ec1b13fd
|