learn_knowledge() folds it into the knowledge graph.
Experience comes from Kapso’s own work. Every finished campaign is a record of what was tried, what it scored, and what happened next. learn() mines that record into evidence-priced cards in a lesson bank, so the next campaign starts knowing what the last one measured.
This section is about the second memory. For the first, see Knowledge graph.
Why a second memory
A knowledge graph tells you what people have written down. It cannot tell you which of those approaches actually paid off on your task, at your scale, against your evaluation. The lesson bank answers that. Each card records a mechanism that paid or failed, the conditions it held under, and the measurements behind it. A card is never a bare assertion: it carries a reliability state, a score, and the evidence trail that earned them.What a lesson looks like
Cards come in two types.
Every card carries a reliability block with a state, a score, and a written rationale. Scores are never naked — a card with a score and no rationale fails conformance. See The lesson bank.
How a campaign becomes a lesson
One finished campaign moves through four stages. Each stage is bounded by a frame that does the mechanical work and validates the result; the judgment inside is done by agent sessions the frame launches.kapso.learn(solution) runs all four for a single campaign. See From campaign to banked lesson.
Grading before learning
The order matters: grading always precedes learning, so the bank is scored on a trajectory it has not yet seen — which is what makes the score mean anything. The mechanics are on the pipeline page. That is theexam argument on learn(), and it defaults to True. Setting it False is for development replays only.
Serving
Banked lessons reach a campaign through three tools the reading agent calls itself. The frame introduces the bank and lists what is in it; it never selects cards on the agent’s behalf. See Serving lessons to a campaign.Where to next
The lesson bank
Cards, reliability states, and the bank repository
From campaign to lesson
Import, mine, grade, update
Grading
How a bank is measured, and against what
Serving
How lessons reach a running campaign
pip install leeroo-kapso · Every page as plain text: llms.txt.