Skip to main content

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=1 to record.
  • License: MIT

For AI coding agents

Point your coding agent at the dense, single-file reference for the piece it is working on:

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", redact=True, tools=[])   # 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=...).

Metadata

Release files for evalshift-sdk 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evalshift-sdk 0.3.0
File Size Uploaded
evalshift_sdk-0.3.0.tar.gz 259.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evalshift-sdk 0.3.0
File Interpreter ABI Platform
evalshift_sdk-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 328.8 kB

Release files / evalshift_sdk-0.3.0.tar.gz

Download URL evalshift_sdk-0.3.0.tar.gz
Size 259.4 kB
Tags Source
SHA-256 checksum
How to use checksums
44bda65e45f25bc41bcdf1c980b9fcaf11a15d22735a955129cb7b175654f329
BLAKE2b-256 checksum
How to use checksums
ac4b7ca2a8f2a43565346e2b218dd86683a26f5d46ac41d829101b61d5a3414d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 23, 2026.

Transparency log

Release files / evalshift_sdk-0.3.0-py3-none-any.whl

Download URL evalshift_sdk-0.3.0-py3-none-any.whl
Size 69.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b6bd89adf87fc63738796683bdf23b6c06c2919eb30de604d2d587eee4f13d2
BLAKE2b-256 checksum
How to use checksums
0e6b955bc52fa8f973b903c5df83b0d6e8ba9c78c542bce5e15a16e4210cc62b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page