Quick Start
1
Simple Enable
Enable learning with default settings:
2
With Configuration
Enable specific learning capabilities:
3
With Bounded Retention
Cap store size and expire stale entries automatically:
Configuration Options
Both
max_entries and retention_days default to 0 (unbounded). Existing agents are unaffected unless you explicitly set these values. There is no silent eviction — entries are only pruned when a cap is set.Bounded Retention
Retention limits keep long-running agents healthy without losing data — evicted entries are saved to a.archive.json sidecar file next to the store, so nothing is permanently lost.
How pruning works
Entries are scored by least used first, then oldest — the most valuable, recently accessed learnings are always kept.
The archive sidecar is written to the same directory as the store file, named
<store>.archive.json (e.g., persona.archive.json).
Manual pruning
Common Patterns
Pattern 1: Full Learning Profile
Pattern 2: Shared Team Learning
Pattern 3: Compliance-Ready Agent
Best Practices
Leave defaults for most agents
Leave defaults for most agents
Both
max_entries and retention_days default to 0 (unbounded). Unless your agent runs for months or handles compliance requirements, the defaults are fine. Stores only grow with actual interactions.Cap long-running gateway agents
Cap long-running gateway agents
For agents that run continuously and interact with many users, set
max_entries=1000 to keep store files small and search fast. The archive sidecar preserves evicted entries if you need to audit them.Use retention_days for compliance
Use retention_days for compliance
For compliance requirements (e.g., GDPR, data minimization), set
retention_days to automatically make old entries eligible for pruning. Pair with max_entries for proactive pruning on every write.Use Private Scope by Default
Use Private Scope by Default
Keep learnings private unless you explicitly need shared team knowledge. This protects user data.
Restoring from archive
Restoring from archive
Evicted entries are never hard-deleted. Find the
.archive.json sidecar (same directory as the store file) to recover them. The archive is append-only JSON.Related
Bounded Learning
User-flow guide: retention caps, archival, and the prune API
Agent Learn
Learn about the Agent Learn concept

