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

bash
pip install "praisonai[flow]"

Environment support

ItemStatus
Python 3.11 / 3.12 / 3.13Supported (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 / LinuxTypically < 2 minutes

Launch

bash
# Launches Langflow on http://localhost:7860 with PraisonAI components in the sidebar
praisonai flow

See 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:

InputDescription
NameAgent identifier
InstructionsSystem prompt for the agent
ModelLLM model (e.g., openai/gpt-4o-mini, anthropic/claude-3-5-sonnet-20241022)
ToolsConnected Langflow tools
MemoryEnable context retention
KnowledgeFiles/URLs for RAG
HandoffsOther agents for collaboration
GuardrailsOutput validation

Outputs:

  • Response – Agent response as Message
  • Agent – Agent instance for multi-agent workflows

PraisonAI Agents

Orchestrates multiple agents working together.

Process Types:

ProcessDescription
SequentialAgents execute in order
HierarchicalManager agent coordinates workers
WorkflowCustom 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, or workflow
  • Manager Agent – Explicit manager for hierarchical process (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

  1. Drag PraisonAI Agent onto the canvas
  2. Set instructions: “You are a helpful assistant”
  3. Connect Chat Input to the Agent’s Input
  4. Connect Agent’s Response to Chat Output
  5. Run the flow!

Multi-Agent Team

  1. Create 3 PraisonAI Agent components with different roles (e.g. Researcher, Analyst, Writer)
  2. Set each agent’s instructions describing what it should accomplish
  3. (Optional) Chain execution order by connecting the Agent output of each predecessor to the next agent’s Previous Agent input
  4. Create an Agent Team component
  5. Connect all three agents to the Agent Team’s Agents input
  6. Set Process to sequential (or hierarchical / workflow)
  7. Wire Chat Input → Agent Team Input, Agent Team Response → Chat Output
  8. Run the flow — tasks are generated automatically from each agent’s instructions

Model Format

PraisonAI uses provider/model-name format:

ProviderExamples
OpenAIopenai/gpt-4o-mini, openai/gpt-4o, openai/o1-mini
Anthropicanthropic/claude-3-5-sonnet-20241022, anthropic/claude-3-opus-20240229
Googlegoogle/gemini-1.5-pro, google/gemini-2.0-flash
DeepSeekdeepseek/deepseek-chat, deepseek/deepseek-reasoner
Groqgroq/llama-3.3-70b-versatile
Ollamaollama/llama3.2, ollama/mistral

Memory Options

OptionDescription
SimpleToggle memory on/off
Providerrag or mem0
ConfigFull 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.

python
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 anotherProcess = sequential
A manager delegates to workersProcess = hierarchical + optional Manager Agent
Custom routing with decision pointsProcess = 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:

  1. Create a second agent (e.g., “Expert Agent”)
  2. Connect it to the first agent’s Handoffs input
  3. The primary agent can now hand off conversations

Related