agents.yaml with no prompts, then report usage, write files, and exit with a code your CI can trust.
Quick Start
1
Create agents.yaml
2
Run it
out/risk_report.md and a per-agent usage table.Flags
Three flags make a YAML run suitable for scripts.
Equivalent approval switches for other entry points:
praisonai run --approval bypass, --autonomy full_auto, or PRAISONAI_AUTO_APPROVE=true. There is no --no-approve flag; use --trust.
Per-Agent Metrics
--metrics prints one row per agent, a TOTAL row, and the model name.
--metrics-json prints JSON to stdout only. It takes no path; redirect to save a file.
Task output_file
framework: praisonai writes a taskβs result to output_file and creates missing parent folders.
flat.md writes to the working directory. See Save Output for every output option.
Exit Codes
Failed runs exit non-zero so CI can detect them.
Stale files from a previous run do not count as written. Tasks that never ran (skipped workflow branches) are not counted as missing files.
With
--output stream-json, a failed run emits run.error instead of a successful run.result.Sandbox Environment Variables
Set these to run inside a locked-down container with one OpenAI-compatible endpoint and no outbound access.Full Example
Common Pitfalls
Best Practices
Always pass --trust in CI
Always pass --trust in CI
Without it, tool approvals wait for a human and the run hangs.
--trust also turns on the output_file write check.Check the exit code, not the output
Check the exit code, not the output
A failed task prints its status, but only the exit code is reliable for scripts.
Use --metrics-json for budgets
Use --metrics-json for budgets
Parse
total.total_tokens from the JSON to fail builds that exceed a token budget.Use a placeholder key for mock endpoints
Use a placeholder key for mock endpoints
Pin
OPENAI_BASE_URL and OPENAI_MODEL_NAME so runs stay on your sandbox endpoint.Related
Metrics CLI
Token and cost reporting
Save Output
Write results to files
Tool Approval
Control tool execution
YAML Configuration Reference
All YAML fields

