Quick Start
1
Zero-config bot
A bot agent learns from plain chat with no learn wiring — the gateway/bot layer turns on the coordinated posture for you.After a few casual messages, inspect what the bot picked up:
2
Opt-out (YAML)
Set
learn: false on the channel and the bot behaves exactly as before — no learn stores are written.3
Explicit tuning
A pre-configured agent always wins — the bot defaults leave it alone.
Coordinated posture
learn=True is one switch that turns on three previously independent mechanisms at once.
You no longer discover and wire three independent knobs — one switch coordinates them.
How It Works
Every user message runsapply_bot_smart_defaults once per agent, then the nudge cadence drives persistence in the background.
- Every user message runs
apply_bot_smart_defaultsonce per agent (on first use). - After a response,
_maybe_emit_nudgeincrements a per-turn counter; everynudge_intervalturns (default 10) it emits a system nudge — regardless of whether tools ran, becausenudge_min_tool_iters=0. - The nudge drives the auto-injected
store_learningtool →LearnManager→ JSON-backed learn stores under the standard learn path. - Next turn:
get_learn_context()retrieves the accrued persona/insights and auto-injects them into the system prompt.
User Interaction Flow
The bot picks up a stated preference and applies it in a later, fresh session.What Triggers the Default-On Posture
For a user-supplied
memory= instance, the memory-based auto_memory half is skipped so the operator’s chosen backend/intent is preserved; the nudge cadence still fires.
Opt-out
Three equivalent ways disable session learning.- YAML (channel)
- Python (agent)
- Python (config)
config.metadata.false, or the strings "false" / "0" / "no" / "off" / "disabled" (case-insensitive) all count as opt-out.
How the Nudge Cadence Changed
nudge_min_tool_iters used to be a hard floor; it is now a tunable override.
- Before:
nudge_min_tool_iters=3was a hard floor — a purely conversational bot never nudged. - After:
<= 0(the new coordinated default) fires on conversational turns; a positive value keeps the “only after N real tool calls” behaviour for task-oriented agents.
Safety Properties Preserved
Consent / approval gating unchanged
Consent / approval gating unchanged
Consent and approval gating for
propose_skills is unchanged. The default posture uses mode=agentic and does not alter skill-proposal approval.No live reply latency
No live reply latency
Learn work stays post-response (background execution). The nudge and
store_learning run after the reply is sent, so no latency is added to the live turn.Guarded review turn
Guarded review turn
The review turn remains guarded by the
skill_manage + store_memory allow-list — the nudge cannot invoke arbitrary tools.User memory is never silently swapped
User memory is never silently swapped
A user-supplied
memory= (live instance, memory=True, provider string, or dict) is never swapped out. Only when the bot itself injected the default {"history": True, "history_limit": 20} does the helper rebuild the backend with a LearnManager. A user’s explicit learn.mode inside a memory dict is respected, not overwritten.Best Practices
Leave the default on for personal assistants
Leave the default on for personal assistants
Cross-session persona pays for itself in the gateway/bot use case. Opt out only for stateless single-turn bots (FAQ, one-shot Q&A).
Opt out for stateless / regulatory channels
Opt out for stateless / regulatory channels
If a channel must not accrue user data (KYC-restricted, PII-sensitive, ephemeral), set
learn: false in the channel YAML. The nudge and store_learning tool never fire.Tune the cadence for volume
Tune the cadence for volume
nudge_interval=10 is a sensible chat default. Raise it (20–50) for high-volume group channels to keep LLM cost down, or lower it (3–5) for a low-volume 1:1 assistant where preferences settle fast.Task-oriented agents inside a bot
Task-oriented agents inside a bot
If a bot fronts a task-oriented agent that should only learn from real tool work, pass
Agent(learn=LearnConfig(mode="agentic", nudge_min_tool_iters=3)) explicitly — a pre-configured agent wins over the default.Related
Agent Learn
The core learning concept and modes
Learn Config
Full LearnConfig options
Memory vs Learning
How memory and learning differ
Bot Gateway
Multi-channel gateway setup
Bot Run Control
Pause, resume, and stop bot runs
Learning Retention
Govern how long learnings are kept

