> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pflow.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome to pflow

> Your agent plans once, pflow handles the rest

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

```bash theme={null}
# 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 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

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Install pflow and connect your AI tool
  </Card>

  <Card title="Integrations" icon="plug" href="/integrations/overview">
    Set up Claude Code, Cursor, VS Code, and more
  </Card>

  <Card title="Adding MCP servers" icon="server" href="/guides/adding-mcp-servers">
    Expand pflow with external tools
  </Card>

  <Card title="CLI reference" icon="terminal" href="/reference/cli/index">
    All commands documented
  </Card>
</CardGroup>
