caveman
Stdlib-only Python client for Caveman gateway cooperation.
Distribution name: caveman-sdk. Import package: caveman_cloud. Install from
PyPI:
python -m pip install caveman-sdk
Requires Python 3.13 or newer.
For editable work from this source directory, use python -m pip install -e ..
import os
from caveman_cloud import Cave
cave = Cave(
api_key=os.environ["CAVE_API_KEY"],
base_url="http://127.0.0.1:8787",
agent="support-agent",
)
result = cave.compress("large payload")
print(result.output, result.basis) # basis is inferred
Main surfaces: provider clients, compress, deferred tool search, reversible
checkpoints and artifacts, retry-loop interruption, runtime policy, and a
stdlib-only OTLP/JSON exporter. Async jobs are reserved and fail locally with
cave_async_jobs_unavailable; they send no request.
Package is MIT licensed. Connected calls need a Caveman gateway key; local Engine compression remains accountless and ships through the separate Caveman runtime.
Framework middleware runtime
The caveman_cloud.middleware entry connects native framework adapters to an
existing local runtime. It installs no framework or inference client.
from caveman_cloud.middleware import CallReport, MiddlewareRuntime
def report(event: CallReport) -> None:
print(event.status, event.reason)
with MiddlewareRuntime(
endpoint="http://127.0.0.1:8787", on_report=report,
) as runtime:
runtime.ready()
# Pass runtime and an explicit conversation scope to a native adapter.
Async applications can use AsyncMiddlewareRuntime with the same synchronous
metadata callback. Adapters report applied, reused, skipped, recorded, or
disabled after deciding which request view to use. Frozen CallReport values
contain transform IDs, replacement/reuse counts, and optional adapter/call IDs,
never original content. runtime.last_report holds the latest report across
this runtime, without a history. Callback exceptions do not affect inference.
Reports describe projection decisions; usage and billing evidence are separate.
Calling low-level optimize() only prepares a plan and does not claim application.
Release files for caveman-sdk 1.1.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 | |
|---|---|---|---|
| caveman_sdk-1.1.0.tar.gz | 74.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| caveman_sdk-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.2 kB
Release files / caveman_sdk-1.1.0.tar.gz
| Download URL | caveman_sdk-1.1.0.tar.gz |
|---|---|
| Size | 74.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05ea0ba006424843490e49f754263d8f0ce67691f5c070614aeb1f61f49b3844
|
|
BLAKE2b-256 checksum How to use checksums |
896c23d45f71c7f0fa0d7cf576f05d258c0cb1fbfd4dd5e4200b7bc03000538c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 15, 2026.
Transparency logRelease files / caveman_sdk-1.1.0-py3-none-any.whl
| Download URL | caveman_sdk-1.1.0-py3-none-any.whl |
|---|---|
| Size | 43.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5902a101792180d3251591132e056f6208052bdd4ee6bea17e19c0a307f8bf35
|
|
BLAKE2b-256 checksum How to use checksums |
1bc3e62ace84f795db04c266c2ed8b2988c9df7fb99faa90ecb8c633f67244ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 15, 2026.
Transparency log