Skip to main content
Your AI agent (Claude Code, Cursor, Windsurf) uses pflow to build and run workflows. You install it, configure an API key, and your agent handles the rest.
Prerequisites: Python 3.10+ and uv or pipx
1

Install pflow

Verify installation:
pflow --version
2

Set up your API key

pflow uses an LLM for discovery — finding the right workflows and nodes without your agent needing to load everything into context. You can use any provider supported by Simon Willison’s llm.
# OpenAI
pflow settings set-env OPENAI_API_KEY "sk-..."

# Or Anthropic
pflow settings set-env ANTHROPIC_API_KEY "sk-ant-..."

# Or Google
pflow settings set-env GEMINI_API_KEY "..."
pflow auto-detects your provider and selects a default model (Claude Sonnet 4.5 for Anthropic, Gemini 3 Flash for Google, GPT-5.2 for OpenAI).
If you already have llm installed and configured (llm keys set openai), pflow will use those keys automatically.
To use a different model than the auto-detected default:
pflow settings llm set-default claude-sonnet-4-5
See LLM model settings for all options.
This is pflow’s LLM configuration, 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 model configuration is only for pflow’s internal features.
Set up an LLM if you’re using MCP servers. MCP tool descriptions can consume a third of your agent’s context before any work starts — discovery is how pflow avoids that.For basic usage without MCP servers or testing pflow, the configuration is optional.
Discovery costs a fraction of what your agent spends per task. By loading only what’s relevant, it cuts token usage, speeds up responses, and keeps context focused.
3

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 serverAdd 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.