Skip to main content
The Learned Knowledge Store captures reusable insights, patterns, and best practices that apply across users and sessions. Semantic search lets agents find and apply relevant knowledge automatically.

Prerequisites

Learned Knowledge requires a Knowledge base for semantic search:

Basic Usage

Agentic Mode

The agent receives tools to manage knowledge explicitly.
Available tools: 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.
The tradeoff is an extra LLM call per interaction, and it may save low-value insights.

Data Model

What to Save

Good example:
“When comparing cloud providers, always check egress costs first - they vary dramatically (AWS: 0.09/GB,GCP:0.09/GB, GCP: 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:

Combining with Other Stores

You get personalized responses that draw on collective knowledge.