Skip to main content
LangGraph integration lets you run LangGraph state graphs through PraisonAI’s YAML configuration and CLI — no adapter code required.
Need a framework that isn’t listed here? See Framework Adapter Plugins to register your own via Python entry points.

Quick Start

1

Install

Both extras are required for end-to-end use:
2

Create agents.yaml

3

Run

You must either pass --framework langgraph on the CLI or set framework: langgraph in your YAML. If neither is set, PraisonAI uses its default framework.

How LangGraph Works


YAML Format for LangGraph

LangGraph requires the roles format (not the steps workflow format):
context: [research] creates a LangGraph edge from the research task node to the summarise task node — same semantic as in CrewAI. The output of research is injected into the summarise task’s prompt automatically.

Direct Adapter Use

Advanced — most users should use the CLI / YAML flow above. Call the adapter directly without the CLI or YAML loader:

Verify Installation

Use praisonai doctor to confirm LangGraph is detected:
Probe programmatically via _framework_availability:

Pip Extras Reference

Both extras are needed. Installing only praisonai[langgraph] makes is_available("langgraph") return True and the doctor pass, but --framework langgraph will fail at adapter dispatch because no adapter is registered under that name yet. This mirrors the AutoGen v0.4 “package vs adapter” distinction described in Framework Availability.

Troubleshooting

framework='langgraph' is not a valid choice — Pre-#2415 PraisonAI versions hardcode choices=["praisonai","crewai","autogen"]. Upgrade to a version that includes dynamic registry-driven CLI choices, or omit --framework and rely on framework: langgraph in your YAML instead. Framework 'langgraph' was requested but is not installed — Install the extras listed above. The CLI emits an install hint from get_install_hint("langgraph") pointing to praisonai-frameworks[langgraph]. tool_retry_policy validation error on praisonai.run() — Fixed in PraisonAI #2495 by normalising the RetryPolicy object into a dict before agent-config merge. If you are on a version before #2495, pass tool_retry_policy as a plain dict:

Best Practices

Choose LangGraph when you need explicit state graph control, conditional branching between tasks, or when your team already uses LangChain/LangGraph tooling. For simpler sequential workflows, PraisonAI native or CrewAI have lower overhead. For conversational multi-agent setups, AutoGen v0.2 is the more mature option today.
The context: field in task definitions maps directly to LangGraph edges. A task with context: [task_a, task_b] receives both task outputs as input context. Model your data dependencies as context lists rather than hard-coding them in task descriptions.
LangGraph via PraisonAI requires the roles: YAML format. The newer steps: + agents: workflow format is only supported by the native praisonai framework. If you migrate an existing steps: workflow to LangGraph, convert each step into a task under a role.
The adapter wraps its result in ### LangGraph Output ###\n.... Downstream parsers and log scrapers can split on this sentinel to extract the LangGraph result separately from PraisonAI’s own output lines.

CrewAI

CrewAI framework integration

AutoGen

AutoGen framework integration

PraisonAI Agents

PraisonAI native agents framework

Framework Availability

Probe API for detecting installed frameworks

Framework Adapter Plugins

Register custom framework adapters via entry points