Skip to main content
pflow is a workflow compiler for AI agents. Your agent reasons through a task once, pflow compiles it into a workflow, and that workflow runs instantly forever after — no repeated workflow generation, no repeated costs. Like shell scripts, but for AI operations.

The problem

AI agents re-reason through every task from scratch, even ones they’ve solved before:
  • Inconsistency: Agents take different paths or skip steps between runs — there’s no way to verify without watching
  • Cost: Each reasoning pass costs tokens — the same tokens, for the same logic, every time
  • Context bloat: Loading tool schemas (especially MCP servers) consumes tokens before any work begins

How pflow helps

pflow separates workflow authoring from execution:
  1. Your agent designs the workflow once - figures out what nodes to use and how to connect them
  2. pflow compiles the workflow - saves it as a reusable .pflow.md file
  3. Execution is instant - run the same workflow with different inputs, zero reasoning cost
Nodes are individual tools (call an LLM or API, read a file, or any MCP tool). Workflows chain them together. Save a workflow and your agent can discover it later, reuse it with different inputs, or chain it into a larger workflow.

Built for agents

The workflow format is markdown — headings, YAML, and code blocks. Agents already think in this structure, so they can write and iterate on workflows using patterns they already know. A side effect: open a .pflow.md file on GitHub and it reads like documentation. Render it in your IDE and it’s self-explanatory. The same file that executes as a workflow also serves as its own docs.

From idea to command

# Your agent builds and iterates on a .pflow.md workflow file
claude "Can you help me make a release workflow? Let's use pflow"

# You or your agent save it for easy reuse
pflow workflow save ./workflow.pflow.md --name generate-changelog

# Anyone can run it
pflow generate-changelog since_tag=v0.7.0

# Next time, your agent already knows how
claude "Generate a changelog for the next release"

Get started

Quickstart

Install pflow and connect your AI tool

Integrations

Set up Claude Code, Cursor, VS Code, and more

Adding MCP servers

Expand pflow with external tools

CLI reference

All commands documented