Skip to main content
Duplicate agent names or a typo in task.agent used to collapse your YAML silently — a 3-agent config could run as 1. Now you get a warning by default, and an exception under PRAISONAI_VALIDATE_STRICT=true.

Why this exists

Before this validation existed, a YAML with a duplicate name: researcher on two agents ran as one agent — the second silently overwrote the first via a dict-merge collapse. A task typo like agent: reseacher (missing an r) skipped the task with no message. Both problems look like a broken run with no clear cause. PRAISONAI_VALIDATE_STRICT=true turns those silent collapses into loud failures. In CI, prefer strict. In development, the default warning gives you the same hint without stopping the session.
Backward compatible. The default stays non-strict — validation issues warn, they don’t raise. Set PRAISONAI_VALIDATE_STRICT=true to make them raise ValueError instead.

Quick Start

1

Default (warn)

A duplicate name: no longer overwrites the first agent — both are kept under suffixed keys and you get a warning.
Both entries survive; the colliding one is preserved under researcher__dup_1 (0-based list index).
2

Strict (CI)

Turn the warning into a hard failure so CI catches the config before an agent starts.
3

Unknown task agent

A task whose agent: doesn’t match any defined agent warns by default, raises under strict.
Under PRAISONAI_VALIDATE_STRICT=true:

How It Works

When both roles: and agents: are present, roles: wins for task→agent resolution.

Choosing a mode


Configuration

PRAISONAI_VALIDATE_STRICT controls whether validation issues warn or raise.
Only the literal string "true" (case-insensitive) enables strict mode. PRAISONAI_VALIDATE_STRICT=1, =yes, and =on are treated as non-strict — the check is os.getenv("PRAISONAI_VALIDATE_STRICT", "false").lower() == "true". Set it to true, not 1, or nothing will change.

Duplicate-preserved key naming

Under the default (warn) mode, colliding entries are kept — not dropped. The duplicate is stored under a suffixed key so both survive:
i is the 0-based list index of the colliding entry. A second agent named researcher at list index 1 becomes researcher__dup_1.

Grep-friendly messages

Copy these into your CI log filters:
Under PRAISONAI_VALIDATE_STRICT=true the same conditions raise:

Best Practices

Set PRAISONAI_VALIDATE_STRICT=true in your CI environment so a duplicate name or a task typo fails the pipeline instead of silently degrading a run. Keep the default (warn) locally so quick experiments aren’t blocked.
This variable only recognises the literal string "true" (case-insensitive). PRAISONAI_VALIDATE_STRICT=1 looks enabled but behaves as non-strict. Always use =true.
The __dup_i suffix keeps both entries so nothing is silently lost, but a name collision is almost always a mistake. Rename the second agent to silence the warning and make the config unambiguous.
An unknown agent: on a task means that task never runs. Match the agent: value exactly to a defined agent name — under strict mode the run stops until you do.

Tool Timeouts

The other silent-collapse fix: per-agent tool_timeout now uses the tightest value

Workflow Validation Loop

Validate inputs and outputs with retry feedback

YAML Configuration Reference

Every field for agents, tasks, and workflows

Skill Manage

Nested skill file paths and the path safety prefilter