Sleuth
Use an RLM to figure out your log files.
Git bisect for production incidents. Turn 4 hours of Splunk scrollback into a 90-second RCA draft.
Runs locally. BYO model. Apache-2.0.
Live demo → · Docs · Quickstart
Try it
pip install sleuth-rlm
export ANTHROPIC_API_KEY=...
sleuth ask "why did checkout fail around 3am?" --logs ./logs/
What you get
Every run writes one case.sleuth.json: the question, every step the agent took, the root cause it landed on, the log lines it cited, a confidence score. Self-contained, replayable, small enough to paste into a Slack thread.
checkout-worker is still presenting stripe_api_key version 6 to payment-gateway after vault rotated the secret to version 7 at 02:58:04 UTC. payment-gateway subscribed to the rotation webhook and flipped to v7 instantly… checkout-worker did not subscribe and caches the secret in-process with no SIGHUP handler.
That's a real root cause from examples/checkout-incident/. Open it in the viewer →
How it works
A DSPy RLM-style agent with 5 read-only query tools over a DuckDB event store, plus a side LLM for judgement calls. Writes Python. Runs it sandboxed. Iterates. Terminates by submitting an IncidentReport or blowing the budget.
Full tool surface
schema()— services, levels, time window, row counttop_errors(limit=20)— loudest failure modessearch(pattern, limit=10)— substring acrossmsgandrawaround(ts, window_s=60, service=None)— what happened next to this timestamptrace(trace_id)— follow one request across servicesllm_query(question, context="")— ask a secondary LLM a judgement questionsubmit_incident_report(report)— terminal, validated against schema
The loop: LLM emits Python → we exec it → feed stdout back → repeat until submit_incident_report or budget exhaustion.
Works with
- Log platforms — auto-detects exports from Splunk, Datadog, New Relic, Honeycomb. Click Export, point Sleuth at the file, done. Or feed it raw
.jsonl/.log/.gz. Integration guides → - Models — anything LiteLLM speaks: Claude, GPT, Llama, Bedrock, Ollama. One flag, no lock-in.
- Security — secrets redacted at ingest (Bearer, Stripe, AWS, GitHub, Slack, JWT, SSH) before anything touches the LLM. Logs never leave your box.
Docs
exorust.github.io/sleuth · Live viewer · Reference incident · PyPI
If Sleuth saves you a postmortem, give it a star. That's how I know it's worth pushing.
Apache-2.0.
Metadata
Release files for sleuth-rlm 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sleuth_rlm-0.0.1.tar.gz | 516.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sleuth_rlm-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 541.3 kB
Release files / sleuth_rlm-0.0.1.tar.gz
| Download URL | sleuth_rlm-0.0.1.tar.gz |
|---|---|
| Size | 516.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba1240b83f0967ce418aec8a918d9854eb9248196643f5920a1f7b4c6a5e71a1
|
|
BLAKE2b-256 checksum How to use checksums |
b05b5534e3fcf4b1484be8d9d065880bd3a4c9546b9b4d27fe5f70982ea9e1ac
|
| 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 Apr 19, 2026.
Transparency logRelease files / sleuth_rlm-0.0.1-py3-none-any.whl
| Download URL | sleuth_rlm-0.0.1-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab00211ef20235c3418b1a2e0beb51e88d4c2128a1a1f1f1169706e5402abcbb
|
|
BLAKE2b-256 checksum How to use checksums |
fcbdef52d51fee9a951d22a8c764e3d91b6f90bc55945c33c20e961530d1a0bd
|
| 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 Apr 19, 2026.
Transparency log