Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracectrl-0.2.0.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracectrl-0.2.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

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

Hashes for tracectrl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bac337ab36b55ce40096388e88135f726292b7a48ce94641d31dbff8eeb3a18f
MD5 04eb41163ddc0cf9c02e453c4280239f
BLAKE2b-256 c8057b2997260bd1fd504f506501ab82f4272e1535399885943bceadc200ec71

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracectrl-0.2.0.tar.gz:

Publisher: pypi-cd.yml on tracectrl/tracectrl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for tracectrl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c0b21bf58770c5a32b164aad0950f7b1414950acee475a151e41b4b90928462
MD5 90414d4c0b2ec448931f490db45f5b3a
BLAKE2b-256 f107c76a3a44d9d0d3136680ed8aa90176d897613f4602505a2b6443d792d70d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracectrl-0.2.0-py3-none-any.whl:

Publisher: pypi-cd.yml on tracectrl/tracectrl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page