Get EU AI Act compliance logging for your AI application in under 5 minutes.
Before you begin, make sure you have:
Sign up at dashboard.protectron.ai/signup with email or SSO, then verify your email address.
Click 'Add AI System' in your dashboard, enter a name, select the AI type (Agent, Chain/Pipeline, Chatbot, or Other), and click 'Create System'. You'll receive a System ID.
Go to Settings → API Keys, create a new key, and copy it immediately. Store it as an environment variable.
# Add to your .env file or shell profile
export PROTECTRON_API_KEY=pk_live_xxxxxxxxxxxxxxxxxxxxxxxxInstall the Protectron SDK for your language.
# Python - Core SDK
pip install protectron
# With LangChain support
pip install protectron[langchain]
# With CrewAI support
pip install protectron[crewai]
# TypeScript / JavaScript
npm install @protectron/sdkAdd the Protectron callback to your AI application. Here's a LangChain example:
from langchain.agents import create_react_agent, AgentExecutor
from langchain_openai import ChatOpenAI
from protectron.langchain import ProtectronCallback
# Create the Protectron callback
callback = ProtectronCallback(
system_id="sys_abc123xyz" # Your system ID from Step 2
)
# Create your agent with the callback
llm = ChatOpenAI(model="gpt-5.2")
agent = create_react_agent(llm, tools, prompt)
executor = AgentExecutor(
agent=agent,
tools=tools,
callbacks=[callback] # Add Protectron here
)
# Run your agent - all actions are automatically logged
result = executor.invoke({"input": "Your query here"})Go to dashboard.protectron.ai, select your AI system, and click 'Audit Trail'. You should see events appearing in real-time.
After running your code, you should see events like:
| Event Type | Description |
|---|---|
| trace_start | Beginning of a session/conversation |
| llm_call | Each LLM interaction with input/output |
| tool_call | Each tool/function invocation |
| agent_action | Agent decisions and actions |
| trace_end | End of session |
For Article 14 compliance, log when humans approve, reject, or override AI actions:
from protectron import Protectron
protectron = Protectron(system_id="sys_abc123xyz")
# When a human approves an AI action
def approve_action(action, approver_email):
protectron.log_human_approval(
action_type=action["type"],
action_details=action["details"],
approved_by=approver_email
)
execute_action(action)
# When a human rejects an AI action
def reject_action(action, approver_email, reason):
protectron.log_human_rejection(
action_type=action["type"],
action_details=action["details"],
rejected_by=approver_email,
rejection_reason=reason
)
# When a human overrides an AI decision
def override_action(original_action, new_action, approver_email, reason):
protectron.log_human_override(
original_decision=original_action["type"],
override_decision=new_action["type"],
overridden_by=approver_email,
override_reason=reason
)
execute_action(new_action)By default, Protectron logs:
| Data | Logged | Purpose |
|---|---|---|
| LLM prompts | ✓ | Audit trail of inputs |
| LLM responses | ✓ | Audit trail of outputs |
| Tool calls | ✓ | Record of AI actions |
| Tool results | ✓ | Outcomes of actions |
| Timestamps | ✓ | Timeline reconstruction |
| Session context | ✓ | Grouping related events |
| Errors | ✓ | Failure tracking |
callback = ProtectronCallback(
system_id="sys_abc123xyz",
# Content options
log_llm_content=True, # Set False to log metadata only
log_tool_inputs=True, # Log tool parameters
log_tool_outputs=True, # Log tool results
# Privacy options
pii_redaction=True, # Auto-redact emails, phones, etc.
hash_user_ids=True, # Hash user identifiers
# Sampling (for high-volume)
sample_rate=1.0 # 1.0 = 100%, 0.1 = 10%
)You're now logging AI actions for EU AI Act compliance! Here's what to explore next:
| Step | Action | Time |
|---|---|---|
| 1 | Create account | 1 min |
| 2 | Register AI system | 1 min |
| 3 | Get API key | 30 sec |
| 4 | Install SDK | 30 sec |
| 5 | Add callback | 2 min |
| 6 | Verify in dashboard | 30 sec |
| Total - Full integration | ~5 min | |
You're now logging AI actions for EU AI Act compliance. 🎉
Create your free account and start logging AI actions in minutes.