Quick Start
How It Works
| Phase | What happens |
|---|---|
| 1. Conversation | User interacts with the agent normally |
| 2. Extract | Agent identifies persona, insights, and patterns |
| 3. Store | Learnings saved to the configured backend |
| 4. Apply | Future responses adapt based on stored learnings |
Learning Modes
mode="propose" is defined in the SDK but not yet implemented — it behaves the same as disabled until the approval workflow is added. Do not use it in production.Configuration Options
LearnConfig SDK Reference
Full parameter reference for LearnConfig
| Option | Type | Default | Description |
|---|---|---|---|
persona | bool | True | User preferences and profile |
insights | bool | True | Observations from conversations |
thread | bool | True | Session/conversation context |
patterns | bool | False | Reusable knowledge patterns |
decisions | bool | False | Log decisions made |
feedback | bool | False | Capture outcome signals |
improvements | bool | False | Self-improvement proposals |
| Option | Type | Default | Description |
|---|---|---|---|
mode | str | "disabled" | "disabled" / "agentic" / "propose" (see note) |
scope | str | "private" | "private" (per user) or "shared" (all agents) |
nudge_interval | int | 0 | Nudge agent to reflect every N turns (0 = off) |
propose mode is defined in the SDK but not yet implemented. Setting mode="propose" currently behaves the same as "disabled".| Option | Type | Default | Description |
|---|---|---|---|
backend | str | "file" | "file" / "sqlite" / "redis" / "mongodb" |
db_url | str | None | None | Connection URL for non-file backends |
store_path | str | None | None | Custom path for file backend |
max_entries | int | 0 | Max stored entries (0 = unlimited) |
retention_days | int | 0 | Archive entries older than N days (0 = keep forever) |
llm | str | None | None | LLM model for extracting learnings |
Full list of options, types, and defaults —
LearnConfig| Option | Type | Default | Description |
|---|---|---|---|
persona | bool | True | Capture user preferences and profile |
insights | bool | True | Store observations and learnings |
thread | bool | True | Track session/conversation context |
patterns | bool | False | Reusable knowledge patterns |
decisions | bool | False | Decision logging |
feedback | bool | False | Outcome signals |
improvements | bool | False | Self-improvement proposals |
mode | str | "disabled" | "disabled" or "agentic" |
scope | str | "private" | "private" or "shared" |
backend | str | "file" | "file", "sqlite", "redis", "mongodb" |
db_url | str | None | None | Database connection URL |
store_path | str | None | None | Custom file storage path |
max_entries | int | 0 | Per-store cap (0 = unbounded) |
retention_days | int | 0 | Archive stale entries after N days (0 = never) |
llm | str | None | None | LLM for extracting learnings |
nudge_interval | int | 0 | Nudge every N turns (0 = disabled) |
Common Patterns
Pattern 1 — Persona learning for personalized responses
Best Practices
Start with learn=True, then tune
Start with learn=True, then tune
The default settings (
persona=True, insights=True) cover most use cases. Only add patterns=True or decisions=True when you need those specific learning types — they add overhead per turn.Use sqlite or redis for production
Use sqlite or redis for production
The default
file backend is great for development and local agents. For production, switch to sqlite (single-node) or redis/mongodb (multi-node or high throughput).Set max_entries to prevent unbounded growth
Set max_entries to prevent unbounded growth
For long-lived agents, set
max_entries (e.g., max_entries=1000) and retention_days (e.g., retention_days=30) to prevent the learning store from growing indefinitely.Related
Learning Retention
How learned data persists between sessions
Advanced Memory
Full memory system configuration
Learn Skill
Agent skill learning system
Self Improve
Agent self-improvement mechanisms

