Agent Learn (Passive)
Automatically captures patterns during normal interactions:Agent Train (Active)
Explicit iterative improvement with feedback:Quick Comparison
| Aspect | Agent Learn | Agent Train |
|---|---|---|
| Type | Passive / Automatic | Active / Explicit |
| When | During normal interactions | Dedicated training sessions |
| Feedback | Implicit (auto-detected patterns) | Explicit (human/LLM scores) |
| Purpose | Remember preferences & patterns | Improve specific behaviors |
| Storage | 7 specialized stores | Scenarios & reports |
| Iterations | Continuous | Fixed (1-N iterations) |
| Code Location | praisonaiagents (core SDK) | praisonai (wrapper) |
When to Use Each
Use Agent Learn When:
- Remembering user preferences - Dark mode, language, communication style
- Capturing domain knowledge - Project-specific terms, codebase patterns
- Building context over time - Session history, conversation threads
- Automatic adaptation - No intervention needed
- Long-term memory - Persistent across sessions
Use Agent Training When:
- Improving specific responses - Better greetings, more accurate answers
- Quality assurance - Iterative refinement with scoring
- Human feedback loops - Expert-in-the-loop improvement
- Benchmarking behavior - Measurable improvement metrics
- One-time improvement sessions - Focused training runs
Data Flow Comparison
- Agent Learn Flow
- Agent Training Flow
Key Points:
- Happens automatically during
agent.start() - No explicit feedback required
- Stores in 7 specialized stores
- Retrieved automatically for future interactions
Storage Comparison
Agent Learn Stores
| Store | Purpose | Auto-Captured |
|---|---|---|
PersonaStore | User preferences, profile | ✅ Yes |
InsightStore | Observations, learnings | ✅ Yes |
ThreadStore | Session/conversation context | ✅ Yes |
PatternStore | Reusable knowledge patterns | Optional |
DecisionStore | Decision logging | Optional |
FeedbackStore | Outcome signals | Optional |
ImprovementStore | Self-improvement proposals | Optional |
Agent Training Storage
| Data | Purpose | Format |
|---|---|---|
TrainingScenario | Input + expected output | JSON |
TrainingIteration | Per-iteration results | JSON |
TrainingReport | Summary with scores | JSON |
Code Examples
- Agent Learn
- Agent Training
Using Both Together
Agent Learn and Agent Training are complementary. Use them together for best results:Summary
| Feature | Agent Learn | Agent Training |
|---|---|---|
| Enable | memory="learn" | AgentTrainer(agent) |
| Trigger | Automatic | Manual |
| Feedback | None needed | Score + suggestions |
| Best for | Preferences, context | Quality improvement |
| Persistence | Learn stores | Training reports |
| CLI | praisonai memory learn | praisonai train agents |

