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-sdk

With LangChain:

pip install "suprawall-sdk[langchain]"

With OpenAI Agents SDK:

pip install "suprawall-sdk[openai]"

Everything:

pip install "suprawall-sdk[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-1.1.0.tar.gz (27.1 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-1.1.0-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for suprawall_sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 79e6e28ef7b8fc379e7b403a23347ffdfeb36339e3f5b8d3c754ad632cfcb5f9
MD5 3dedb122ac65e8c9d3804c644497d458
BLAKE2b-256 f817dfa07f5f39f78517e100d1650ea33af288e34cebb4aa1a54d7ca6cee697a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for suprawall_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac66a347b926110f934f84b754c77308fc25df1b9bd1a502d22f576a9581446c
MD5 66331ae7bddde84c91ee3277c6026fb6
BLAKE2b-256 32abbf614184ec863a31cf5d423697898db16e33320ef74c5832c41ab749b8f8

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