Skip to main content
pflow

pflow

License Python 3.10+ CI Docs

pflow helps your agent build workflows it can reuse. It composes pre-built nodes — LLM calls, shell commands, HTTP requests, MCP tools — into a .pflow.md file. Save it, and it becomes a command that runs the same process every time.

Saved workflows can be published as Skills with pflow skill save, making them available across Claude Code, Cursor, and other platforms.

pflow demo

What a workflow looks like

I use pflow for my own releases. This workflow analyzes git commits since the last tag, classifies each one with an LLM (70 concurrent calls), and generates a CHANGELOG.md entry, a Mintlify docs update, and a release context file. It runs in about a minute.

pflow generate-changelog since_tag=v0.5.0

The whole thing is a .pflow.md file — markdown that renders as documentation on GitHub and executes as a CLI command. Here are a few steps from the full workflow:

### get-latest-tag

Detect the most recent git tag to use as the changelog baseline.

- type: shell

```shell command
git describe --tags --abbrev=0 2>/dev/null || echo 'v0.0.0'
```

### resolve-tag

Pick the starting tag: either user-provided or auto-detected.

- type: code
- inputs:
    since_tag: ${since_tag}
    latest_tag: ${get-latest-tag.stdout}

```python code
since_tag: str
latest_tag: str

result: str = since_tag.strip() if since_tag.strip() else latest_tag.strip()
```

### analyze-commits

Classify each commit as user-facing or internal. Runs in parallel.

- type: llm

```yaml batch
items: ${get-commits-enriched.result}
parallel: true
max_concurrent: 70
```

### notify-slack

Post the release summary to Slack.

- type: mcp-composio-slack-SLACK_SEND_MESSAGE
- channel: ${slack_channel}
- markdown_text: ${create-summary.result}

Data flows between steps through template variables — ${get-latest-tag.stdout} feeds one step's output into the next.

Four node types in one workflow: a shell command, inline Python, 70 parallel LLM calls, and a Slack message via MCP in three lines.

More examples: release announcements, vision scraper

Once saved, this runs the same way every time — same steps, same order, same data flow between them.

How your agent uses pflow

pflow has 8 node types: shell, code (Python), http, file operations, llm calls, mcp tools, and an agent node that delegates repository work to Claude or Codex.

Before anything runs, validation catches errors — wrong template references, missing inputs, type mismatches. Your agent handles the whole lifecycle:

# Check if a workflow already exists
pflow find "generate changelog from git history"

# Nothing fits — get a step-by-step creation guide
pflow guide

# Find building blocks for the workflow
pflow mcp find "analyze git commits, classify with llm, post to slack"

# Build, run, iterate (validation runs automatically)
pflow workflow.pflow.md since_tag=v0.5.0

# Save to your library
pflow save ./workflow.pflow.md --name generate-changelog

# Publish frequently-used workflows as Skills
pflow skill save generate-changelog

Workflows can call other workflows — the changelog you build today becomes a building block for a release workflow tomorrow.

# JSON output works with standard tools
pflow --output-format json generate-changelog \
  | jq -r '.result.version' | xargs git tag

# Chain workflows together
pflow -p generate-changelog | pflow -p release-announcements

# Schedule workflows like any command
0 9 * * MON pflow generate-changelog

Built for agents

When something goes wrong, pflow tells the agent what to do:

✗ Static validation failed:
  • Node 'fetch-data' (type: http) does not output 'email'

Available outputs from 'fetch-data':
  ✓ ${fetch-data.response} (dict|str)
  ✓ ${fetch-data.status_code} (int)
  ✓ ${fetch-data.response_headers} (dict)
  ✓ ${fetch-data.response_time} (float)
  ✓ ${fetch-data.error} (str)

Tip: Try using ${fetch-data.response} instead

The agent sees what went wrong, sees every available output with its type, and gets a suggested fix. No stack traces, no guessing. (source)

I develop pflow by having agents build workflows and identifying where they get stuck. These error messages are a direct result.

pflow is CLI-first because agents in Claude Code, Cursor, and similar tools always have bash. No MCP configuration needed — just run commands. (MCP server mode is available too if you need it.)

Honest scope

pflow is for workflows where you know the steps — tasks your agent figured out once and you want to capture. If you're exploring or need your agent to adapt on the fly, let it. pflow captures the path after you've found it.

Getting started

Requires Python 3.10+ on macOS, Linux, or Windows. On Windows, shell steps run through Git Bash — install Git for Windows (workflows use one POSIX shell dialect on every platform, so they stay portable). See the quickstart for API key setup and detailed configuration.

# Recommended
uv tool install pflow-cli

# Or with pipx
pipx install pflow-cli

# Or with pip
pip install pflow-cli

# Verify
pflow --version

Tell your agent to run pflow guide — it gets everything it needs to discover, run, and build workflows.

Or configure pflow as an MCP server for environments without terminal access:

{
  "mcpServers": {
    "pflow": {
      "command": "pflow",
      "args": ["mcp", "serve"]
    }
  }
}

Full documentation at docs.pflow.run.

I want your feedback

I've been building pflow since mid-2025. The thesis I'm testing: agents are more effective when they can compose known building blocks into reusable workflows, rather than writing code from scratch each time.

I might be wrong. Try it and tell me:

  • Is the .pflow.md format helpful, or would you rather just read/write Python?
  • After trying it — would you rather just let your agent handle the whole task from scratch each time? Write scripts? Use some other framework?
  • What's the first workflow you'd build?

Open a discussion or file an issue.

Or get started → Get started

License

Functional Source License (FSL-1.1-ALv2) — free for all use except offering pflow as a competing cloud hosted service. Becomes Apache-2.0 after 2 years.

Metadata

Release files for pflow-cli 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pflow-cli 0.16.0
File Size Uploaded Provenance Actions
pflow_cli-0.16.0.tar.gz 3.1 MB Without provenance Details for pflow_cli-0.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pflow-cli 0.16.0
File Interpreter ABI Platform Actions
pflow_cli-0.16.0-py3-none-any.whl Python 3 none any Details for pflow_cli-0.16.0-py3-none-any.whl

Total release size: 5.7 MB

Release files / pflow_cli-0.16.0.tar.gz

Download URL pflow_cli-0.16.0.tar.gz
Size 3.1 MB
Tags Source
SHA-256 checksum
How to use checksums
eb97534dbf0f1a0ed4d8cbcb93cd88963893ab91182ce9e61e72c2ecf77c011c
BLAKE2b-256 checksum
How to use checksums
5792a8a7dcede2b5682e7bfa39ad40454df393bec60d57c4b2f5361d961293a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Release files / pflow_cli-0.16.0-py3-none-any.whl

Download URL pflow_cli-0.16.0-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e95bd3d3df28dba8e0c3c6b72fb8ebc9f871c7b12694c574b0ee0b8efa48d9f5
BLAKE2b-256 checksum
How to use checksums
d4dde89b0b6ddfa65f68f5505c0fb3a44c4bff643d8782c62593be1ad6e4ac35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Security for pflow-cli 0.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page