TraceCtrl SDK — agentic AI security observability
Project description
TraceCtrl SDK
Security observability and runtime guardrails for agentic AI. TraceCtrl instruments your agents with OpenTelemetry, captures every LLM call and tool invocation as security-enriched spans, and streams the trace + guardrail violations to the TraceCtrl dashboard in real time.
Install
pip install tracectrl
For framework integrations:
pip install tracectrl-instrumentation-strands # AWS Strands
pip install tracectrl-instrumentation-agno # Agno
Quickstart
import tracectrl
from tracectrl.instrumentation.strands import StrandsInstrumentor
# Configure once at startup — points the SDK at your TraceCtrl engine
tracectrl.configure(
service_name="my-agent",
endpoint="http://localhost:4317",
)
# Auto-instrument Strands (or replace with the instrumentor for your framework)
StrandsInstrumentor().instrument()
# Your existing agent code — no changes needed
Guardrails
Two guardrail providers, designed to coexist on the same agent:
1. Built-in LLM judge — declarative guardrails evaluated by a Bedrock model:
from tracectrl.guardrails import Guardrail, wrap_agent_with_guardrails
no_pii_leak = Guardrail(
name="no_pii_leak",
description="Block agent responses containing personally identifiable info.",
judge_prompt="Does the following response contain PII?\n\n{output}",
judge_llm=bedrock_model,
severity="high",
)
wrap_agent_with_guardrails(my_agent, [no_pii_leak])
2. TraceCtrl Guards (Protector Plus) — explicit checks against an external LLM firewall covering prompt injection, PII, content moderation, vector similarity, keywords/regex, and system-prompt leakage:
import tracectrl
with tracectrl.guard():
tracectrl.check_input(user_message)
response = my_agent(user_message)
tracectrl.check_output(str(response))
Configure the Protector Plus endpoint and per-domain API key in the TraceCtrl dashboard's Settings page. Calls are async fire-and-forget — they emit OpenTelemetry evaluation spans without blocking the LLM call. Both decisions (pass / fail) show up in the trace tree and the dashboard's Guardrails page, with failures streamed as live alerts.
Tagging agents
from tracectrl import tag_agent
tag_agent(my_agent) # reads agent.system_prompt + agent.name automatically
Identity shows up on the dashboard's Agents page.
Links
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 tracectrl-0.2.0.tar.gz.
File metadata
- Download URL: tracectrl-0.2.0.tar.gz
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bac337ab36b55ce40096388e88135f726292b7a48ce94641d31dbff8eeb3a18f
|
|
| MD5 |
04eb41163ddc0cf9c02e453c4280239f
|
|
| BLAKE2b-256 |
c8057b2997260bd1fd504f506501ab82f4272e1535399885943bceadc200ec71
|
Provenance
The following attestation bundles were made for tracectrl-0.2.0.tar.gz:
Publisher:
pypi-cd.yml on tracectrl/tracectrl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracectrl-0.2.0.tar.gz -
Subject digest:
bac337ab36b55ce40096388e88135f726292b7a48ce94641d31dbff8eeb3a18f - Sigstore transparency entry: 1523129488
- Sigstore integration time:
-
Permalink:
tracectrl/tracectrl@d8ab697365d5028d20586652310ca2dcb93b2a6c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tracectrl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-cd.yml@d8ab697365d5028d20586652310ca2dcb93b2a6c -
Trigger Event:
push
-
Statement type:
File details
Details for the file tracectrl-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tracectrl-0.2.0-py3-none-any.whl
- Upload date:
- Size: 45.0 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 |
0c0b21bf58770c5a32b164aad0950f7b1414950acee475a151e41b4b90928462
|
|
| MD5 |
90414d4c0b2ec448931f490db45f5b3a
|
|
| BLAKE2b-256 |
f107c76a3a44d9d0d3136680ed8aa90176d897613f4602505a2b6443d792d70d
|
Provenance
The following attestation bundles were made for tracectrl-0.2.0-py3-none-any.whl:
Publisher:
pypi-cd.yml on tracectrl/tracectrl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracectrl-0.2.0-py3-none-any.whl -
Subject digest:
0c0b21bf58770c5a32b164aad0950f7b1414950acee475a151e41b4b90928462 - Sigstore transparency entry: 1523129498
- Sigstore integration time:
-
Permalink:
tracectrl/tracectrl@d8ab697365d5028d20586652310ca2dcb93b2a6c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tracectrl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-cd.yml@d8ab697365d5028d20586652310ca2dcb93b2a6c -
Trigger Event:
push
-
Statement type: