Skip to main content

The open-source core for AI agent security and compliance

Project description

suprawall

The security gateway for AI agents. Enforce authentication, rate limiting, and policy controls between users and AI agents — in one line of code.

Install

pip install suprawall

With LangChain:

pip install "suprawall[langchain]"

With OpenAI Agents SDK:

pip install "suprawall[openai]"

Everything:

pip install "suprawall[all]"

Quickstart

Get your free API key at https://www.supra-wall.com/

Any agent (generic)

from suprawall import with_suprawall, SupraWallOptions

secured = with_suprawall(my_agent, SupraWallOptions(
    api_key="ag_your_key_here"
))
result = secured.run("delete_file", {"path": "/etc/passwd"})

LangChain

from suprawall import SupraWallLangChainCallback, SupraWallOptions
from langchain.agents import AgentExecutor

callback = SupraWallLangChainCallback(
    SupraWallOptions(api_key="ag_your_key_here")
)
agent_executor = AgentExecutor(
    agent=agent,
    tools=tools,
    callbacks=[callback],
)

OpenAI Agents SDK

from suprawall import wrap_openai_agent, SupraWallOptions
from agents import Agent, Runner

secured = wrap_openai_agent(agent, SupraWallOptions(
    api_key="ag_your_key_here"
))
result = await Runner.run(secured, "Send email to all users")

smolagents

from suprawall import wrap_smolagents, SupraWallOptions
from smolagents import CodeAgent

secured = wrap_smolagents(agent, SupraWallOptions(
    api_key="ag_your_key_here"
))
result = secured.run("Search for sensitive files")

MCP middleware

from suprawall import SupraWallMiddleware, SupraWallOptions

gate = SupraWallMiddleware(SupraWallOptions(api_key="ag_your_key_here"))

# Inline check
result = gate.check("send_email", args, lambda: send_email(args))

# As a decorator
@gate.guard()
def delete_user(user_id: str):
    ...

Fail-open vs Fail-closed

# Development (default)
SupraWallOptions(api_key="ag_xxx", on_network_error="fail-open")

# Production (recommended)
SupraWallOptions(api_key="ag_xxx", on_network_error="fail-closed")

Policy decisions

Decision Behaviour
ALLOW Tool executes normally
DENY Tool blocked, error string returned
REQUIRE_APPROVAL Tool paused, human approves in dashboard

Links

Dashboard: https://www.supra-wall.com/ GitHub: https://github.com/wiserautomation/suprawall Issues: https://github.com/wiserautomation/suprawall/issues

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

suprawall_sdk-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

suprawall_sdk-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file suprawall_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: suprawall_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for suprawall_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 352a5cef80aa09802abc70f9a6eb19fe4b6b40fb6c668ca8c83a2cd24bcda24a
MD5 294345aaf4a043420dc20dd42386e9f9
BLAKE2b-256 252270b169523fe1a4a8e021e65e22b1edc4ed5961d6a3c02e7917975d510c5e

See more details on using hashes here.

File details

Details for the file suprawall_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: suprawall_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for suprawall_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66d8d3575030df140151e237801f77c4dee1eaf0989675fd1d6bcbd5ba0a49b0
MD5 a79d7270c84eea792faee232adcf6e0e
BLAKE2b-256 77e84e79f451002270a56b336471c526c9795d4cdfc6fa7fc77a1170a65d6131

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