Memory and Learning are different but complementary systems. Memory stores raw data, while Learning extracts actionable knowledge from it.
Key Differences
| Dimension | Memory | Learning |
|---|
| Analogy | Notebook / filing cabinet | Adaptive brain tissue |
| Question | ”What happened before?" | "What should I know going forward?” |
| When | Every interaction (read/write) | Post-interaction analysis |
| How | Direct storage (key-value, vector, relational) | LLM-powered extraction + structured stores |
| Lifetime | Session (STM) or persistent (LTM) | Always persistent, grows over time |
| Output | Raw conversation history, entity records | User profiles, behavioral patterns, decision logs |
| Cost | Low (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:
Memory Only
Learning Only
Both Together
Custom Config
from praisonaiagents import Agent
agent = Agent(
name="Assistant",
instructions="You are a helpful assistant",
memory=True # STM + LTM + Entity + Episodic
)
from praisonaiagents import Agent
agent = Agent(
name="Assistant",
instructions="You learn from every interaction",
learn=True # Enables AGENTIC mode (auto-learning)
)
from praisonaiagents import Agent, LearnConfig
agent = Agent(
name="Full Assistant",
instructions="You remember and learn",
memory=True, # Memory system
learn=LearnConfig( # Learning layer
persona=True, # User preferences
insights=True, # Observations
patterns=True, # Reusable knowledge
decisions=True, # Decision logging
)
)
from praisonaiagents import Agent, LearnConfig
agent = Agent(
name="Production Agent",
instructions="You learn and adapt",
learn=LearnConfig(
persona=True,
insights=True,
patterns=True,
mode="agentic", # Auto-extract learnings
scope="private", # User-isolated data
)
)
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
| Type | What It Stores | Persistence |
|---|
| Short-term | Recent conversation context | Rolling buffer, auto-expires |
| Long-term | Important facts with importance scores | Permanent |
| Entity | Named entities (people, places) with attributes | Permanent |
| Episodic | Date-based interaction history | Configurable retention |
Learning Stores
| Store | What It Extracts | Default |
|---|
| Persona | User preferences, communication style | ✅ On |
| Insights | Observations and learnings | ✅ On |
| Thread | Session context | ✅ On |
| Patterns | Reusable knowledge patterns | ❌ Off |
| Decisions | Decision rationale and trade-offs | ❌ Off |
| Feedback | Outcome signals and corrections | ❌ Off |
| Improvements | Self-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
| Mode | Behavior |
|---|
| AGENTIC | Automatically extracts learnings after each interaction (default with learn=True) |
| PROPOSE | Agent proposes learnings, human approves |
| DISABLED | Learning is off |