agents.yaml and workflow.yaml files.
Quick Start
Load an agent from YAML
Run the YAML workflow
How It Works
agents.yaml and workflow.yaml with the same features. The difference is primarily in naming conventions.Quick Comparison
- agents.yaml Style
- workflow.yaml Style (Canonical)
Field Name Mapping
PraisonAI accepts both old and new field names. Use canonical names for new projects.agents↔roles, topic↔input, and stream↔streaming are all accepted and converted to their canonical form. You can mix old and new names freely.instructions is normalised to backstory at two points: once at YAML load (_normalize_yaml_config) and once at schema validation — so downstream code that reads backstory works correctly regardless of which input shape you use.List vs. Dict Shape
PraisonAI auto-normalises list-formagents, roles, and tasks into dict form on load — you don’t need to convert legacy configs by hand.
- List form (e.g. imported from CrewAI-style YAML)
- Dict form (canonical — recommended for new projects)
tasks: list is normalised, each task is attached to its named agent’s tasks: map. A task whose agent: key doesn’t match any defined agent is logged as a warning and skipped — the run continues rather than crashing.Automatic Field Validation
PraisonAI validates every field name in youragents.yaml before execution begins — unknown fields produce warnings and invalid configs abort immediately.
Create YAML with typo
Run workflow and see warning
Validate before running
Fail-Fast Errors
These conditions abort the run immediately with an aggregated error message. Missing required field:Required Agent Fields
role, goal, and backstory are schema-enforced required fields for every agent. Omitting any of them aborts the run with a ValueError.Recognized Fields
All recognized field names for agents in bothagents: and roles: sections:
Unknown-Field Warnings
Unknown keys at the top level or in agent/role definitions produce warnings:--strict (or PRAISONAI_VALIDATE_STRICT=true) to promote them to errors.
Both Sections Covered
The validator inspects bothagents: and roles: sections. The warning text changes from agent 'X' to role 'X' accordingly.
Strict Mode
Promote all warnings to errors globally:Run once after editing YAML
Run once after editing YAML
Unknown field to catch all typos at once.Don't disable the warning
Don't disable the warning
Custom fields are ignored, not preserved
Custom fields are ignored, not preserved
Root-Level Options
All options available at the root level of your YAML file.Workflow Metadata
Workflow Metadata
Workflow Settings
Workflow Settings
Context Management
Context Management
Tool Retry Policy
Tool Retry Policy
Variables
Variables
{{variable_name}} syntax. Substitutions are applied in this order:{{today}}, {{now}}, {{uuid}}), see Dynamic Variables — that is a separate mechanism.Runtime Selection
Runtime Selection
Custom Models
Custom Models
Callbacks
Callbacks
tools.py file.Agent Options
All options available for agent definitions.Core Fields
Core Fields
LLM Configuration
LLM Configuration
llm and function_calling_llm accept a model name as a string, or a dict when you also need to override base_url / api_key. Both shapes work identically across every supported framework (praisonai, crewai, autogen, autogen_v4, langgraph, openai_agents, google_adk).- String form (simplest)
- Dict form (when overriding endpoint / key)
llm is omitted, PraisonAI falls back to the MODEL_NAME environment variable, then to openai/gpt-4o-mini. This fallback is shared by every framework adapter.Rate Limiting & Execution
Rate Limiting & Execution
Advanced Features
Advanced Features
Handoff Configuration
Handoff Configuration
Specialized Agent Types
Specialized Agent Types
agent: field to specify specialized agent types:Step Options
All options available for step definitions.Basic Step Fields
Basic Step Fields
Output Options
Output Options
Context & Dependencies
Context & Dependencies
Execution Control
Execution Control
Workflow Patterns
Advanced workflow patterns available in bothagents.yaml and workflow.yaml.
Parallel
Route
Loop
Repeat
Include
- Parallel
- Route
- Loop
- Multi-Step Loop
- Repeat
- Include
Loop Options
Repeat Options
Include Options
Feature Compatibility Matrix
What works where:llm and function_calling_llm configuration shapes (string and dict forms) work identically across all supported frameworks (praisonai, crewai, autogen, autogen_v4, langgraph, openai_agents, google_adk). You can switch between frameworks without changing your LLM configuration syntax.What’s NOT Possible
Migration Guide
From agents.yaml to workflow.yaml
Rename container
roles: → agents:Rename agent fields
backstory: → instructions:Extract tasks to steps
tasks: to top-level steps:Rename step fields
description: → action:Update input reference
topic: → input: (optional but recommended)Validation
Validate your YAML configuration before running:- ✅ Valid configuration
- ⚠️ Non-blocking warnings (unknown fields, optional tool deps)
- ❌ Errors that would abort execution
praisonai workflow validate is the workflow-specific variant and remains available for backwards compatibility.
Best Practices
Use Canonical Names
Use Canonical Names
agents, instructions, action, steps, inputEnable Context Management
Enable Context Management
context: true for tool-heavy workflowsDefine Expected Output
Define Expected Output
expected_output for clarityUse Variables
Use Variables
variables:
