CLI Module
The CLI module provides the mainPraisonAI class for running agents from YAML configurations and command-line.
Installation
PraisonAI Class
Main entry point for running PraisonAI agents.Constructor
| Parameter | Type | Default | Description |
|---|---|---|---|
agent_file | str | "agents.yaml" | Path to YAML agent definition |
framework | str | "praisonaiagents" | Framework: praisonaiagents, crewai, autogen |
auto | bool | False | Enable auto mode for agent generation |
agent_yaml | str | None | YAML content as string (alternative to file) |
tools | list | None | List of tools to make available |
Methods
run()
Execute the agents defined in the configuration.main()
CLI entry point method.CLI Usage
CLI Flags
| Flag | Description |
|---|---|
--agent-file | Path to YAML agent definition |
--framework | Framework to use |
--auto | Enable auto mode with prompt |
--chat | Interactive chat mode |
--code | Code agent mode |
--ui | Launch web UI |
--deploy | Deploy as API |
YAML Configuration
Programmatic Usage
With Tools
With YAML String
See Also
- Auto Module - Automated agent generation
- Deploy Module - Deployment utilities
- CLI Documentation - Full CLI reference

