Skip to main content

Official SupraWall security integration for LangChain Python

Project description

🛡️ langchain-suprawall

Official SupraWall security and compliance integration for LangChain Python.

SupraWall provides a deterministic security layer for AI agents, enabling enterprise-grade governance, human-in-the-loop approvals, and forensic audit logs.

Built for teams that need to ship autonomous agents while staying compliant with the EU AI Act (Articles 9, 12, & 14) and SOC2/ISO27001 requirements.


🚦 Quick Start

Install via pip:

pip install langchain-suprawall

With LangChain Agents (create_react_agent)

from langchain_suprawall import SupraWallCallbackHandler
from langchain.agents import create_react_agent, AgentExecutor
from langchain_openai import ChatOpenAI
from langchain import hub

llm = ChatOpenAI(model="gpt-4")
tools = [...] # Your tools
prompt = hub.pull("hwchase17/react")

# Initialize the security callback
suprawall = SupraWallCallbackHandler(
    api_key="your_suprawall_api_key",
    agent_id="payment-agent-01"
)

agent = create_react_agent(llm, tools, prompt)
agent_executor = AgentExecutor(
    agent=agent,
    tools=tools,
    callbacks=[suprawall] # Attach here
)

With LangGraph

from langgraph.prebuilt import create_react_agent
from langchain_suprawall import SupraWallCallbackHandler

suprawall = SupraWallCallbackHandler()

# Pass callbacks in the config during invocation
graph = create_react_agent(model, tools)
graph.invoke(
    {"messages": [("user", "delete my account")]},
    config={"callbacks": [suprawall]}
)

🏛️ EU AI Act Compliance

SupraWall is the first integration designed specifically to meet the high-risk AI requirements of the EU AI Act:

  • Article 9 (Risk Management): Identifies and mitigates risks through deterministic policy enforcement.
  • Article 12 (Logging): Automatically generates tamper-proof, time-stamped execution logs.
  • Article 14 (Human Oversight): Built-in hooks for "Human-in-the-Loop" (HITL) triggers on destructive actions.

🔒 Common Security Policies

Define policies in your SupraWall dashboard and they are automatically enforced via the callback:

1. Financial Guardrails (Refund Limits)

Policy: "If tool process_refund is called with an amount > $500, block execution." SupraWall intercepts the tool start, evaluates the arguments, and raises a PolicyViolation exception if the check fails.

2. Destructive Action Approval

Policy: "Require human approval for delete_customer_record." The callback will pause execution and wait for a signed approval from the SupraWall dashboard before letting the agent continue.

3. Prompt Injection Shield

SupraWall's runtime analysis detects adversarial intent (jailbreaks, DAN-style prompts) before they reach your sensitive tools.


📖 Documentation & Support


© 2026 WiserAutomation. Licensed under the Apache License 2.0.

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

langchain_suprawall-0.1.2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

langchain_suprawall-0.1.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file langchain_suprawall-0.1.2.tar.gz.

File metadata

  • Download URL: langchain_suprawall-0.1.2.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for langchain_suprawall-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cb0d1850ea6292fbf303875d9ee6a7e3dda3d3f32574c19dcd07cd4a095bff42
MD5 8c0e7f2cc712bc1a6be1bf448daaedc4
BLAKE2b-256 256177f62cd96450850f91ee96219dd7ae2a0dd56568e0691d4860243de28307

See more details on using hashes here.

File details

Details for the file langchain_suprawall-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_suprawall-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4566414841262480646b5f50a4240ac922bbefa67aa189051bac81f08a9a46c0
MD5 8cfee66614a7f05072c983e7172099bb
BLAKE2b-256 5348986c2b22475949612efa7a02db0ebe30cdaea0d6e068de6855c180e825c8

See more details on using hashes here.

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