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 OR Gemini model (auto-detected from the judge_llm you pass in):
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
Metadata
Release files for tracectrl 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tracectrl-0.3.2.tar.gz | 41.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tracectrl-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 90.5 kB
Release files / tracectrl-0.3.2.tar.gz
| Download URL | tracectrl-0.3.2.tar.gz |
|---|---|
| Size | 41.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5dad20d57f5b35113488432ea297e8323d295012dc7097142cebe29034a31c3
|
|
BLAKE2b-256 checksum How to use checksums |
c13ab9328770f76de789d1ca0696ff922cd259c108fb003698a944bc7ca43de3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 16, 2026.
Transparency logRelease files / tracectrl-0.3.2-py3-none-any.whl
| Download URL | tracectrl-0.3.2-py3-none-any.whl |
|---|---|
| Size | 48.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80ce4a76574442ce6f6cd6c93883d6acc0a9ce2637105e10174e0849770597ba
|
|
BLAKE2b-256 checksum How to use checksums |
29446001c35a829d02de5dc60201b7bedacac25b821ecbf29d5af06c2dce9fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 16, 2026.
Transparency logSecurity for tracectrl 0.3.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for tracectrl-0.3.2.tar.gz
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 Jun 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.