capybara-sdk
Emit OpenTelemetry gen_ai.* traces to a local capybara
trace debugger. Import name is capybara.
pip install capybara-sdk
import capybara
from pydantic import BaseModel
capybara.init() # export to a local capybara on 127.0.0.1:4318
class Price(BaseModel):
price: float
currency: str
capybara.schema("lookup_price", Price) # declared beats learned
@capybara.trace(tool="lookup_price")
def lookup_price(sku: str) -> dict:
return {"price": 42.0, "currency": "USD"}
init() reuses a TracerProvider you already configured, so OpenInference or
OpenLLMetry instrumentors covering OpenAI, Anthropic, or LangChain keep working;
capybara only adds an OTLP exporter and the schema processor.
@capybara.trace wraps un-instrumented functions. A bare @capybara.trace
records a tool span named after the function; kind="agent" or kind="llm"
records other span kinds. capybara.schema(tool, model) attaches a Pydantic
model's JSON Schema to that tool's spans so capybara reports contract drift on
the first violating call.
Sync and async functions are both supported.
capybara.replay is invoked by the binary, not by you: pressing r in the TUI
re-executes the recorded process, serving the recorded model responses and tool
outputs so nothing touches the network. A call that is not in the recording
stops the replay instead of running live; only model calls made after an edited
value has been served are allowed to diverge.
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 capybara_sdk-0.1.0.tar.gz.
File metadata
- Download URL: capybara_sdk-0.1.0.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4b0f3b927aa080d7b82fa0cd59647fe025b560054dab254e1b41b5d6b7cbb86
|
|
| MD5 |
212a89edec77110ac39e9ef5b8eda758
|
|
| BLAKE2b-256 |
4f00c0e9b3645f9a79267a14390df2326eff0a5a9307a8ed2137c3ea5cf89532
|
Provenance
The following attestation bundles were made for capybara_sdk-0.1.0.tar.gz:
Publisher:
publish-sdk.yml on tonquoc0407/capybara
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capybara_sdk-0.1.0.tar.gz -
Subject digest:
b4b0f3b927aa080d7b82fa0cd59647fe025b560054dab254e1b41b5d6b7cbb86 - Sigstore transparency entry: 2232338466
- Sigstore integration time:
-
Permalink:
tonquoc0407/capybara@9cbc1679adcf429622795092c225fa7527634aa7 -
Branch / Tag:
refs/tags/sdk-v0.1.0 - Owner: https://github.com/tonquoc0407
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@9cbc1679adcf429622795092c225fa7527634aa7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file capybara_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: capybara_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9decbb5c617283224fef97b41f6ecc1dbde0e5909505e9bc4b998582d0bf105e
|
|
| MD5 |
0af25696e124a454c8d236aa757d61ae
|
|
| BLAKE2b-256 |
0c897bab3ffe070c2ea50fc616be7f3ee4b57ec53aa2b26846c49e210bec8235
|
Provenance
The following attestation bundles were made for capybara_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on tonquoc0407/capybara
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capybara_sdk-0.1.0-py3-none-any.whl -
Subject digest:
9decbb5c617283224fef97b41f6ecc1dbde0e5909505e9bc4b998582d0bf105e - Sigstore transparency entry: 2232339395
- Sigstore integration time:
-
Permalink:
tonquoc0407/capybara@9cbc1679adcf429622795092c225fa7527634aa7 -
Branch / Tag:
refs/tags/sdk-v0.1.0 - Owner: https://github.com/tonquoc0407
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@9cbc1679adcf429622795092c225fa7527634aa7 -
Trigger Event:
push
-
Statement type: