Chronicle
Chronicle is a local-first run recorder and context layer for AI coding agents.
It prepares grounded repo context before an agent codes, captures the diff after it codes, reviews impacted files/tests, and creates a replayable handoff for the next human or agent.
pip install chronicle-sdk
chronicle setup codex
chronicle run "Fix auth token refresh bug"
# let Codex / Claude / Cursor make changes
chronicle finish --base main
chronicle replay --latest
Chronicle helps teams answer:
- What context did the agent use?
- Which files and symbols were impacted?
- What changed?
- What tests should be run?
- What should the next agent or reviewer know?
Alpha release: Chronicle is currently strongest on Python
.pyrepositories. Non-Python repositories still get basic file/diff risk coverage.
v0.2: Agent Run Recorder
Chronicle v0.2 is built around one loop:
chronicle run "Add retry handling to payment webhook"
# agent edits code
chronicle finish --base main
chronicle report --latest
chronicle report --latest --html
chronicle replay --latest
chronicle run prepares an Agent Run:
Chronicle Agent Run prepared
Context prepared: yes
Agent prompt saved: chronicle_logs/runs/run_x/agent_prompt.md
Key files: 6
Impacted symbols: 14
Suggested tests: 3
Risk areas:
- payments/webhook.py is billing-sensitive.
chronicle finish closes the loop:
Chronicle Agent Run finished
Changed files: 4
Impacted symbols: 7
Review findings: 2
Report saved: chronicle_logs/runs/run_x/report.md
The Run Report
Every finished run writes one polished handoff artifact:
chronicle_logs/runs/<run_id>/report.md
chronicle_logs/runs/<run_id>/report.html
The report includes:
- Task
- Context Used
- Agent Changes
- Impact Map
- Review Findings
- Suggested Next Prompt
- Handoff
- Context Quality Score
- Token budget and token savings
- Saved artifacts
The HTML report is static, local, and read-only. It is meant for screenshots, demos, PR handoffs, and recruiter-friendly walkthroughs without running a dashboard.
Demo: Flask Context Change
Chronicle includes a real README-ready demo recorded against the open source Flask repo: docs/demos/flask-context-demo.
The run asked Chronicle to add a small explanatory comment near Flask request
context handling without changing behavior. Chronicle selected src/flask/app.py
and src/flask/ctx.py, prepared a 1,487-token context packet from an estimated
13,531-token repo context, and recorded an 89.01% token reduction.
After the agent made a one-line comment-only change in src/flask/ctx.py,
Chronicle captured diff.patch, generated an Impact Review with suggested
tests, saved a Run Replay timeline, and rendered both
report.md and
report.html.
Run Replay
chronicle replay --latest
Replay prints a timeline:
Chronicle Run Replay
Run: run_20260604_abc123
Task: Fix auth token refresh bug
Status: finished
1. PREPARE
Query: Fix auth token refresh bug
Context files: 6
Token budget: auto
Prompt saved: chronicle_logs/runs/run_x/agent_prompt.md
2. AGENT WORK
Diff captured: chronicle_logs/runs/run_x/diff.patch
Changed files: 4
3. REVIEW
Findings: 2
Related tests: 3
4. HANDOFF
Report: chronicle_logs/runs/run_x/report.md
HTML: chronicle_logs/runs/run_x/report.html
Code Memory
Use inspect when you want codebase intelligence without starting an agent run:
chronicle inspect --file src/auth/service.py
chronicle inspect --symbol AuthService.refresh_token
Symbol inspection shows where a symbol is defined, who calls it, what it calls, imports, related tests, and recent git changes. File inspection shows indexed symbols, imports, incoming references, related tests, and recent changes.
Impact Review
chronicle review
chronicle pr-review --base main
chronicle pr-review --base main --output pr-review.md
Review artifacts include an Impact Map:
## Impact Map
Changed:
- src/auth/service.py::refresh_token
Likely impacted:
- src/api/auth_routes.py::refresh
- tests/test_auth_refresh.py
Risk:
HIGH - auth/session lifecycle changed
Suggested tests:
- python -m unittest tests.test_auth_refresh
Artifacts
Chronicle saves local artifacts under chronicle_logs/runs/<run_id>/:
prepare.md
context_packet.md
agent_prompt.md
diff.patch
review.md
pr-review.md
report.md
report.html
prepare.json
review.json
pr-review.json
run.json
Use agent_prompt.md as the ready-to-paste prompt for Codex, Claude, Cursor, or another coding agent.
Agent Setup
chronicle setup codex
chronicle setup claude
chronicle setup cursor
chronicle setup all
chronicle setup codex --no-mcp
chronicle setup codex --mcp-only
Setup adds Chronicle workflow instructions and attempts MCP registration:
- Codex: appends
AGENTS.mdand runscodex mcp add chronicle -- chronicle-mcp --repo <repo>whencodexis installed. - Claude: appends
CLAUDE.mdand runsclaude mcp add chronicle -- chronicle-mcp --repo <repo>whenclaudeis installed. - Cursor: writes
.cursor/rules/chronicle.mdcand project.cursor/mcp.json.
If Codex or Claude is not installed, setup still updates the workflow file and prints the manual MCP command.
MCP
Start a Chronicle MCP server for one repo:
chronicle-mcp --repo /path/to/repo
For v0.2, the main MCP workflow is:
chronicle.prepare- create a Context Packet for a coding task.chronicle.review- review current code changes and impacted tests.chronicle.handoff- create a handoff packet from prepare/review state.chronicle.replay/status- inspect saved runs and repo readiness.chronicle.inspect- inspect files and symbols.
Advanced MCP tools such as evaluation, call-chain tracing, sessions, and multi-agent bus helpers remain available, but the product path is inspectable coding-agent runs.
SDK
from chronicle import Chronicle
chronicle = Chronicle(repo_path="./repo")
run = chronicle.run("Fix auth token refresh bug")
# agent edits code
finished = chronicle.finish(base="main")
report = chronicle.report(latest=True)
print(run["saved"]["agent_prompt_md"])
print(finished["saved"]["report_md"])
print(report["report"])
Product Names
| Capability | Product name |
|---|---|
prepare |
Context Packet |
run + finish |
Agent Run |
review / pr-review |
Impact Review |
replay |
Run Replay |
handoff |
Agent Handoff |
inspect |
Code Memory |
| session memory | Workflow Memory |
Benchmark Snapshot
These are deterministic local workflow checks from the test suite, not broad model-quality claims.
| Scenario | What Chronicle verifies | v0.2 status |
|---|---|---|
| Agent run loop | run -> finish -> report -> replay artifacts |
Passing |
| Static report | report.md and report.html generated locally |
Passing |
| Impact Review | changed files, impacted symbols, suggested tests | Passing |
| Code Memory | file/symbol inspect with related tests and recent changes | Passing |
| Non-Python fallback | basic file/diff risk report for non-Python repos | Passing |
Release Notes
Chronicle v0.2 makes AI coding work inspectable, replayable, and handoff-ready.
What changed:
chronicle runis now the primary workflow entrypoint.chronicle finishcaptures diff, review, PR review, Markdown report, and static HTML report.chronicle report --latest --htmlprints/regenerates the local HTML run report.chronicle replay --latestprints a four-phase run timeline.- Impact Review adds an explicit Impact Map.
- Code Memory improves
inspect --fileandinspect --symbol. - Git history parsing now preserves recent file changes for inspection.
Notes
- Chronicle is local-first and does not send repository code anywhere by default.
- Index artifacts are stored in
chronicle_logs/index.sqlite3unless--index-diris provided. - Remote repos cloned via
--repo-urlare stored inchronicle_logs/repos/by default. - Token savings are still reported, but they are a benefit of grounded context, not the product story.
Metadata
Release files for chronicle-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chronicle_sdk-0.2.0.tar.gz | 112.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chronicle_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 229.2 kB
Release files / chronicle_sdk-0.2.0.tar.gz
| Download URL | chronicle_sdk-0.2.0.tar.gz |
|---|---|
| Size | 112.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc6d3fe085ae9c0ec7e95cf18ff4956fef2179aa6aa938af0172f05c9e57bfda
|
|
BLAKE2b-256 checksum How to use checksums |
a967c1ac3c91f9e567965ca7aa49886d80c765f8159c327c9cbabefe320743d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logRelease files / chronicle_sdk-0.2.0-py3-none-any.whl
| Download URL | chronicle_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 116.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04039849b328ff7821f23cf839fa2dc54008b9582f4c39772fc7a8fa6dae57bf
|
|
BLAKE2b-256 checksum How to use checksums |
d105b469e1a6a88830dc70130b1f5d7e87ca159d70a1f137d34febcf1b13237f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logSecurity for chronicle-sdk 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for chronicle_sdk-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.