Skip to main content

A continuous, zero-friction learning layer for AI agents — learns about you and improves its own skills across every session, with an anonymized, provenance-verified global knowledge pool.

Project description

komi-learn

Your AI agent, minus the amnesia. komi-learn watches how you work, quietly learns your preferences and the techniques that pan out, and reloads the relevant ones into every new session — automatically, with no commands to type.

Works with Claude Code and OpenAI Codex. One command to set up; then it just runs.


What you get

  • 🧠 Remembers you — your style, your stack, your conventions, across every session.
  • 🔁 Learns in the background — distills durable lessons from your work after the fact; never blocks you.
  • Zero friction — no slash commands, no "save this." It recalls what's relevant when a session starts.
  • 🔒 Private by default — everything stays on your machine. Nothing is shared unless you say so.
  • 🌍 Optional community pool — opt in to get useful, anonymized tips other agents have learned (and share your own, only after you approve each one).
  • 🔌 Host-agnostic — same brain for Claude Code or Codex; a learning from one is recalled in the next session.

Quick start

pip install komi-learn

komi-learn install      # interactive setup — for Codex: komi-learn install --host codex

komi-learn install runs a short wizard: it explains each feature in one sentence, asks simple yes/no questions, and sets everything up for you. That's it — recall and background learning start in your very next session.

Already on Claude Code? You're already logged in — nothing else to do. (Scripting it? komi-learn install --yes takes the recommended defaults.)

Or install from source
git clone https://github.com/kurikomi-labs/komi-learn
cd komi-learn
pip install -e .

Everyday commands

komi-learn doctor      # is everything healthy? what to fix
komi-learn status      # your settings + how much it's learned
komi-learn config      # change any setting, anytime (menu)
komi-learn sync        # pull the latest community learnings now
komi-learn queue       # review/approve/reject what you'd share to the pool
komi-learn forget <x>  # erase learnings matching <x> (archive, or --hard to delete)
komi-learn uninstall   # remove it (keeps your learnings; --purge to wipe)

Change your mind later — you're never locked into install-time choices:

komi-learn config set recall.semantic false        # turn off meaning-based recall
komi-learn config set pool.repo_url ""             # leave the community pool
komi-learn config show

How it works

recall (session start) ──▶ your agent works ──▶ distill (background) ──▶ remembered next time
  1. Recall — when a session starts, the learnings relevant to what you're doing are loaded as context.
  2. Distill — after you work, a background pass extracts durable lessons (corrections, techniques, fixes) from the transcript.
  3. Curate — over time it consolidates overlapping lessons and retires stale ones, so memory stays sharp, not bloated.
  4. Share (optional) — general, anonymized lessons can be contributed to the community pool — but only ones you approve.

It deliberately doesn't learn the wrong things — secrets, machine-specific paths, one-off failures, or "tool X is broken" gripes are filtered out. Full design: docs/02-architecture.md.


The community pool (optional)

A shared, public pool of general agent lessons — a GitHub repo of signed .md files, no server. Opt in during setup to:

  • Get useful, anonymized techniques other people's agents have figured out.
  • Give back your own general lessons — scrubbed of anything identifying, and never shared without your explicit approval (each contribution opens a Pull Request you reviewed).

No personal data ever leaves your machine. Recalled community tips are clearly labelled and treated as untrusted reference. Details + safety model: docs/02-architecture.md, pool-repo-template/CONTRIBUTING.md.


Want to see it first?

No setup, no API key — run the offline demo:

python examples/demo_loop.py

Two sessions: you correct the agent's style and a debugging trick emerges in the first; the second shows the agent recalling both with nothing typed.


Requirements

Need Why How
Python 3.10+ the engine pip install komi-learn
Claude Code or Codex the agent it plugs into claude.com/claude-code · Codex CLI
A working model reads sessions to learn already logged in on Claude Code, or komi-learn login, or --api-key sk-ant-…

komi-learn install verifies all of this for real (including an actual model call) and stops with exact fix steps if anything's missing — no silent half-install. If a hook ever can't reach the model mid-session, it quietly skips that learning pass; your agent is never interrupted.


Docs

docs/02-architecture.md how the whole system is designed
docs/03-roadmap.md what's built and what's next
docs/05-adr-log.md the key decisions and their trade-offs
pool-repo-template/ drop-in contents to run your own pool

Inspired by Hermes Agent's self-improvement loop — rebuilt to be model-agnostic, universal, and shareable.

MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

komi_learn-0.2.0.tar.gz (143.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

komi_learn-0.2.0-py3-none-any.whl (131.8 kB view details)

Uploaded Python 3

File details

Details for the file komi_learn-0.2.0.tar.gz.

File metadata

  • Download URL: komi_learn-0.2.0.tar.gz
  • Upload date:
  • Size: 143.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for komi_learn-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b7a518fd5be007a55847954e4ac197df089273efee70f65aba0d118ada9a44c9
MD5 4636a39cb19204e2e2aa72d6dc726fb4
BLAKE2b-256 e236c7e63c1ce9304ea6b69c38f4080c12918e34e3eaaf10f7359de0c9f462eb

See more details on using hashes here.

File details

Details for the file komi_learn-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: komi_learn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 131.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for komi_learn-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2882719275001a157cbca3b13f651283ca940a0a91f03cb8b41e5cec255ec6b6
MD5 88db5408b4f0f207d2cd83d529e4bbaf
BLAKE2b-256 42f1efceeac82e7eadfa827ae7286022120273cab21241cc623e7af32389519e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page