Skip to main content
Complete reference for all configuration options in agents.yaml and workflow.yaml files.

Quick Start

1

Load an agent from YAML

2

Run the YAML workflow

The user maintains YAML config; the agent loads it and executes the requested workflow.

How It Works

Both files are fully compatible! PraisonAI accepts both agents.yaml and workflow.yaml with the same features. The difference is primarily in naming conventions.

Quick Comparison


Field Name Mapping

PraisonAI accepts both old and new field names. Use canonical names for new projects.
A-I-G-S Mnemonic - Easy to remember:
  • Agents - Who does the work
  • Instructions - How they behave
  • Goal - What they achieve
  • Steps - What they do
The validator automatically normalises these aliases — agentsroles, topicinput, and streamstreaming 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-form agents, roles, and tasks into dict form on load — you don’t need to convert legacy configs by hand.
When a top-level 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 your agents.yaml before execution begins — unknown fields produce warnings and invalid configs abort immediately.
Configuration errors now fail fast. If any error is found (missing required field, bad cross-reference, unknown tool), the run aborts with a ValueError that lists every error at once — nothing runs with a broken config.Unknown-field warnings are still non-blocking: the unrecognised field is ignored and the workflow continues.
1

Create YAML with typo

2

Run workflow and see warning

Output (unknown field → warning, workflow still runs):
3

Validate before running

Catch all errors upfront without running the workflow.

Fail-Fast Errors

These conditions abort the run immediately with an aggregated error message. Missing required field:
Result:
Bad cross-reference (task references undefined agent):
Result:
Unknown tool:
Result:
Optional tools with extra dependencies produce a warning instead:

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 both agents: and roles: sections:

Unknown-Field Warnings

Unknown keys at the top level or in agent/role definitions produce warnings:
Warnings are non-blocking — the unrecognised field is ignored and the workflow continues. Only use --strict (or PRAISONAI_VALIDATE_STRICT=true) to promote them to errors.
Set your log level to WARNING or below (INFO, DEBUG) to see these messages. They are emitted via the standard praisonai logger.

Both Sections Covered

The validator inspects both agents: and roles: sections. The warning text changes from agent 'X' to role 'X' accordingly.

Strict Mode

Promote all warnings to errors globally:
Or per-command:
Start the workflow once and grep logs for Unknown field to catch all typos at once.
Instead of disabling warnings, fix the typo or add a comment explaining the custom field. The validator helps catch configuration mistakes.
If you intentionally use a non-standard key, the parser will not pass it through to the agent. Only recognized fields are used.

Root-Level Options

All options available at the root level of your YAML file.
Prevent token overflow errors with automatic context compaction.
Always enable context: true for workflows with search/crawl tools to prevent “context_length_exceeded” errors.
Configure automatic retry for failed tool calls with exponential backoff:
For detailed configuration options, see Tool Retry Policy.
Use variables in steps with {{variable_name}} syntax. Substitutions are applied in this order:For date/time/UUID placeholders ({{today}}, {{now}}, {{uuid}}), see Dynamic Variables — that is a separate mechanism.
Model-scoped runtime configuration. Requires framework: praisonai. See Runtime Selection.
Define custom models for model routing.
Callbacks are resolved from your tools.py file.

Agent Options

All options available for agent definitions.
Both 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).
If 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.
Configure agent handoff with nested options:
Use the agent: field to specify specialized agent types:

Step Options

All options available for step definitions.

Workflow Patterns

Advanced workflow patterns available in both agents.yaml and workflow.yaml.

Parallel

Execute multiple agents concurrently

Route

Classify and route to specialized agents

Loop

Iterate over a list of items

Repeat

Repeat until condition is met

Include

Include modular recipes

Loop Options

Repeat Options

Include Options


Feature Compatibility Matrix

What works where:
Full Feature Parity! Both file formats support all features. The only difference is naming conventions.
Framework LLM Configuration Parity: The 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

These limitations apply to both agents.yaml and workflow.yaml:

Migration Guide

From agents.yaml to workflow.yaml

1

Rename container

roles:agents:
2

Rename agent fields

backstory:instructions:
3

Extract tasks to steps

Move nested tasks: to top-level steps:
4

Rename step fields

description:action:
5

Update input reference

topic:input: (optional but recommended)

Validation

Validate your YAML configuration before running:
Output shows:
  • ✅ Valid configuration
  • ⚠️ Non-blocking warnings (unknown fields, optional tool deps)
  • ❌ Errors that would abort execution
Scan an entire directory:
See the Validate CLI page for all flags, JSON output format, and CI integration examples. praisonai workflow validate is the workflow-specific variant and remains available for backwards compatibility.

Best Practices

agents, instructions, action, steps, input
context: true for tool-heavy workflows
Always specify expected_output for clarity
Centralize reusable values in variables:
Run praisonai validate <file.yaml> to check for all schema errors, cross-reference problems, and unknown tool references before starting a workflow. Use praisonai validate schema to print all recognised fields and their types.

Set project-wide agent defaults in a config file.

Run and validate YAML configs from the command line.