Skip to main content
Memory and Learning are different but complementary systems. Memory stores raw data, while Learning extracts actionable knowledge from it.

Key Differences

DimensionMemoryLearning
AnalogyNotebook / filing cabinetAdaptive brain tissue
Question”What happened before?""What should I know going forward?”
WhenEvery interaction (read/write)Post-interaction analysis
HowDirect storage (key-value, vector, relational)LLM-powered extraction + structured stores
LifetimeSession (STM) or persistent (LTM)Always persistent, grows over time
OutputRaw conversation history, entity recordsUser profiles, behavioral patterns, decision logs
CostLow (no LLM calls for basic ops)Higher (requires LLM extraction step)

When to Use Each

Use Memory When

  • You need conversation context across sessions
  • You want to store/retrieve specific facts
  • You need entity tracking (people, places)
  • You want lightweight, zero-LLM-cost storage

Use Learning When

  • Agents should adapt to user preferences over time
  • You want pattern recognition across interactions
  • You need decision logging and rationale tracking
  • You want self-improvement proposals

API Comparison

Memory and Learning are peer-level systems — both are top-level Agent parameters:
from praisonaiagents import Agent

agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant",
    memory=True   # STM + LTM + Entity + Episodic
)
learn=True auto-creates a minimal memory backend if memory= is not set. Learning works independently — you don’t need to configure memory to use it.

What Each System Stores

Memory Types

TypeWhat It StoresPersistence
Short-termRecent conversation contextRolling buffer, auto-expires
Long-termImportant facts with importance scoresPermanent
EntityNamed entities (people, places) with attributesPermanent
EpisodicDate-based interaction historyConfigurable retention

Learning Stores

StoreWhat It ExtractsDefault
PersonaUser preferences, communication style✅ On
InsightsObservations and learnings✅ On
ThreadSession context✅ On
PatternsReusable knowledge patterns❌ Off
DecisionsDecision rationale and trade-offs❌ Off
FeedbackOutcome signals and corrections❌ Off
ImprovementsSelf-improvement proposals❌ Off

How They Work Together

Memory provides the raw recall. Learning provides the adaptive intelligence on top.

Architecture

Both systems are first-class peers on the Agent:

Learning Modes

ModeBehavior
AGENTICAutomatically extracts learnings after each interaction (default with learn=True)
PROPOSEAgent proposes learnings, human approves
DISABLEDLearning is off