Skip to main content
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.
CommandGets youWhen to use
pip install praisonai-trainAgent training via agents/list/show/apply, no ML depsFastest way to try LLM-as-Judge / human-feedback agent training
pip install "praisonai-train[llm]"Above + Unsloth/torch stack for llmFine-tuning a base model
pip install praisonaiFull stack: praisonai train ... routes through the code tierStandard 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

OptionShortDescriptionDefault
--model-mBase model to fine-tune-
--verbose-vVerbose outputfalse

Examples


praisonai train agents

Train agents through iterative feedback loops.

Options

OptionShortDescriptionDefault
--iterations-nNumber of training iterations3
--human-hUse human feedback instead of LLM gradingfalse
--scenarios-sPath to scenarios JSON file-
--input-iSingle input text for training-
--expected-eExpected output for the input-
--output-oOutput directory for training data-
--model-mLLM model for gradinggpt-4o-mini
--verbose / --quiet-v / -qShow detailed progress--verbose
--dry-run-Show what would happen without runningfalse
--storage-backend-Storage backend: file, sqlite, or redis://urlfile
--storage-path-Path for storage backend-

Examples

Storage Backend Options

Store training data in different backends.

praisonai train list

List all training sessions.

Options

OptionShortDescriptionDefault
--limit-nMax sessions to show20
--json-jOutput as JSONfalse

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

OptionShortDescriptionDefault
--iterations-iShow detailed iteration infofalse
--json-jOutput as JSONfalse

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

OptionShortDescriptionDefault
--agent-aPath to agent YAML file-
--iteration-nSpecific iteration numberbest score
--run-rRun agent with this prompt after applying-
--json-jOutput as JSONfalse

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