evalshift-sdk
In-process capture SDK for EvalShift.
Install it inside your agent process to record what the agent does — model calls, tool calls,
retrievals — and write CLI-valid traces to .evalshift/captures/. The evalshift CLI reads
those captures from disk; the SDK and CLI never call each other.
- Distribution:
evalshift-sdk· import name:evalshift - Runtime deps: none (stdlib-only)
- Python: >= 3.10
- Capture is off by default — set
EVALSHIFT_CAPTURE=1to record. - License: MIT
Install
pip install evalshift-sdk
# or
uv add evalshift-sdk
Optional LangChain integration (EvalShiftCallbackHandler):
pip install "evalshift-sdk[langchain]" # adds langchain-core>=0.2
The adapter module is import-guarded, so the SDK stays dependency-free at runtime unless you opt in.
Co-install note: the SDK (import name
evalshift) and the EvalShift CLI share the same top-level import name. Keep them in separate virtual environments.
Usage
from evalshift import capture
@capture.agent(suite="support_agent") # no-op unless EVALSHIFT_CAPTURE=1
def handle_ticket(query): ...
Full guide: DOCS.md · dense LLM reference: https://www.evalshift.dev/sdk-llms-full.txt · locked design decisions: docs/DECISIONS.md
Keeping captures/ bounded
Capture writes one JSON file per sampled invocation, so .evalshift/captures/ is kept bounded by
default (no configuration needed): identical-input re-runs are de-duplicated, and each suite
directory is capped at the 200 newest captures (oldest evicted). Tune it with env vars — no code
change required (precedence: an explicit configure(...) call > env var > built-in default):
| Env var | Default | Meaning |
|---|---|---|
EVALSHIFT_MAX_CAPTURES |
200 |
Max captures kept per suite dir. 0 / none / unlimited = uncapped. |
EVALSHIFT_DEDUP |
on |
Collapse identical-input captures (per-process). off to disable. |
EVALSHIFT_CAPTURE_TTL |
off | Evict captures older than N seconds. |
EVALSHIFT_SAMPLE_RATE |
off | Capture only this fraction of runs, e.g. 0.25. |
EVALSHIFT_DIR |
.evalshift |
Capture root directory. |
A malformed value falls back to the default (capture never crashes). To restore fully unbounded
capture: EVALSHIFT_MAX_CAPTURES=0 EVALSHIFT_DEDUP=off. The same knobs are available in code via
configure(max_captures=..., dedup=..., capture_ttl=..., sample_rate=...).
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 evalshift_sdk-0.2.0.tar.gz.
File metadata
- Download URL: evalshift_sdk-0.2.0.tar.gz
- Upload date:
- Size: 206.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48ec40cf7aebae707c3a18e8f3287de084747f83bf0919839a6adf0fde3b887e
|
|
| MD5 |
03a745f85789e9741855f567986cf479
|
|
| BLAKE2b-256 |
1ab72d378527146cb6837237db6f128c1759301834a7727bcb8f71f0b7b78fcf
|
Provenance
The following attestation bundles were made for evalshift_sdk-0.2.0.tar.gz:
Publisher:
release.yml on babaliauskas/evalshift-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evalshift_sdk-0.2.0.tar.gz -
Subject digest:
48ec40cf7aebae707c3a18e8f3287de084747f83bf0919839a6adf0fde3b887e - Sigstore transparency entry: 2373739170
- Sigstore integration time:
-
Permalink:
babaliauskas/evalshift-sdk@222a40699cdb853ca5daf00d4f36e5ca347aaaab -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/babaliauskas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@222a40699cdb853ca5daf00d4f36e5ca347aaaab -
Trigger Event:
push
-
Statement type:
File details
Details for the file evalshift_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: evalshift_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 47.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
904b576848bb7333c36fdc7e7517d5b19d6b6c5fd1ac9597f45a95f8ebcabeb5
|
|
| MD5 |
aeba1714eae72e4a1ad0d32f192ba277
|
|
| BLAKE2b-256 |
bfe3057cbdd51984ad6792723c7ee148d8977d0e1fdd3cadcb823c4ec44b990c
|
Provenance
The following attestation bundles were made for evalshift_sdk-0.2.0-py3-none-any.whl:
Publisher:
release.yml on babaliauskas/evalshift-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evalshift_sdk-0.2.0-py3-none-any.whl -
Subject digest:
904b576848bb7333c36fdc7e7517d5b19d6b6c5fd1ac9597f45a95f8ebcabeb5 - Sigstore transparency entry: 2373739264
- Sigstore integration time:
-
Permalink:
babaliauskas/evalshift-sdk@222a40699cdb853ca5daf00d4f36e5ca347aaaab -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/babaliauskas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@222a40699cdb853ca5daf00d4f36e5ca347aaaab -
Trigger Event:
push
-
Statement type: