Skip to main content

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

  1. Block: The atomic unit of execution.
  2. Chain: A linear sequence of Blocks.
  3. Flow: High-level orchestrator with failure strategies.

Installation

pip install vibeblocks

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

vibeblocks-0.1.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

vibeblocks-0.1.1-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file vibeblocks-0.1.1.tar.gz.

File metadata

  • Download URL: vibeblocks-0.1.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vibeblocks-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b9ae0170baf9103c9ed68b0f43fceec303f024226245388c4806b2a057bce253
MD5 be8912f75e89cfcf092852bbe1844027
BLAKE2b-256 fa2ff9389132b446b4abff5e6d090e07d95b4ac8642fe5e877ed19646d1d7cac

See more details on using hashes here.

File details

Details for the file vibeblocks-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vibeblocks-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vibeblocks-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e6fd29ea03c5aa382364c015814cae4c4a5d782049128b8e70842d72590df89
MD5 b8a05775de8b7487f3bb68fbc5d94047
BLAKE2b-256 bdeaace48ace528b1d66ef52ebac8b928b7b3a748f7f7f083a2e5b13ba825643

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