New to RAXE? Start with the Quickstart and learn how detection works.
Overview
RAXE provides think-time security for LangChain agents — real-time threat detection during inference, before action execution. Protect chains, ReAct agents, tools, memory, and RAG pipelines. What RAXE scans:- Agent prompts and reasoning
- Tool call requests and results
- Memory content retrieval
- RAG context injection
- Agent goal changes
- Inter-agent handoffs
Installation
Quick Start
quick_start.py
Configuration Options
config.py
Agentic Security Scanning
The LangChain handler includes specialised methods for securing autonomous agents.Goal Hijack Detection
Detect when an agent’s objective is being manipulated:goal_hijack.py
Tool Chain Validation
Detect dangerous sequences of tool calls:tool_chain.py
Agent Handoff Scanning
Scan messages between agents in multi-agent systems:handoff.py
Memory Scanning
Scan content before persisting to agent memory:memory.py
Chain Integration
chain.py
Agent Integration
agent.py
RAG Protection
Protect RAG pipelines from indirect injection:rag.py
Error Handling
error_handling.py
Tool Policy
Restrict which tools agents can use:tool_policy.py
Monitoring
Check scan statistics:monitoring.py
Best Practices
Start with log-only mode
Start with log-only mode
Begin with monitoring before enabling blocking:
progressive_rollout.py
Use tool policies for agents
Use tool policies for agents
Restrict dangerous tools to prevent command injection:
tool_restriction.py
Validate goal changes
Validate goal changes
For long-running agents, periodically check for goal drift:
goal_validation.py
Handle blocked requests gracefully
Handle blocked requests gracefully
Always catch
RaxeBlockedError for user-friendly responses:graceful_handling.py
Supported LangChain Versions
| LangChain Version | Status |
|---|---|
| 0.1.x | Supported |
| 0.2.x | Supported |
| 0.3.x | Supported |
OWASP Alignment
The LangChain integration protects against:| OWASP Risk | Protection |
|---|---|
| ASI01: Goal Hijack | validate_agent_goal_change() |
| ASI02: Tool Misuse | validate_tool_chain(), ToolPolicy |
| ASI06: Memory Poisoning | scan_memory_before_save() |
| ASI07: Inter-Agent Attacks | scan_agent_handoff() |
| ASI05: Prompt Injection | Automatic prompt/response scanning |
