Skip to main content

The Makefile for AI workflows — 1 dependency, zero daemons, provider-agnostic

Project description

yflow

The Makefile for AI workflows — 1 dependency, zero daemons, provider-agnostic.

Define multi-agent workflows in YAML. Run them anywhere. No Docker, no servers, no lock-in.

Why yflow?

AI agent platforms are powerful but heavyweight — dozens of dependencies, daemons, Docker, and vendor lock-in. yflow is different:

Feature yflow Claude Code Workflow awf AutoTeam Animus AQM
Dependencies 1 (PyYAML) Node.js + Anthropic API 20+ 30+ 15+ 25+
Daemon required
Docker required
Provider-agnostic ❌ (Anthropic-only)
Definition format YAML (~20 lines) Generated code (300+ lines) YAML Python DSL YAML YAML
Variable passing $step-id.output
Sub-workflows
Template system ✅ auto-classify
Persistence Permanent 3-day auto-delete Permanent Permanent Permanent Permanent

yflow vs Claude Code Workflow

Claude Code added a Workflow feature in v2.1.47 (/workflow, --ultraworkflow) — a major step forward for multi-agent orchestration. But it's a different design philosophy:

Definition format: Claude Code generates 300+ line code scripts. yflow uses declarative YAML (~20 lines). Same power, less ceremony.

Vendor lock-in: Claude Code Workflow requires Node.js + an Anthropic API key. yflow is pure Python with one dependency (PyYAML). Use any LLM provider.

Persistence: Claude Code Workflow scripts auto-delete after 3 days (unless manually saved to ~/.claude/workflows/). yflow workflows are permanent files you control.

Complementary, not competing. Claude Code Workflow excels at Anthropic-native, single-session coding pipelines. yflow excels at cross-provider, persistent, multi-tool orchestration. Use yflow to define the pipeline, and Claude Code (or any agent) as one of the executors.

Install

pip install yflow

That's it. No Docker, no daemon, no API keys. Just yflow on your PATH.

Quick Start

1. Create a workflow

yflow create hello-world

2. Edit it

name: "Hello World"
description: "My first yflow pipeline"

steps:
  - id: greet
    name: "Say hello"
    type: command
    command: "echo 'Hello from yflow!'"

  - id: verify
    name: "Verify output"
    type: command
    command: "echo 'Previous step said: $greet.output'"
    depends_on: greet

3. Run it

yflow run hello-world --native
⚡ Native mode: executing locally...
   Local steps: 2 completed
   ✅ All steps executed natively!

Step Types

Type Description Needs external agent?
command Shell command (native execution) No
reasonix One-shot reasoning / coding agent Yes (reasonix CLI)
opencode Coding agent Yes (opencode CLI)
gbrain Knowledge memory query/store Optional (gbrain CLI)
subagent Delegated AI task Yes
skill Reusable skill/capability Yes
workflow Reference another workflow No

gbrain — Optional Knowledge Memory

yflow integrates with gbrain as an optional tool backend. gbrain is Garry Tan's knowledge memory system — a vector database for storing and retrieving structured knowledge across sessions.

steps:
  # Query past knowledge before coding
  - id: check_known
    type: gbrain
    action: query
    query: "LanceDB dimension mismatch fix"
    output_as: past_solution

  # Save new knowledge
  - id: record_fix
    type: gbrain
    action: put
    slug: "new-bug-pattern"
    content: |
      # Bug: $check_known.output

  # Full-text search
  - id: find_patterns
    type: gbrain
    action: search
    query: "Riverpod context loss"

  # Read a page
  - id: read_page
    type: gbrain
    action: get
    slug: "lancedb-dimension-mismatch"

Installation: gbrain is NOT a pip dependency. Install it separately:

git clone https://github.com/garrytan/gbrain ~/gbrain
cd ~/gbrain && bun install

Set GBRAIN_BIN env var if gbrain is not on $PATH. yflow auto-detects ~/.local/bin/bun run ~/gbrain/src/cli.ts as fallback.

Variable Passing

reasonix — DeepSeek-Native Agent (Run + Code)

yflow integrates with Reasonix, a DeepSeek-native agent framework with 91%+ cache hit rates. Two modes:

Run mode (default): Read-only analysis, ultra-cheap (~$0.00003 per call):

- id: analyze
  type: reasonix
  prompt: "Review this code for security issues"
  model: flash  # flash or pro (default: flash)

ACP mode: Full coding agent — read, write, edit files, run terminal commands:

- id: fix_bug
  type: reasonix
  mode: acp
  prompt: "Fix the race condition in worker.py"
  workdir: /home/user/project
  model: flash
  timeout: 600

Fields for reasonix steps:

  • prompt — task description
  • moderun (default, read-only) or acp (coding with filesystem access)
  • modelflash (default) or pro
  • workdir — working directory for acp mode (default: cwd)
  • timeout — seconds (default: 300 run / 600 acp)

Requires Reasonix CLI and DEEPSEEK_API_KEY in environment.

Variable Passing

Steps can reference outputs from previous steps:

- id: build
  type: command
  command: "npm run build"

- id: test
  type: command
  command: "echo 'Build output: $build.output'"
  depends_on: build

Templates

Bootstrap common workflows from templates:

yflow create my-fix --from backend-bug-fix --set TASK_DESCRIPTION="Fix timeout in /api/search"

Built-in templates: backend-bug-fix, backend-feature, flutter-bug-fix, flutter-feature.

Use with Any AI Agent

yflow is agent-agnostic. Pipe prompts to your agent of choice:

export YFLOW_EXEC="hermes -p"
yflow run my-pipeline --exec

Or use with any agent that can consume a prompt string.

Learn More

License

MIT © Guo-luen Huang

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

yflow-0.2.1.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

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

yflow-0.2.1-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file yflow-0.2.1.tar.gz.

File metadata

  • Download URL: yflow-0.2.1.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yflow-0.2.1.tar.gz
Algorithm Hash digest
SHA256 edcb202e35f5eb20064e0e802a23b7b1a563d8801d0884846d2f09f2a6c43eee
MD5 2398083263bd0fe1a5b9554189244ec8
BLAKE2b-256 c450a77f473b26de5aeb7b21761be005e7bfc695d56adedab6d66a229f84931d

See more details on using hashes here.

Provenance

The following attestation bundles were made for yflow-0.2.1.tar.gz:

Publisher: release.yml on alanpaul1969/yflow

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

File details

Details for the file yflow-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: yflow-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yflow-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da03a35268f7b5e252d850e0bc4547bc1db9589935c2d3c20f61ff4535ea47f9
MD5 e0ff580b6acff1c4b27600a1a7a4e2f6
BLAKE2b-256 f3e1e733c1843147f8ab3b8c58f628428950a8a27bf4afb7aec2fd13b7ade229

See more details on using hashes here.

Provenance

The following attestation bundles were made for yflow-0.2.1-py3-none-any.whl:

Publisher: release.yml on alanpaul1969/yflow

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