Skip to main content

Declarative AI agent workflow execution framework

Project description

fdsx — Flow-Driven Stateful eXecution

PyPI version

A lightweight framework for building and executing complex AI agent workflows using declarative YAML definitions.

Overview

fdsx enables you to define AI agent workflows in YAML, combining the durability of LangGraph (checkpoint, interrupt, conditional routing) with the declarative structure of AWS Step Functions.

Key features:

  • Declarative YAML-based workflow definition
  • Stateful execution with checkpoint/resume
  • Parallel execution with branch aggregation
  • Batch task processing
  • Multiple LLM provider support (Claude, OpenCode, and more)

Installation

pip install fdsx

Or with uv:

uv tool install fdsx

Quick Start

Create a simple YAML workflow file:

name: SimpleFlow
start_at: greet
version: "1.0"

states:
  greet:
    type: task
    provider: system
    command: "echo 'Hello from fdsx!'"
    result_path: $.message
    end: true

Run it:

fdsx run simple_flow.yaml

Feature Overview

State Types

  • task — Execute LLM or CLI commands
  • parallel — Run multiple branches concurrently
  • choice — Conditional routing based on variables
  • wait — Pause for human approval or webhook callback
  • pass — Pass-through state for data transformation

Parallel Execution

Define parallel branches that execute simultaneously with aggregation strategies (majority vote, all, any).

Checkpoint & Resume

Flows automatically persist state. Resume from interruption with:

fdsx resume --thread-id <thread_id>

Batch Tasks

Process multiple tasks in batch mode:

fdsx run workflow.yaml --tasks tasks.md

Structured Logging

All execution details are logged to runs/<thread_id>.json.

Provider Support

Use any CLI-based LLM provider: Claude, Codex, OpenCode, or system commands.

CLI Reference

Command Description
fdsx run <workflow.yaml> Execute a workflow
fdsx run <workflow.yaml> --input key=value Pass input variables
fdsx resume --thread-id <thread_id> Resume from checkpoint
fdsx validate <workflow.yaml> Validate YAML syntax
fdsx list List recent runs

Example Workflow

name: Plan-Implement-Review Loop
start_at: plan
version: "1.0"
max_loop: 3

states:
  plan:
    type: task
    provider: claude
    model: claude-sonnet-4-6
    prompt_template: |
      You are a planning agent. Break down the following task into clear,
      actionable implementation steps.

      Task: {task}
    result_path: $.plan
    next: implement

  implement:
    type: task
    provider: opencode
    model: opencode/minimax-m2.5-free
    prompt_template: |
      You are an implementation agent. Follow this plan exactly.

      Plan: {plan}
    result_path: $.implementation
    next: review

  review:
    type: task
    provider: codex
    model: gpt-5.4
    prompt_template: |
      Review the implementation against the plan.

      Plan: {plan}
      Implementation: {implementation}
    result_path: $.review
    next: check_review

  check_review:
    type: choice
    choices:
      - variable: $.review
        operator: contains
        value: "APPROVED"
        next: done
    default: implement

  done:
    type: pass
    end: true

Run this example:

# First run in a new directory scaffolds .fdsx/ with example workflows:
fdsx run

# Then run the scaffolded example workflow:
fdsx run .fdsx/workflows/plan-implement-review/workflow.yaml --input task="Build a web calculator"

License

MIT License.

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

fdsx-0.1.8.tar.gz (269.8 kB view details)

Uploaded Source

Built Distribution

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

fdsx-0.1.8-py3-none-any.whl (109.5 kB view details)

Uploaded Python 3

File details

Details for the file fdsx-0.1.8.tar.gz.

File metadata

  • Download URL: fdsx-0.1.8.tar.gz
  • Upload date:
  • Size: 269.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdsx-0.1.8.tar.gz
Algorithm Hash digest
SHA256 cd20f59611950670f3376d25dd99901909a6b26303ad7c333f8c4c031dce9994
MD5 54dc18c5c847513e4d1c0f8244ebd21c
BLAKE2b-256 5ad6048598e2857cf07b8c62fd949c9bd580c8f0b5615c27427ef589604d5225

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdsx-0.1.8.tar.gz:

Publisher: publish.yml on kenfdev/fdsx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdsx-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: fdsx-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 109.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdsx-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6fcffde90f41b8bd23b31813c5d648ebffeee7a34d6187273762a89d3b390b00
MD5 63fecf6e720a600c83180ae5a9366e1b
BLAKE2b-256 1da9151cc37834f7ffda94e1d083f6480a0a98855f3d850f58abdc7081077189

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdsx-0.1.8-py3-none-any.whl:

Publisher: publish.yml on kenfdev/fdsx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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