Experiment tracker made for LLM interaction.
Project description
exprag
exprag is an experiment memory for coding agents with zero dependencies.
It is intentionally small: one JSONL file per run, plus enough structured context for an agent to answer questions about past experiments, compare runs, and recover the exact code state that produced a result.
This is not trying to be another ML dashboard. The main interface is your agent.
Ask things like:
"Which run had the best validation accuracy?"
"Compare the latest two runs and explain what changed."
"Find the best run, inspect the code that produced it, and tell me why it won."
"Restore the repository to the code state from the run with the lowest loss."
Every run records git state at startup: commit, branch, dirty status, status output, and the working-tree diff. That means an agent can reconstruct not only the checked-in commit, but also the uncommitted edits that existed when the run was made.
The result is a lightweight loop:
- Run experiments from normal Python.
- Track structured values with short semantic notes.
- Let an agent inspect
.exprag/runs/*.jsonl. - Ask the agent to compare, explain, or roll code back to any run.
Install For Local Development
uv pip install -e . --group=dev
Create Agent-Readable Experiment Memory
from exprag import Experiment
exp = Experiment(
"training my neural network",
# this metadata is captured only once at the experiment start
metadata={
"hparams": {
"learning_rate": 0.03,
"batch_size": 32,
}
},
)
for step in range(5):
loss = 1.0 / (step + 1)
acc = 0.6 + step * 0.05
exp.track(
{"step": step, "metrics": {"loss": loss, "acc": acc}},
note="training metrics after each step",
)
Run:
python examples/track_experiment.py
The runs are written to:
.exprag/runs/<run_id>.jsonl
Each run starts with a run_start record containing process, host, metadata,
and git state. Each track record contains your structured value, wall-clock
time, monotonic elapsed_ms, and optional note context for the agent.
Give Your Agent the Exprag Skill
Write the SKILL.md to the appropriate place so your agent finds it:
exprag-skill --write .claude/skills/exprag/SKILL.md
exprag-skill --write .agents/skills/exprag/SKILL.md
exprag-skill --write .opencode/skills/exprag/SKILL.md
Then ask your agent questions in terms of outcomes, not files:
"Which run in the last two weeks has the highest accuracy?"
"Which learning rates result in accuracies above 90%?"
"Compare the best run against the latest run."
"Show the metric history for the run where batch size was 32."
"Restore the code back to the run that achieved the highest accuracy."
Code-State Rollback
The powerful part is that exprag captures git context per run.
A run_start record includes enough information for an agent to reason about
the source tree at experiment time:
- current commit
- current branch
- whether the worktree was dirty
git status --porcelaingit diff --no-ext-diff HEAD- process cwd and argv
That lets an agent perform a workflow like:
- Find the run with the best metric.
- Read its
run_startgit state. - Check out the recorded commit.
- Reapply the recorded dirty diff if needed.
- Verify that the repository matches the code that produced the run.
So a prompt like this is meaningful:
"Find the run with the best validation accuracy, reconstruct the code from that run, and show me the exact changes compared with my current checkout."
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 Distributions
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 exprag-0.1.0.tar.gz.
File metadata
- Download URL: exprag-0.1.0.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73088619bf0151d6265a4d30e556a8a7ffd4b04ed8e4865589e9e51bc4679e66
|
|
| MD5 |
dea3e29bf04a07fa5f48c52ec16bf49a
|
|
| BLAKE2b-256 |
cd5ab660c643029c812d7f4c4962899f8b9f8568907dda392f9e6e09a3599c34
|
Provenance
The following attestation bundles were made for exprag-0.1.0.tar.gz:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0.tar.gz -
Subject digest:
73088619bf0151d6265a4d30e556a8a7ffd4b04ed8e4865589e9e51bc4679e66 - Sigstore transparency entry: 1348716468
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file exprag-0.1.0-cp38-abi3-win_arm64.whl.
File metadata
- Download URL: exprag-0.1.0-cp38-abi3-win_arm64.whl
- Upload date:
- Size: 245.4 kB
- Tags: CPython 3.8+, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b703740ab246769a42880d83b131744382032bff913ab87e6fb2b24983293178
|
|
| MD5 |
73dbeab552b6eb156336b20eb0712bcb
|
|
| BLAKE2b-256 |
6762da80fc9b0cfb95bb79e9738c946855fead437c92ce45b5fbfae0772e50d5
|
Provenance
The following attestation bundles were made for exprag-0.1.0-cp38-abi3-win_arm64.whl:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0-cp38-abi3-win_arm64.whl -
Subject digest:
b703740ab246769a42880d83b131744382032bff913ab87e6fb2b24983293178 - Sigstore transparency entry: 1348716971
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file exprag-0.1.0-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: exprag-0.1.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 254.2 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5548430564c6f86cdd2dcba37b4d628a3367ac5d06770ae9b8896c5a85f55f88
|
|
| MD5 |
8009ce3cb80296c1883803809212535a
|
|
| BLAKE2b-256 |
50a736c719f7563516ec7457f651551b6abc8ba0fc796d9eb9bcc83462ee09fe
|
Provenance
The following attestation bundles were made for exprag-0.1.0-cp38-abi3-win_amd64.whl:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0-cp38-abi3-win_amd64.whl -
Subject digest:
5548430564c6f86cdd2dcba37b4d628a3367ac5d06770ae9b8896c5a85f55f88 - Sigstore transparency entry: 1348716825
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file exprag-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: exprag-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 452.8 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f5705ce43dd0b9032ab98f8de771a11e57ab46100d10f63df1202dbd58d052e
|
|
| MD5 |
63f9084d55bf3462fd9b052c11e88b45
|
|
| BLAKE2b-256 |
0c8053ca7a9b3d149b056273b4bcdcd3dbf9cc6526648019f4748305eda970fe
|
Provenance
The following attestation bundles were made for exprag-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
9f5705ce43dd0b9032ab98f8de771a11e57ab46100d10f63df1202dbd58d052e - Sigstore transparency entry: 1348717046
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file exprag-0.1.0-cp38-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: exprag-0.1.0-cp38-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 431.4 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48dd097f68bd13115366fda7203695e965b68c6e115f4014813d4fc2ec2dffd3
|
|
| MD5 |
00d8b04ca31806921b1b9610590f24dc
|
|
| BLAKE2b-256 |
9a2fba7e5eee199aee63fd1a0ad0042263ef105c7d3821f9447785f65081b235
|
Provenance
The following attestation bundles were made for exprag-0.1.0-cp38-abi3-musllinux_1_2_aarch64.whl:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0-cp38-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
48dd097f68bd13115366fda7203695e965b68c6e115f4014813d4fc2ec2dffd3 - Sigstore transparency entry: 1348716646
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file exprag-0.1.0-cp38-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: exprag-0.1.0-cp38-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 380.1 kB
- Tags: CPython 3.8+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87c67bb59ac6349e94ef9b1b5eb8eed57d1b12dc90f71b2fc3b426fa9a0a8944
|
|
| MD5 |
178c0c85193363006144efa62d4a60a9
|
|
| BLAKE2b-256 |
fc9ce93875d33688acef4ef0e0343565970540a1b100636fa2ca5aaa5a47cd32
|
Provenance
The following attestation bundles were made for exprag-0.1.0-cp38-abi3-manylinux_2_28_x86_64.whl:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0-cp38-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
87c67bb59ac6349e94ef9b1b5eb8eed57d1b12dc90f71b2fc3b426fa9a0a8944 - Sigstore transparency entry: 1348716555
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file exprag-0.1.0-cp38-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: exprag-0.1.0-cp38-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 366.3 kB
- Tags: CPython 3.8+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2971a5b3d416b99a5773d04fd56629632f732f9c22fdd24ed7b6064dc8734c46
|
|
| MD5 |
ad9f3b335b9cf2b833a37c8c8516dd47
|
|
| BLAKE2b-256 |
0b9143fbacdf1d847aac5a7f31f84a723decd6017138a9b5441bc6ecbe54cba1
|
Provenance
The following attestation bundles were made for exprag-0.1.0-cp38-abi3-manylinux_2_28_aarch64.whl:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0-cp38-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
2971a5b3d416b99a5773d04fd56629632f732f9c22fdd24ed7b6064dc8734c46 - Sigstore transparency entry: 1348716744
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file exprag-0.1.0-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: exprag-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 319.7 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30d1886e5b00a6c7b462fafee8b76fda17e1b09a77cd2c757a2fc5894e3526db
|
|
| MD5 |
df5460bc66a0ed6d8e9376b740927466
|
|
| BLAKE2b-256 |
37530476619138d2d9250a9fb15db22cc7a7f18a2eb3400bd4b1af2953284591
|
Provenance
The following attestation bundles were made for exprag-0.1.0-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
cd.yml on pfackeldey/exprag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exprag-0.1.0-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
30d1886e5b00a6c7b462fafee8b76fda17e1b09a77cd2c757a2fc5894e3526db - Sigstore transparency entry: 1348716904
- Sigstore integration time:
-
Permalink:
pfackeldey/exprag@86639767acd6546cdcd2a921850323f886693d2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@86639767acd6546cdcd2a921850323f886693d2f -
Trigger Event:
release
-
Statement type: