Langflow Integration
Use PraisonAI agents in Langflow visual workflows
Langflow Integration
Langflow is a visual authoring platform for AI agents and workflows. PraisonAI provides native Langflow components for building agent workflows visually.
Installation
pip install "praisonai[flow]"Environment support
| Item | Status |
|---|---|
| Python 3.11 / 3.12 / 3.13 | Supported (Py 3.13 fixed via PraisonAI#5103) |
| First-boot on Windows | ~5 minutes — Langflow builds its migrations/cache; second start < 60s |
| First-boot on macOS / Linux | Typically < 2 minutes |
Launch
# Launches Langflow on http://localhost:7860 with PraisonAI components in the sidebar
praisonai flowSee Flow CLI and Visual Workflow Builder for subcommands and component options.
Components
PraisonAI provides two components for Langflow:
PraisonAI Agent
Creates a single PraisonAI agent with full tool, memory, and knowledge support.
Key Inputs:
| Input | Description |
|---|---|
| Name | Agent identifier |
| Instructions | System prompt for the agent |
| Model | LLM model (e.g., openai/gpt-4o-mini, anthropic/claude-3-5-sonnet-20241022) |
| Tools | Connected Langflow tools |
| Memory | Enable context retention |
| Knowledge | Files/URLs for RAG |
| Handoffs | Other agents for collaboration |
| Guardrails | Output validation |
Outputs:
- Response – Agent response as Message
- Agent – Agent instance for multi-agent workflows
PraisonAI Agents
Orchestrates multiple agents working together.
Process Types:
| Process | Description |
|---|---|
| Sequential | Agents execute in order |
| Hierarchical | Manager agent coordinates workers |
| Workflow | Custom agent routing with decision points |
Key Inputs:
- Name – Team identifier (default
AgentTeam) - Agents – List of PraisonAI Agent components
- Input – Initial input to start the workflow
- Process –
sequential,hierarchical, orworkflow - Manager Agent – Explicit manager for
hierarchicalprocess (optional) - Manager LLM – LLM for auto-created manager (default
openai/gpt-4o) - Variables – Global substitution variables for task descriptions
- Shared Memory – Enable shared memory across all agents
- Guardrails – Team-level output validation
- Verbose – Detailed execution logs
- Full Output – Return results from every task
- Planning – Decompose complex tasks
- Reflection – Self-reflection for better results
- Caching – Cache agent responses
Quick Start
Single Agent
- Drag PraisonAI Agent onto the canvas
- Set instructions: “You are a helpful assistant”
- Connect Chat Input to the Agent’s Input
- Connect Agent’s Response to Chat Output
- Run the flow!
Multi-Agent Team
- Create 3 PraisonAI Agent components with different roles (e.g. Researcher, Analyst, Writer)
- Set each agent’s instructions describing what it should accomplish
- (Optional) Chain execution order by connecting the
Agentoutput of each predecessor to the next agent’sPrevious Agentinput - Create an Agent Team component
- Connect all three agents to the Agent Team’s
Agentsinput - Set
Processtosequential(orhierarchical/workflow) - Wire Chat Input → Agent Team
Input, Agent TeamResponse→ Chat Output - Run the flow — tasks are generated automatically from each agent’s instructions
Model Format
PraisonAI uses provider/model-name format:
| Provider | Examples |
|---|---|
| OpenAI | openai/gpt-4o-mini, openai/gpt-4o, openai/o1-mini |
| Anthropic | anthropic/claude-3-5-sonnet-20241022, anthropic/claude-3-opus-20240229 |
google/gemini-1.5-pro, google/gemini-2.0-flash | |
| DeepSeek | deepseek/deepseek-chat, deepseek/deepseek-reasoner |
| Groq | groq/llama-3.3-70b-versatile |
| Ollama | ollama/llama3.2, ollama/mistral |
Memory Options
| Option | Description |
|---|---|
| Simple | Toggle memory on/off |
| Provider | rag or mem0 |
| Config | Full MemoryConfig dictionary (advanced) |
Structured Output
The visual nodes do not expose a JSON schema input — configure structured output through the SDK by passing a Pydantic model to a Task.
from pydantic import BaseModel
from praisonaiagents import Agent, Task, PraisonAIAgents
class Review(BaseModel):
title: str
score: int
summary: str
approved: bool
agent = Agent(
name="Reviewer",
instructions="Review the submission and return a verdict",
)
task = Task(
description="Review the submission",
agent=agent,
output_pydantic=Review,
)
PraisonAIAgents(agents=[agent], tasks=[task]).start()Workflow Branching
The visual Task node (with Task Type: decision) was removed — branching is now expressed through the Agent Team’s Process and agent Handoffs:
| You want… | Set this |
|---|---|
| Agents execute one after another | Process = sequential |
| A manager delegates to workers | Process = hierarchical + optional Manager Agent |
| Custom routing with decision points | Process = workflow + agent Handoffs |
For routing based on an agent’s judgement, connect the deciding agent’s Handoffs input to the candidate downstream agents — the decider hands the conversation to the next agent at runtime.
Agent Collaboration
Use Handoffs for agent-to-agent collaboration:
- Create a second agent (e.g., “Expert Agent”)
- Connect it to the first agent’s Handoffs input
- The primary agent can now hand off conversations