Agent failure monitoring SDK — trace capture with client-side PII scrubbing
Project description
Aiyara — Agent Failure Monitoring SDK
Aiyara is agent failure monitoring with system-prompt-driven constraint extraction. Paste your system prompt at app.aiyara-universe.com, we extract structural constraints (tool ordering, argument rules, cross-turn dependencies) as a deterministic policy, and every trace is checked against that policy plus pre-built harness detectors (doom loops, retry amplification, context overflow, cascades). Violations surface as issues with evidence, not LLM-judge guesses.
This Python SDK captures traces from your agent in production and ships them to the Aiyara ingest service for evaluation. Capture is non-blocking, batched, and PII is scrubbed client-side before any bytes leave your process.
Quick start
pip install aiyara
import aiyara
aiyara.init(api_key="ak_...", auto_instrument=True)
That's it. With auto_instrument=True, the SDK patches the supported client libraries below and every agent run is captured and sent to Aiyara automatically.
Get an API key
- Visit app.aiyara-universe.com.
- Sign up (Supabase auth — no card required for the free tier).
- Paste your system prompt. The wizard extracts your policy rules and lets you review them.
- Issue an
ak_*API key for your project. Use it inaiyara.init(api_key=...).
Auto-instrumentation
Supported frameworks (patched on aiyara.init(auto_instrument=True)):
openai— Chat Completions, Responses, tool callslanggraph— graph nodes, tool calls, state transitionsopenai_agents— Agents SDK runs
You can also drive capture manually:
# Single capture
aiyara.capture(
messages=[{"role": "user", "content": "Hello"}],
tool_calls=[{"name": "search", "arguments": {"q": "test"}, "result": "ok"}],
model="gpt-4",
)
# Context-managed trace
with aiyara.trace(session_id="user-123") as t:
t.record_message(role="user", content="Find flights")
t.record_tool_call(name="search_flights", arguments={}, result={})
aiyara.shutdown() # flush pending traces
PII scrubbing
PII scrubbing happens client-side, before transport. Raw user content never leaves your process unless explicitly opted in. The default scrubber redacts emails, phone numbers, and other common PII patterns; pass pii_field_paths=[...] to extend it.
aiyara.init(
api_key="ak_...",
scrub_pii=True, # on by default
pii_field_paths=["messages[*].content"], # extend default scrubbing
)
What you get
- Per-constraint verdicts. Aiyara tells you which rule fired, on which step, with the trace evidence — not a number from a judge.
- Cascade detection. Root-cause violations are linked to their downstream failures via
depends_ongraphs. - Pre-built harness detectors. Doom loops, context overflow, retry amplification, error cascades — zero configuration required.
- Deterministic monitoring. Pure-Python checks. Compile policy once, evaluate every trace, zero LLM calls on the hot path.
License
MIT — see LICENSE for details.
Links
- Homepage: www.aiyara-universe.com
- Dashboard: app.aiyara-universe.com
- Source: github.com/Aiyara-Universe/Testbench
- Changelog: sdk/CHANGELOG.md
- Issues: github.com/Aiyara-Universe/Testbench/issues
Project details
Release history Release notifications | RSS feed
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 aiyara-0.2.0.tar.gz.
File metadata
- Download URL: aiyara-0.2.0.tar.gz
- Upload date:
- Size: 77.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99a4cdb39b8aa9d4eef82e4757d561ffc71454d26f79efddbc109e97d7616e93
|
|
| MD5 |
cda39deb4a9c92bc6eb60201de0a19dc
|
|
| BLAKE2b-256 |
871c86ab9734c7d9b6e13b0e3f75c90b4adcbf035571b29f5d106a8fd8bd8103
|
Provenance
The following attestation bundles were made for aiyara-0.2.0.tar.gz:
Publisher:
publish-sdk.yml on Aiyara-Universe/Testbench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiyara-0.2.0.tar.gz -
Subject digest:
99a4cdb39b8aa9d4eef82e4757d561ffc71454d26f79efddbc109e97d7616e93 - Sigstore transparency entry: 1439263554
- Sigstore integration time:
-
Permalink:
Aiyara-Universe/Testbench@544c7fde4a5d1ab158df3b195f0f28941087033f -
Branch / Tag:
refs/tags/sdk-v0.2.0 - Owner: https://github.com/Aiyara-Universe
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@544c7fde4a5d1ab158df3b195f0f28941087033f -
Trigger Event:
push
-
Statement type:
File details
Details for the file aiyara-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aiyara-0.2.0-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03a886151703347e56cee3c73d2de4df1cec89352e179c42ba08a5750936003
|
|
| MD5 |
ede4cd4c0f07bd65def64f1972ab8d92
|
|
| BLAKE2b-256 |
58ab5fad6f2f473fb8aeea840171bb039166f6e73dcf61c382c340d5c29d66fc
|
Provenance
The following attestation bundles were made for aiyara-0.2.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on Aiyara-Universe/Testbench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiyara-0.2.0-py3-none-any.whl -
Subject digest:
f03a886151703347e56cee3c73d2de4df1cec89352e179c42ba08a5750936003 - Sigstore transparency entry: 1439263561
- Sigstore integration time:
-
Permalink:
Aiyara-Universe/Testbench@544c7fde4a5d1ab158df3b195f0f28941087033f -
Branch / Tag:
refs/tags/sdk-v0.2.0 - Owner: https://github.com/Aiyara-Universe
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@544c7fde4a5d1ab158df3b195f0f28941087033f -
Trigger Event:
push
-
Statement type: