Prerequisites
Learned Knowledge requires a Knowledge base for semantic search:Basic Usage
Agentic Mode
The agent receives tools to manage knowledge explicitly.search_learnings, save_learning
The agent searches before answering questions and before saving (to avoid duplicates).
Propose Mode
The agent proposes learnings for user confirmation before saving.Propose mode is enforced through system prompt instructions, not application code. The
save_learning tool stays available for the rest of the run, so the agent is expected to wait for a “yes” but isn’t blocked from saving without one.Always Mode
Learnings are extracted automatically after each response.Data Model
What to Save
Good example:
“When comparing cloud providers, always check egress costs first - they vary dramatically (AWS: 0.12/GB, Cloudflare R2: free).”Poor example:
“AWS has egress costs.”
Accessing Learned Knowledge
Context Injection
Relevant learnings are injected via semantic search:Namespaces
Control knowledge sharing:During a normal agent run, the Agent doesn’t forward a namespace when it calls the Learning Machine, so this falls back to
LearningMachine.namespace ("global" by default) instead of the value set on LearnedKnowledgeConfig. Set the same namespace on LearningMachine for it to take effect: