Reusable self-learning engine for agent workflows
Project description
agent-learner
Reusable learning control plane for coding-agent workflows.
agent-learner helps you:
- capture learned rules from agent work
- keep project-local and global learning assets separate
- review candidates and promote useful rules
- use a dashboard UI for history, rules, and promotions
It is a learning system, not a unified wiki layer.
It is designed to layer onto existing agent environments rather than replace them.
Start here
If you want the shortest one-line setup, use one of these:
pipx install "agent-learner[web]" && agent-learner dashboard --project-root "$PWD" --open
npx @cafitac/agent-learner@latest dashboard --project-root "$PWD" --open
If you want a preflight check first, run doctor before dashboard.
The dashboard defaults to 127.0.0.1:8766 to avoid common local MCP/gateway
ports such as 8765.
doctor tells you whether the dashboard can run now, what is missing, and the next command to use.
Choose your path
1. Published Python package
pipx install "agent-learner[web]" && agent-learner dashboard --project-root "$PWD" --open
2. npm / npx wrapper
npx @cafitac/agent-learner@latest dashboard --project-root "$PWD" --open
3. Source checkout
./bin/dashboard.sh doctor
./bin/dashboard.sh --open
4. Optional Docker path
docker compose up --build
Docker is optional convenience only. It is not the primary OSS install path.
Typical workflow
- Point
agent-learnerat a project - Run
doctor - Open the dashboard
- Review rules, candidates, and history
- Promote reusable learning assets to the global layer when appropriate
Core concepts
Project-local vs global learning
- project-local knowledge lives under
<project>/.agent-learner/ - reusable shared knowledge lives under
~/.agent-learner/global/ - retrieval is local-first, then global
- external wiki/KB systems remain separate and are not part of the canonical learning lifecycle
Indexed retrieval and pruning
- rules are indexed into machine-readable metadata under
.agent-learner/index/rules.json - a human-readable summary is also written to
.agent-learner/index/index.md - retrieval uses the index first, then loads only the top matching rules
approvedrules are injected by default;needs_reviewanddeprecatedstay out unless explicitly requested- use
agent-learner rebuild-index --project-root "$PWD"if you want to force a full reindex after manual edits
Main runtime
The primary UI/runtime path is:
- FastAPI backend
- built React dashboard frontend
Static dashboard generation and stdlib-only serving still exist, but they are secondary paths.
Key commands
agent-learner doctor --project-root /path/to/repo
agent-learner dashboard --project-root /path/to/repo --open
agent-learner bootstrap --target /path/to/repo
agent-learner review-candidates --project-root /path/to/repo
agent-learner history --project-root /path/to/repo --latest-per-rule --last 10
agent-learner history-summary --project-root /path/to/repo --by adapter-decision
agent-learner overview --project-root /path/to/repo --format json
agent-learner rebuild-index --project-root /path/to/repo
agent-learner install-codex --target /path/to/repo
agent-learner update
Repository shape
src/agent_learner/— Python corefrontend/— React + Vite dashboard UIbin/— shell / wrapper entrypointstests/— CLI, lifecycle, wrapper, and dashboard testsdocs/— install, architecture, release, and smoke docs
Docs
-
Start here:
docs/install.md— install and run pathsdocs/quickstart.md— shortest command sequences
-
Release and publish:
docs/publish-smoke-checklist.md— post-publish smoke matrixdocs/release-process.md— tag order and release flowdocs/distribution.md— Python core vs npm wrapper strategy
-
Architecture:
docs/architecture.mddocs/adapter-convergence.mddocs/scope-learning-system.mddocs/storage-independence-and-provenance.md
-
docs/install.md -
docs/quickstart.md -
docs/architecture.md -
docs/adapter-convergence.md -
docs/scope-learning-system.md -
docs/storage-independence-and-provenance.md -
docs/distribution.md -
docs/publish-smoke-checklist.md -
docs/release-process.md -
docs/prerelease-checklist.md
Status
Current implemented areas:
- local/global learning split
- merged retrieval
- candidate/rule/history lifecycle
- dashboard UI
- global promotion and sync
- npm wrapper + source checkout helper
Release note
If you are validating a release, use:
python scripts/release/publish_smoke_check.py --json
python scripts/release/published_runtime_smoke.py --project-root /path/to/repo --json --skip-commands
Or from a source checkout:
./bin/publish-smoke.sh --json
Then follow docs/publish-smoke-checklist.md.
Wrapper convenience
Common wrapper aliases now work directly:
agent-learner install-codex --target "$PWD"
agent-learner install-claude --target "$PWD"
agent-learner rebuild-index --project-root "$PWD"
agent-learner bootstrap --target "$PWD"
agent-learner update
agent-learner completion zsh
Shell completion
Zsh:
echo 'source <(agent-learner completion zsh)' >> ~/.zshrc
source ~/.zshrc
Bash:
echo 'source <(agent-learner completion bash)' >> ~/.bashrc
source ~/.bashrc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_learner-0.3.5.tar.gz.
File metadata
- Download URL: agent_learner-0.3.5.tar.gz
- Upload date:
- Size: 128.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecd25378054b3cdeaef97222d445305247fbe20cfc4867ef3e9c8ed194f807eb
|
|
| MD5 |
09ddef723c294547aac3c8730d468ddb
|
|
| BLAKE2b-256 |
c3aebbd23ef2d17b250769b90bc5fe656e720323db209572daa41cd16bbcb251
|
Provenance
The following attestation bundles were made for agent_learner-0.3.5.tar.gz:
Publisher:
pypi-publish.yml on cafitac/agent-learner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_learner-0.3.5.tar.gz -
Subject digest:
ecd25378054b3cdeaef97222d445305247fbe20cfc4867ef3e9c8ed194f807eb - Sigstore transparency entry: 1357255564
- Sigstore integration time:
-
Permalink:
cafitac/agent-learner@33dcf896ef055a484b9b9acf97f131be2ff2c693 -
Branch / Tag:
refs/tags/py-v0.3.5 - Owner: https://github.com/cafitac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@33dcf896ef055a484b9b9acf97f131be2ff2c693 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_learner-0.3.5-py3-none-any.whl.
File metadata
- Download URL: agent_learner-0.3.5-py3-none-any.whl
- Upload date:
- Size: 107.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f57513bb62a9ffba499b3db670fca7f277039fac8143b1b67d755c639810cc7e
|
|
| MD5 |
d4c51886531202ddd5c77a0ec47e27d9
|
|
| BLAKE2b-256 |
d4f16ff80857f81d3f4940b2e887221b0886a6565c15fb0a5265223ec62cf96c
|
Provenance
The following attestation bundles were made for agent_learner-0.3.5-py3-none-any.whl:
Publisher:
pypi-publish.yml on cafitac/agent-learner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_learner-0.3.5-py3-none-any.whl -
Subject digest:
f57513bb62a9ffba499b3db670fca7f277039fac8143b1b67d755c639810cc7e - Sigstore transparency entry: 1357255601
- Sigstore integration time:
-
Permalink:
cafitac/agent-learner@33dcf896ef055a484b9b9acf97f131be2ff2c693 -
Branch / Tag:
refs/tags/py-v0.3.5 - Owner: https://github.com/cafitac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@33dcf896ef055a484b9b9acf97f131be2ff2c693 -
Trigger Event:
push
-
Statement type: