For Developers

Compliance as Code

Add EU AI Act compliance to your AI applications with a few lines of code. Automatic audit trails, human oversight tracking, and compliance evidence—without changing how you build.

pip install protectron
View Documentation
Works with LangChain, CrewAI, AutoGenPython and TypeScriptOpen-source SDK, cloud dashboard

Why Compliance Needs Code

EU AI Act compliance isn't just documentation—it requires operational changes to how your AI systems work.

Compliance Built Into Your Stack

Instead of bolting compliance onto finished systems, integrate it during development. Every AI action is logged from day one.

Zero Friction Integration

Our SDK hooks into your existing frameworks. Add a callback or middleware—your business logic stays unchanged.

Automatic Evidence Generation

Logs become compliance evidence automatically. No manual documentation of "what the AI did."

Continuous Compliance

Every production run generates compliance data. You're not compliant once—you're compliant continuously.

Get Started in 60 Seconds

Python

# Install the core SDK
pip install protectron

# With framework integrations
pip install protectron[langchain]
pip install protectron[crewai]
pip install protectron[autogen]

# Or install everything
pip install protectron[all]

Python 3.8+ • No native dependencies • Linux, macOS, Windows

TypeScript / JavaScript

# npm
npm install @protectron/sdk

# yarn
yarn add @protectron/sdk

# pnpm
pnpm add @protectron/sdk

# Framework packages
npm install @protectron/langchain
npm install @protectron/vercel-ai

Node.js 18+ • TypeScript 4.7+ • ESM and CommonJS

Your First Integration

1

Get Your API Key

Sign up at dashboard.protectron.ai and create an API key.

export PROTECTRON_API_KEY=pk_live_xxxxxxxxxxxxx
2

Initialize the SDK

Configure with your system ID and environment.

from protectron import Protectron

protectron = Protectron(
    system_id="my-ai-system",
    environment="production"
)
3

Add to Your AI Application

Integrate with LangChain, CrewAI, or any framework.

from protectron.langchain import ProtectronCallback

agent = create_react_agent(
    llm=ChatOpenAI(model="gpt-5.2"),
    tools=my_tools,
    callbacks=[ProtectronCallback(system_id="support-agent")]
)

# Use normally - all actions are logged
result = agent.invoke({"input": "Help me with my order"})
4

View Your Audit Trail

Open dashboard.protectron.ai to see logged events in real-time.

SDK Capabilities

📝

Event Logging

Log any event with structured data. Custom event types, metadata, and context.

🔗

Trace Context

Group related events into traces. Nested spans for sub-operations.

🤖

LLM Call Logging

Structured logging for LLM interactions. Model, input, output, tokens, latency.

🔧

Tool Call Logging

Capture tool/function invocations with parameters and results.

🔀

Decision Logging

Document when your AI makes choices. Options, selection, confidence, reasoning.

👤

Human Oversight Logging

Track human interventions for Article 14 compliance. Approvals, rejections, overrides.

Flexible Configuration

Fine-tune logging behavior, privacy settings, and performance options

from protectron import Protectron

protectron = Protectron(
    # Required
    api_key="pk_live_xxx",
    system_id="my-system",
    
    # Environment
    environment="production",
    version="1.2.0",
    
    # Content options
    log_llm_content=True,
    log_tool_inputs=True,
    log_tool_outputs=True,
    
    # Privacy
    pii_redaction=True,
    hash_user_ids=True,
    
    # Performance
    async_mode=True,
    buffer_size=1000,
    flush_interval=5.0,
)

Built for Performance

Non-blocking, resilient, and minimal overhead

< 1ms

per event

Async Mode Latency

10,000+

per SDK instance

Events Per Second

~2MB

default buffer

Memory Usage

1,000+

events/second batched

Upload Throughput

Frequently Asked Questions

Yes. Protectron complements tools like LangSmith, Datadog, and others. Use them for debugging and performance monitoring, use Protectron for compliance. Both can run simultaneously.

Enable persist_on_failure to write events to disk if upload fails. Events are recovered and sent when your application restarts.

Yes. Set enabled=False to disable logging entirely, or use environment='development' to separate dev data from production.

Use pii_redaction=True for automatic PII detection, log_llm_content=False to skip prompt/completion content, or exclude_tools to skip specific tool outputs.

The SDK is open source and available on GitHub. The cloud dashboard and storage are hosted services included in your subscription.

Our roadmap includes Haystack, DSPy, and Semantic Kernel. Request integrations at feedback@protectron.ai or via the dashboard.

Start Building Compliant AI

Add EU AI Act compliance to your AI applications today. Install the SDK, add a callback, and you're logging.

✓ Free tier available✓ No credit card required✓ 5-minute integration