Skip to main content
pflow is designed to be used by AI agents (Claude Code, Cursor, Windsurf) rather than directly by humans. You install it, configure it, and your AI agent uses it to build and run workflows.
Prerequisites: Python 3.10+ and uv or pipx

Install pflow

Verify installation:
pflow --version

Set up your API key

pflow uses an LLM for intelligent discovery - finding the right workflows and nodes without your agent needing to load everything into context. These features currently require an Anthropic API key.
pflow settings set-env ANTHROPIC_API_KEY "your-api-key"
pflow uses Simon Willison’s llm under the hood. If you already have llm installed and configured with Anthropic, pflow will use that key automatically.

What the API key is used for

This is pflow’s own API key, separate from whatever LLM your agent uses:
  • Discovery commands - pflow registry discover and pflow workflow discover use LLM to find relevant nodes and workflows
  • LLM nodes - workflows that include an LLM node for text processing
  • Smart filtering - automatic field selection for large API responses
Your agent creates workflows using its own LLM (Claude Code uses Claude, Cursor uses its models, etc.). pflow’s API key is only for pflow’s internal features.

When is it required?

The API key is strongly recommended if you’re using MCP servers. MCP servers expose many tools, and intelligent discovery is how pflow avoids loading all those tool schemas into your agent’s context. Without it, you lose the main benefit. For basic usage without MCP servers or testing pflow, the API key is optional.
The cost of pflow’s discovery features is minimal compared to running your agent directly. By finding only what’s needed, intelligent discovery significantly reduces your agent’s token usage, speeds up responses, and improves output quality.

Connect pflow to your AI agent

Your AI agent can use pflow in two ways:

Option 1: CLI access (easiest)

If your agent has terminal access (Claude Code, Cursor, Windsurf), instruct it to run:
pflow instructions usage
This gives the agent everything it needs to discover existing workflows, run them, or build new ones.

Option 2: MCP server

Add pflow to your AI tool’s MCP config (Claude Desktop, Cursor, etc.):
{
  "mcpServers": {
    "pflow": {
      "command": "pflow",
      "args": ["mcp", "serve"]
    }
  }
}
See AI tool integration for detailed setup instructions for each tool.

What your agent can do with pflow

Once connected, your agent can:
  • Discover workflows: pflow workflow discover "what I want to do"
  • Run workflows: pflow my-workflow param1=value1
  • List workflows: pflow workflow list
  • Discover nodes: pflow registry discover "capability I need"
  • Build new workflows: Following pflow instructions create

Next steps

Troubleshooting

Make sure the install location is in your PATH:
# For uv
echo $PATH | grep -q "$HOME/.local/bin" || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc

# For pipx
pipx ensurepath
Then restart your terminal.
pflow requires Python 3.10+. Check your version:
python --version
If you need to upgrade, use pyenv or your system package manager.