Skip to main content

What You’re Building

By the end of this guide (60 seconds), your AI will:
  • Detect prompt injection attacks in real-time
  • Log threats without blocking (safe to deploy immediately)
  • Work with LangChain, OpenAI, or any LLM pipeline
No configuration needed. No cloud account required. Just install and protect.

Installation

Initialize

This creates ~/.raxe/config.yaml with default settings.

Verify Installation

You should see:

Your First Threat Detection

Now for the moment of truth. Run this command:
You should see:
Your AI would have been attacked. RAXE caught it.That prompt is a real injection attack used against production AI systems. Without protection, your AI would have leaked its system prompt, potentially exposing proprietary instructions, API keys, or business logic.
Now try a safe prompt:
Normal queries pass through instantly. Only attacks trigger detection.

What Just Happened

In under 5 milliseconds, RAXE:
  1. L1 Rules - Matched the input against 515+ detection patterns covering prompt injection, jailbreaks, data exfiltration, and more
  2. Threat Classification - Identified this as a prompt injection attack (pi-001) with HIGH severity
  3. Action - Logged the detection (default: log-only mode means your app keeps working)
Log-only mode is intentional. RAXE defaults to logging threats without blocking so you can safely deploy to production, observe real attack patterns, and then enable blocking once you trust the detections. No false positives crashing your users.

Protect Your First Agent

LangChain Agent (2 lines)

agent.py

CrewAI Multi-Agent Crew

crew.py

AutoGen Conversational Agent

autogen_agent.py

MCP Server Protection (Claude Desktop/Cursor)

Protect any MCP server with a single command:
Then add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
All integrations run in log-only mode by default. Set block_on_threats=True (or --on-threat block for CLI) to block detected threats.

Direct Scanning

CLI

Output:

Python SDK

app.py

OpenAI Wrapper

app.py
If a threat is detected, RaxeBlockedError is raised before the API call is made, saving you money and preventing attacks.

What RAXE Scans


Going to Production

You now have threat detection running. Here’s the path to full protection:
1

Monitor (Week 1)

Run in log-only mode. Review detections in your logs to understand your threat landscape.
2

Tune (Week 2)

Adjust sensitivity if needed. Add custom rules for your domain. See Custom Rules.
3

Enable Blocking

Once you trust the detections, enable blocking:
agent.py
Production Checklist
  • raxe doctor passes
  • Integration added to all agent entry points
  • Log aggregation configured to capture RAXE logs
  • Alerting set up for CRITICAL severity detections
  • Team reviewed 1 week of detection logs

CE includes 1,000 scans/day. For higher volumes, see pricing.

What’s Next?

MCP Gateway

Protect Claude Desktop & Cursor

LangChain Guide

Full LangChain integration

CrewAI Guide

Multi-agent crew protection

Detection Rules

Explore 515+ detection rules