Skip to main content
Agent Train enables active improvement of agent behavior through iterative feedback loops. Unlike Agent Learn which captures patterns passively, training uses explicit human or LLM feedback to refine responses.

Quick Start

1

Simple CLI Training

Train an agent with a single input:
2

Human-in-the-Loop

Get human feedback instead of automated grading:
3

Multiple Iterations

Run multiple training iterations:

How It Works

Detailed Control Flow


SDK Usage


Applying Training at Runtime

After training, apply the learned improvements to your agent using apply_training():

Select Specific Iteration

Inspect Before Applying

Remove Training

Training is applied via hooks - it doesn’t modify the agent permanently. You can remove it anytime.

CLI Commands

Train Agents

List Sessions

Show Session Details

The --iterations flag shows detailed suggestions for each iteration.

Apply Training

Example:

Grading Modes

Automated grading using an LLM to evaluate responses:
The LLM grades based on:
  • Relevance to input
  • Accuracy of information
  • Clarity and completeness
  • Match to expected output (if provided)

Storage Backends

Training data persists across sessions:
Training data is stored as JSON (not pickle), making it:
  • ✅ Human-readable
  • ✅ Git-friendly
  • ✅ Secure (no pickle vulnerabilities)
  • ✅ Cross-platform compatible

Scenarios File

For batch training, use a scenarios file:

Learn vs Train

Agent Learn and Agent Training are complementary. Use Learn for continuous adaptation and Training for focused improvement sessions.
See Learn vs Train Comparison for detailed differences.

Agent Learn

Passive continuous learning

Learn vs Train

Detailed comparison