Introducing LearnKit — a thin experience distillation layer that wraps any agent and makes it compound knowledge over time. No retraining, no GPU, no amnesia.
Agents are amnesiac by design.
Retraining isn't an option. Storing raw logs isn't learning. We need a better way.
Zero-sum runs
Your agent solved this exact problem last Tuesday. Today it's hallucinating again because it has no persistent skill layer.
The log haystack
Raw vector memory is just a bigger haystack. Without distillation, your agent gets lost in the noise of its own past.
Retraining barrier
Retraining models is slow and expensive. LearnKit gives you fine-tuning results with zero GPU hours and no model changes.
One loop. The agent function never changes.
The decorator orchestrates everything around your function. Eight steps, every call — each successful run feeds the next.
Typed and auditable, not stored and hoped for.
| Naive chat-log memory | Mem0 / Zep / SaaS | LearnKit | |
|---|---|---|---|
| Storage | Raw transcripts | Vendor-hosted vector store | Local SQLite + typed records |
| Quality signal | None | Implicit ("frequency") | Explicit 0–5 LLM judge, gates writes |
| Failure handling | Lost | Lost | First-class FailureRecord, activates immediately |
| Memory soup risk | High | Medium | Hard cap: 8 records, 1,200 tokens |
| Auditability | No | No (vendor-controlled) | ✓Yes — JSON on disk you can cat |
| Vendor lock-in | None | High | None — agent & framework-agnostic |
| Fine-tuning required | — | No | ✓No |
It works. Here are the numbers.
v0.1.0 custom-clustered benchmark — 60 tasks across 3 domains, Gemini Flash Lite agent scored by a Claude Haiku judge.
| Domain | Without LearnKit | With LearnKit | Lift |
|---|---|---|---|
| Contract summarization | 4.70 / 5 | 0.00 / 5 | +0.0% |
| Python debugging | 4.90 / 5 | 0.00 / 5 | +0.0% |
| SQL authoring | 4.80 / 5 | 4.80 / 5 | 0% |
Memory compounding — contract domain
An honest note on the numbers. This is n=10 per cell — small, and we're not pretending otherwise. The judge ceiling near 5.0 compresses the visible lift on already-strong domains, and SQL authoring shows no movement at all. The signal we trust is the compounding curve: context accumulates, plateaus around a bounded cap, and stays there. That is the mechanism working as designed, not a leaderboard score.
See the mechanism. Live.
Type a task. We'll run the Classify → Retrieve → Compose stages of the LearnKit loop against a real SQLite store pre-seeded with this benchmark's distilled records. Nothing is mocked. The agent step is skipped — this is the prompt LearnKit would inject before your agent runs.
Five lines. Wrap the agent you already have.
import learnkit as lk memory = lk.LearnKit(memory_backend="sqlite", scope="user") @memory.agent(domain="coding") def my_agent(task: str, _learnkit_context: str = "") -> str: return call_your_llm(prompt=task, system=_learnkit_context)
That is the entire integration. The function never changes. The context it receives gets richer every run.
Seven typed records. Each with a lifecycle.
Nothing is stored as raw text. Every distilled artifact is one of seven schemas — quarantined on arrival until a probation window promotes it, except failures, which activate immediately.
Read the blueprint. Run the tests. Own your data.
LearnKit is MIT-licensed and agent-agnostic. The memory lives in a SQLite file on your disk as JSON you can read, score, and delete. The architecture is documented end to end.