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 theroles 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
Usepraisonai doctor to confirm LangGraph is detected:
_framework_availability:
Pip Extras Reference
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
When to choose LangGraph over other frameworks
When to choose LangGraph over other frameworks
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.
Use context: to express a graph
Use context: to express a graph
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.Keep the roles format, not steps
Keep the roles format, not steps
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.Parse the LangGraph Output sentinel
Parse the LangGraph Output sentinel
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.Related
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

