The train command group covers LLM fine-tuning and iterative agent training.
Usage
Every praisonai train <sub> also runs as praisonai-train <sub> when praisonai-train is installed on its own.
Requirements
Pick the install that matches what you want to train.
| Command | Gets you | When to use |
|---|
pip install praisonai-train | Agent training via agents/list/show/apply, no ML deps | Fastest way to try LLM-as-Judge / human-feedback agent training |
pip install "praisonai-train[llm]" | Above + Unsloth/torch stack for llm | Fine-tuning a base model |
pip install praisonai | Full stack: praisonai train ... routes through the code tier | Standard PraisonAI install |
pip install "praisonai[train]" | Now equivalent to praisonai + praisonai-train[llm] | Full stack plus fine-tuning deps |
pip install "praisonai[train]" previously installed nothing (empty extra). It now pulls praisonai-train[llm], so it installs the Unsloth stack.
praisonai train llm
Fine-tune an LLM using Unsloth.
Options
| Option | Short | Description | Default |
|---|
--model | -m | Base model to fine-tune | - |
--verbose | -v | Verbose output | false |
Examples
praisonai train agents
Train agents through iterative feedback loops.
Options
| Option | Short | Description | Default |
|---|
--iterations | -n | Number of training iterations | 3 |
--human | -h | Use human feedback instead of LLM grading | false |
--scenarios | -s | Path to scenarios JSON file | - |
--input | -i | Single input text for training | - |
--expected | -e | Expected output for the input | - |
--output | -o | Output directory for training data | - |
--model | -m | LLM model for grading | gpt-4o-mini |
--verbose / --quiet | -v / -q | Show detailed progress | --verbose |
--dry-run | - | Show what would happen without running | false |
--storage-backend | - | Storage backend: file, sqlite, or redis://url | file |
--storage-path | - | Path for storage backend | - |
Examples
Storage Backend Options
Store training data in different backends.
praisonai train list
List all training sessions.
Options
| Option | Short | Description | Default |
|---|
--limit | -n | Max sessions to show | 20 |
--json | -j | Output as JSON | false |
Examples
Each row shows the session ID, iteration count, size, and last-modified time.
praisonai train show
Show details of a training session, including its iterations and best score.
Options
| Option | Short | Description | Default |
|---|
--iterations | -i | Show detailed iteration info | false |
--json | -j | Output as JSON | false |
Examples
The summary highlights the best iteration (★) with its score and feedback.
praisonai train apply
Apply learned suggestions from a session to an agent via hooks. Uses the best-scoring iteration by default.
Options
| Option | Short | Description | Default |
|---|
--agent | -a | Path to agent YAML file | - |
--iteration | -n | Specific iteration number | best score |
--run | -r | Run agent with this prompt after applying | - |
--json | -j | Output as JSON | false |
Examples
Standalone script
Install praisonai-train on its own to get a praisonai-train console script that exposes the same subcommands directly.
Every praisonai train <sub> example above runs as-is with the praisonai-train <sub> prefix.
See Also