praisonai validate checks your YAML files against the full schema and reports every error at once.
Quick Start
Subcommands
| Command | Purpose |
|---|---|
praisonai validate <file> | Validate a single YAML file |
praisonai validate check [directory] | Validate every YAML file in a directory |
praisonai validate schema | Print the YAML config schema (fields, types, required markers) |
Flags
praisonai validate <file>
| Flag | Type | Default | Description |
|---|---|---|---|
file (positional) | str | — | Path to YAML config to validate |
--strict | bool | False | Treat warnings as errors |
--quiet / -q | bool | False | Only show errors, suppress success messages |
--json | bool | False | Emit results as JSON (for CI) |
praisonai validate check [directory]
| Flag | Type | Default | Description |
|---|---|---|---|
directory (positional) | str | "." | Directory to search for YAML files |
--pattern / -p | str | "*.yaml" | Glob pattern (also auto-includes *.yml when using the default) |
--strict | bool | False | Treat warnings as errors |
--stop-on-error | bool | False | Stop on the first invalid file |
praisonai validate schema
Prints all main config sections with field names, types, and required markers — no extra flags.
What Gets Validated
1. Schema Validation
Enforces the Pydantic schema. Every agent must haverole, goal, and backstory — these are required. Every task must have description and agent (matching ^[a-zA-Z0-9_-]+$).
When process: workflow, the config must also include steps or workflow.
2. Cross-Reference Validation
- Every
tasks[i].agentmust name an agent defined underroles/agents - Workflow step
agentfields are validated recursively (through nestedstepsandroutes) - Every
handoff.totarget must resolve to a known role
3. Tool Validation
Tool names are resolved throughToolResolver:
- Unknown tool → error: “Unknown tool ‘X’. Ensure it’s properly installed or defined in your configuration.”
- Known optional tool (e.g.
PostgreSQLTool,SlackTool,AWSTool,BrowserTool,PandasTool,KubernetesTool) → warning: “Tool ‘X’ requires additional dependencies. Install with: pip install ‘praisonai[tools]’ …“
4. Unknown Fields
Top-level unknown keys and unknown agent/role fields produce warnings, not errors: “Unknown agent field ‘X’. This field will be ignored.”Unknown-field warnings are non-blocking — your workflow still runs. Only errors (missing required fields, bad cross-references, unknown tools) cause a hard failure.
Output Formats
- Plain (Rich)
- Quiet (-q)
- JSON (--json)
- Directory Scan
Default output uses Rich formatting for easy reading in the terminal:
CI Integration
Add validation to your GitHub Actions workflow to block merges on broken configs:1 on any validation failure causes the step to fail.
Strict Mode
Strict mode promotes warnings to errors — useful in CI to keep configs clean. Enable per-command:PRAISONAI_VALIDATE_STRICT=true, all validation runs (including the automatic pre-run check in agents_generator.py) use strict mode.
Exit Codes
| Code | Meaning |
|---|---|
0 | File is valid (or all files in directory are valid) |
1 | One or more errors found, or the file does not exist |
Backward-Compatible Aliases
The validator automatically normalises these field aliases — you can use either form:| Alias | Canonical |
|---|---|
agents: | roles: |
topic: | input: |
stream: | streaming: |
Fail-Fast Runtime Validation
When you runpraisonai start agents.yaml, validation now runs automatically before execution. If any errors are found, the run aborts with an aggregated ValueError:
Best Practices
Run validate before every commit
Run validate before every commit
Add
praisonai validate agents.yaml to your pre-commit checks or CI pipeline to catch errors early.Use --json in automated pipelines
Use --json in automated pipelines
JSON output is easy to parse in scripts or CI steps that need to inspect specific error messages programmatically.
Set PRAISONAI_VALIDATE_STRICT=true in production
Set PRAISONAI_VALIDATE_STRICT=true in production
Strict mode treats warnings as errors, preventing unknown or misspelled fields from silently being ignored in production environments.
Use validate schema to discover required fields
Use validate schema to discover required fields
Run
praisonai validate schema to see all fields, their types, and which are required — before writing a new config from scratch.Related
YAML Configuration Reference
Complete field reference for agents.yaml and workflow.yaml
CLI Reference
All available CLI commands
Doctor
Diagnose environment and dependency issues
Workflow CLI
Run and manage YAML workflows from the terminal

