Pipecat Flows is an add-on framework for Pipecat that allows you to build structured conversations in your AI applications. It enables you to create both predefined conversation paths and dynamically generated flows while handling the complexities of state management and LLM interactions.
The framework consists of:
- A Python module for building conversation flows with Pipecat
- A visual editor for designing and exporting flow configurations
- Python 3.10 or higher
- Pipecat
-
Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
Need help? Refer to the uv install documentation.
-
Install the module
# For new projects uv init my-pipecat-flows-app cd my-pipecat-flows-app uv add pipecat-ai-flows # Or for existing projects uv add pipecat-ai-flows
Using pip? You can still use
pip install pipecat-ai-flows
to get set up.
See Quick Start README.
For more detailed examples and guides, visit our documentation.
The repository includes several complete example implementations demonstrating various features of Pipecat Flows.
- Static Flows: Pre-defined conversation paths including food ordering, movie exploration, patient intake, and travel planning
- Dynamic Flows: Runtime-generated flows including insurance quotes, restaurant reservations, and warm transfers
Each example is available in multiple LLM provider formats (OpenAI, Anthropic, Google Gemini, AWS Bedrock) to demonstrate cross-platform compatibility.
For detailed setup instructions, configuration, and running examples, see the Examples README.
Quick start:
# Install dependencies
uv sync
uv pip install "pipecat-ai[daily,openai,deepgram,cartesia,silero,examples]"
# Configure environment
cp env.example .env # Add your API keys
# Run an example
uv run python examples/static/food_ordering.py -u YOUR_DAILY_ROOM_URL
-
Clone the repository and navigate to it:
git clone https://github.com/pipecat-ai/pipecat-flows.git cd pipecat-flows
-
Install development dependencies:
uv sync --group dev
-
Install the git pre-commit hooks (these help ensure your code follows project rules):
uv run pre-commit install
The package is automatically installed in editable mode when you run
uv sync
.
The package includes a comprehensive test suite covering the core functionality.
- Install Dependencies:
uv sync --group dev uv add "pipecat-ai[google,aws,openai,anthropic]"
Run all tests:
uv run pytest tests/
Run specific test file:
uv run pytest tests/test_state.py
Run specific test:
uv run pytest tests/test_state.py -k test_initialization
Run with coverage report:
uv run pytest tests/ --cov=pipecat_flows
A visual editor for creating and managing Pipecat conversation flows.
- Visual flow creation and editing
- Import/export of flow configurations
- Support for node and edge functions
- Merge node support for complex flows
- Real-time validation
While the underlying system is flexible with node naming, the editor follows these conventions for clarity:
- Start Node: Named after your initial conversation state (e.g., "greeting", "welcome")
- End Node: Conventionally named "end" for clarity, though other names are supported
- Flow Nodes: Named to reflect their purpose in the conversation (e.g., "get_time", "confirm_order")
These conventions help maintain readable and maintainable flows while preserving technical flexibility.
The editor is available online at flows.pipecat.ai.
- Node.js (v14 or higher)
- npm (v6 or higher)
Clone the repository
git clone [email protected]:pipecat-ai/pipecat-flows.git
Navigate to project directory
cd pipecat-flows/editor
Install dependencies
npm install
Start development server
npm run dev
Open the page in your browser: http://localhost:5173.
- Create a new flow using the toolbar buttons
- Add nodes by right-clicking in the canvas
- Start nodes can have descriptive names (e.g., "greeting")
- End nodes are conventionally named "end"
- Connect nodes by dragging from outputs to inputs
- Edit node properties in the side panel
- Export your flow configuration using the toolbar
The editor/examples/
directory contains sample flow configurations:
food_ordering.json
movie_explorer.py
patient_intake.json
restaurant_reservation.json
travel_planner.json
To use an example:
- Open the editor
- Click "Import Flow"
- Select an example JSON file
See the examples directory for the complete files and documentation.
npm start
- Start production servernpm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production build locallynpm run preview:prod
- Preview production build with base pathnpm run lint
- Check for linting issuesnpm run lint:fix
- Fix linting issuesnpm run format
- Format code with Prettiernpm run format:check
- Check code formattingnpm run docs
- Generate documentationnpm run docs:serve
- Serve documentation locally
The Pipecat Flows Editor project uses JSDoc for documentation. To generate and view the documentation:
Generate documentation:
npm run docs
Serve documentation locally:
npm run docs:serve
View in browser by opening: http://localhost:8080
We welcome contributions from the community! Whether you're fixing bugs, improving documentation, or adding new features, here's how you can help:
- Found a bug? Open an issue
- Have a feature idea? Start a discussion
- Want to contribute code? Check our CONTRIBUTING.md guide
- Documentation improvements? Docs PRs are always welcome
Before submitting a pull request, please check existing issues and PRs to avoid duplicates.
We aim to review all contributions promptly and provide constructive feedback to help get your changes merged.