Skip to main content

Langflow Integration

Langflow is a visual authoring platform for AI agents and workflows. PraisonAI provides native Langflow components for building agent workflows visually.
This integration is available via a Pull Request to the Langflow repository. Once merged, PraisonAI components will be available natively in Langflow.

Installation

# Install Langflow with PraisonAI support
pip install langflow praisonaiagents

Components

PraisonAI provides three 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:
  • Agents - List of PraisonAI Agent components
  • Tasks - List of PraisonAI Task components
  • Process - Orchestration mode
  • Variables - Global substitution variables
  • Guardrails - Team-level validation

PraisonAI Task

Defines a task for multi-agent workflows with structured output support. Key Inputs:
InputDescription
DescriptionWhat the task should accomplish
Expected OutputDesired output format
Output JSONJSON schema for structured output
Task Typetask, decision, or loop
ConditionBranching conditions for workflow
GuardrailTask-specific validation

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

ChatInput → PraisonAI Agents → ChatOutput

    ┌─────────┼─────────┐
    │         │         │
Researcher  Analyst   Writer
  Agent      Agent     Agent
  1. Create 3 PraisonAI Agent components with different roles
  2. Create a PraisonAI Agents component
  3. Connect all agents to the Agents component
  4. Set process to “sequential”
  5. Connect input/output

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

Define JSON schemas for structured responses:
{
  "title": "string",
  "score": "int",
  "summary": "string",
  "approved": "bool"
}
The agent will return data matching this schema.

Workflow Branching

Use decision tasks for conditional flows:
  1. Set Task Type to decision
  2. Define Condition:
{
  "approved": ["process_task"],
  "rejected": ["review_task"]
}
  1. The agent’s decision determines which task runs next

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